Skip to content

Commit

Permalink
clarify what checking for waiting for support means
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertdeng123 committed Jun 12, 2023
1 parent e249069 commit 24ad822
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/brain/issueLabelHandler/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export async function markRouted({
const octokit = await getClient(ClientType.App, owner);
const labelsToRemove: string[] = [];
const labelNames = issue?.labels?.map(label => label.name) || [];
const isBeingRoutedBySupport = labelNames.includes(WAITING_FOR_SUPPORT_LABEL);

// When routing, remove all Status and Product Area labels that currently exist on issue
labelNames.forEach((labelName) => {
Expand Down Expand Up @@ -220,7 +221,7 @@ export async function markRouted({
});

// Only retriage issues if support is routing
if (labelNames.includes(WAITING_FOR_SUPPORT_LABEL)) {
if (isBeingRoutedBySupport) {
await octokit.issues.addLabels({
owner: owner,
repo: payload.repository.name,
Expand Down

0 comments on commit 24ad822

Please sign in to comment.