Debugging index.js
This commit is contained in:
parent
e75fffd94c
commit
db3f6fc976
1 changed files with 11 additions and 9 deletions
20
index.js
20
index.js
|
@ -16,17 +16,19 @@ async function run() {
|
|||
|
||||
let newLabels = fs.readFileSync(url).toJSON().data;
|
||||
|
||||
newLabels.forEach(async label => {
|
||||
let { name, color, description } = label;
|
||||
console.log({ newLabels });
|
||||
|
||||
let params = tools.context.repo({ name, color, description });
|
||||
// newLabels.forEach(async label => {
|
||||
// let { name, color, description } = label;
|
||||
|
||||
if (labels.some(issue => issue.name === name)) {
|
||||
await octokit.issues.updateLabel(params);
|
||||
} else {
|
||||
await octokit.issues.createLabel(params);
|
||||
}
|
||||
});
|
||||
// let params = tools.context.repo({ name, color, description });
|
||||
|
||||
// if (labels.some(issue => issue.name === name)) {
|
||||
// await octokit.issues.updateLabel(params);
|
||||
// } else {
|
||||
// await octokit.issues.createLabel(params);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
run();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue