Skip to content

Commit

Permalink
Merge pull request #727 from forcedotcom/hknokh-patch-2
Browse files Browse the repository at this point in the history
Update stale.yml
  • Loading branch information
hknokh authored Apr 30, 2024
2 parents 9cc4011 + c165fe3 commit 4177cc6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,21 @@ jobs:
close-issue-message: "This case has been closed, since it has no activity for the last 6 days. Feel free to reopen it, if you need more help."
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Remove 'to-be-closed' label from closed issues
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { repo, owner } = context.repo;
const labelToRemove = "to-be-closed";
const query = `is:issue is:closed label:"${labelToRemove}" repo:${owner}/${repo}`;
const issues = await github.paginate(github.rest.search.issuesAndPullRequests, { q: query });
for (const issue of issues) {
await github.rest.issues.removeLabel({
owner,
repo,
issue_number: issue.number,
name: labelToRemove,
});
}

0 comments on commit 4177cc6

Please sign in to comment.