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;
|
let newLabels = fs.readFileSync(url).toJSON().data;
|
||||||
|
|
||||||
newLabels.forEach(async label => {
|
console.log({ newLabels });
|
||||||
let { name, color, description } = label;
|
|
||||||
|
|
||||||
let params = tools.context.repo({ name, color, description });
|
// newLabels.forEach(async label => {
|
||||||
|
// let { name, color, description } = label;
|
||||||
|
|
||||||
if (labels.some(issue => issue.name === name)) {
|
// let params = tools.context.repo({ name, color, description });
|
||||||
await octokit.issues.updateLabel(params);
|
|
||||||
} else {
|
// if (labels.some(issue => issue.name === name)) {
|
||||||
await octokit.issues.createLabel(params);
|
// await octokit.issues.updateLabel(params);
|
||||||
}
|
// } else {
|
||||||
});
|
// await octokit.issues.createLabel(params);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue