mirror of
https://github.com/lannonbr/issue-label-manager-action.git
synced 2025-06-27 22:24:13 +00:00
More Debugging
This commit is contained in:
parent
8969a6830e
commit
69b3fdcf8e
1 changed files with 7 additions and 0 deletions
7
index.js
7
index.js
|
@ -27,6 +27,8 @@ async function run() {
|
|||
idx = labels.indexOf(issue => issue.name === name);
|
||||
}
|
||||
|
||||
console.log({ idx });
|
||||
|
||||
if (idx !== -1) {
|
||||
let params = tools.context.repo({
|
||||
current_name: name,
|
||||
|
@ -34,8 +36,10 @@ async function run() {
|
|||
description,
|
||||
headers: { accept: "application/vnd.github.symmetra-preview+json" }
|
||||
});
|
||||
console.log("UPDATE");
|
||||
await octokit.issues.updateLabel(params);
|
||||
labels = labels.splice(idx, 1);
|
||||
console.log("AFTER SPLICE", labels);
|
||||
} else {
|
||||
let params = tools.context.repo({
|
||||
name,
|
||||
|
@ -43,10 +47,13 @@ async function run() {
|
|||
description,
|
||||
headers: { accept: "application/vnd.github.symmetra-preview+json" }
|
||||
});
|
||||
console.log("CREATE");
|
||||
await octokit.issues.createLabel(params);
|
||||
}
|
||||
});
|
||||
|
||||
console.log(labels);
|
||||
|
||||
// Delete labels that exist on GitHub that aren't in labels.json
|
||||
labels.forEach(async label => {
|
||||
let { name } = label;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue