Update index.js
This commit is contained in:
parent
f7d0ec1243
commit
9ce7cfa445
1 changed files with 5 additions and 1 deletions
6
index.js
6
index.js
|
@ -19,7 +19,11 @@ async function run() {
|
|||
newLabels.forEach(async label => {
|
||||
let { name, color, description } = label;
|
||||
|
||||
let idx = labels.indexOf(issue => issue.name === name);
|
||||
let idx = -1;
|
||||
|
||||
if (labels.length > 0) {
|
||||
idx = labels.indexOf(issue => issue.name === name);
|
||||
}
|
||||
|
||||
if (idx !== -1) {
|
||||
let params = tools.context.repo({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue