Update index.js
This commit is contained in:
parent
db3f6fc976
commit
51cc3a6906
1 changed files with 10 additions and 10 deletions
20
index.js
20
index.js
|
@ -14,21 +14,21 @@ async function run() {
|
||||||
"labels.json"
|
"labels.json"
|
||||||
);
|
);
|
||||||
|
|
||||||
let newLabels = fs.readFileSync(url).toJSON().data;
|
let newLabels = JSON.parse(fs.readFileSync(url).toString());
|
||||||
|
|
||||||
console.log({ newLabels });
|
console.log({ newLabels });
|
||||||
|
|
||||||
// newLabels.forEach(async label => {
|
newLabels.forEach(async label => {
|
||||||
// let { name, color, description } = label;
|
let { name, color, description } = label;
|
||||||
|
|
||||||
// let params = tools.context.repo({ name, color, description });
|
let params = tools.context.repo({ name, color, description });
|
||||||
|
|
||||||
// if (labels.some(issue => issue.name === name)) {
|
if (labels.some(issue => issue.name === name)) {
|
||||||
// await octokit.issues.updateLabel(params);
|
await octokit.issues.updateLabel(params);
|
||||||
// } else {
|
} else {
|
||||||
// await octokit.issues.createLabel(params);
|
await octokit.issues.createLabel(params);
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run();
|
run();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue