Skip to content

Commit f1a3fbf

Browse files
committed
fix: wrong color format
1 parent 10b72b3 commit f1a3fbf

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

__tests__/main.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ describe('run', () => {
377377
owner: 'monalisa',
378378
repo: 'helloworld',
379379
name: 'touched-a-pdf-file',
380-
color: '#FF0011'
380+
color: 'FF0011'
381381
});
382382
});
383383

dist/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ function isListEqual(listA, listB) {
316316
return listA.length === listB.length && listA.every(el => listB.includes(el));
317317
}
318318
function setLabels(client, prNumber, labels, labelsColour) {
319+
var _a;
319320
return __awaiter(this, void 0, void 0, function* () {
320321
// remove previous labels
321322
yield client.rest.issues.setLabels({
@@ -331,7 +332,7 @@ function setLabels(client, prNumber, labels, labelsColour) {
331332
owner: github.context.repo.owner,
332333
repo: github.context.repo.repo,
333334
name: label,
334-
color: color !== null && color !== void 0 ? color : '#EDEDED'
335+
color: (_a = color.replace('#', '')) !== null && _a !== void 0 ? _a : 'EDEDED'
335336
});
336337
}
337338
}

src/labeler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ async function setLabels(
385385
owner: github.context.repo.owner,
386386
repo: github.context.repo.repo,
387387
name: label,
388-
color: color ?? '#EDEDED'
388+
color: color.replace('#', '') ?? 'EDEDED'
389389
});
390390
}
391391
}

0 commit comments

Comments
 (0)