Skip to content
This repository was archived by the owner on Oct 27, 2022. It is now read-only.

Commit a89e815

Browse files
author
Jonathan Stevens
committed
chore: Bump Version & Changelog from @videndum/action-masterminds
Signed-off-by: Jonathan Stevens <[email protected]>
1 parent c45c7ce commit a89e815

File tree

8 files changed

+95
-178
lines changed

8 files changed

+95
-178
lines changed

dist/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230930,11 +230930,11 @@ function remove(IDNumber, label) {
230930230930
});
230931230931
}
230932230932
exports.remove = remove;
230933-
function update(label) {
230933+
function update(current_name, label) {
230934230934
return __awaiter(this, void 0, void 0, function* () {
230935230935
const color = this.parsingData.formatColor(label.color);
230936230936
if (!this.dryRun)
230937-
yield this.client.issues.updateLabel(Object.assign(Object.assign({}, this.repo), { current_name: label.name, description: label.description, color }));
230937+
yield this.client.issues.updateLabel(Object.assign(Object.assign({}, this.repo), { current_name, name: label.name, description: label.description, color }));
230938230938
});
230939230939
}
230940230940
exports.update = update;
@@ -231218,7 +231218,7 @@ class Utils {
231218231218
del: (name) => APILabels.del.call(this, name),
231219231219
get: () => APILabels.get.call(this),
231220231220
remove: (IDNumber, label) => APILabels.remove.call(this, IDNumber, label),
231221-
update: (label) => APILabels.update.call(this, label)
231221+
update: (current_name, label) => APILabels.update.call(this, current_name, label)
231222231222
},
231223231223
project: {
231224231224
column: {
@@ -231314,7 +231314,8 @@ function sync(config) {
231314231314
configLabel.description !== undefined) ||
231315231315
label.color !== parsingData_1.formatColor(configLabel.color)) {
231316231316
__1.log(utilities_1.LoggingLevels.info, `Recreate ${JSON.stringify(configLabel)} (prev: ${JSON.stringify(label)})`);
231317-
yield this.api.labels.update(configLabel).catch(err => {
231317+
__1.log(utilities_1.LoggingLevels.debug, `current name: ${label.name.toString()} | new: ${configLabel.name.toString()}`);
231318+
yield this.api.labels.update(label.name, configLabel).catch(err => {
231318231319
__1.log(utilities_1.LoggingLevels.error, `Error thrown while updating label: ` + err);
231319231320
});
231320231321
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 32 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
},
2626
"dependencies": {
2727
"@actions/core": "^1.2.6",
28-
"@actions/github": "~2.1.1",
28+
"@actions/github": "~5.0.0",
2929
"@videndum/utilities": "^1.0.0-alpha.17"
3030
},
3131
"devDependencies": {
3232
"@types/jest": "^26.0.10",
3333
"@types/minimatch": "^3.0.3",
3434
"@types/node": "^16.4.2",
35-
"@vercel/ncc": "^0.26.1",
35+
"@vercel/ncc": "^0.29.0",
3636
"jest": "^26.3.0",
3737
"prettier": "^2.1.2",
3838
"ts-jest": "^26.1.4",

src/utils/api/labels.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ export async function remove(this: Utils, IDNumber: number, label: string) {
5050
})
5151
}
5252

53-
export async function update(this: Utils, label: Label) {
53+
export async function update(this: Utils, current_name: string, label: Label) {
5454
const color = this.parsingData.formatColor(label.color)
5555
if (!this.dryRun)
5656
await this.client.issues.updateLabel({
5757
...this.repo,
58-
current_name: label.name,
58+
current_name,
59+
name: label.name,
5960
description: label.description,
6061
color
6162
})

src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class Utils {
5151
get: () => APILabels.get.call(this),
5252
remove: (IDNumber: number, label: string) =>
5353
APILabels.remove.call(this, IDNumber, label),
54-
update: (label: Label) => APILabels.update.call(this, label)
54+
update: (current_name: string, label: Label) => APILabels.update.call(this, current_name, label)
5555
},
5656
project: {
5757
column: {

src/utils/labels.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export async function sync(this: Utils, config: Runners['labels']) {
4242
label
4343
)})`
4444
)
45-
await this.api.labels.update(configLabel).catch(err => {
45+
log(LoggingLevels.debug, `current name: ${label.name.toString()} | new: ${configLabel.name.toString()}`)
46+
await this.api.labels.update(label.name, configLabel).catch(err => {
4647
log(
4748
LoggingLevels.error, `Error thrown while updating label: ` + err)
4849
})

0 commit comments

Comments
 (0)