We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 21697b1 + 2aa3aea commit 7849416Copy full SHA for 7849416
run/gh-bugcop/gh-bugcop.tsx
@@ -235,8 +235,9 @@ async function processIssue(issue: GH["issue"]) {
235
lastChecked: new Date(),
236
});
237
}
238
- const addLabels = [BUGCOP_RESPONSE_RECEIVED];
239
- const removeLabels = [latestLabeledEvent.label.name];
+
+ const addLabels = [BUGCOP_RESPONSE_RECEIVED].filter((e) => !issueLabels.includes(e)); // add response received label if not already added
240
+ const removeLabels = [latestLabeledEvent.label.name].filter((e) => issueLabels.includes(e)); // remove the triggering label if it exists on the issue
241
242
if (isResponseReceived) {
243
console.log(chalk.bgBlue("Adding:"), addLabels);
0 commit comments