Skip to content

Commit

Permalink
update file.
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et committed Aug 8, 2024
1 parent b7803a7 commit ccba8d1
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/reopen-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,23 @@ jobs:
id: set_issue_numbers
run: echo "ISSUE_NUMBERS=${{ steps.fetch_issues.outputs.result }}" >> $GITHUB_ENV

- name: Reopen and Remove Label
reopen_issues:
runs-on: ubuntu-latest
needs: reopen_stale_issues
permissions:
issues: write

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Reopen Issues
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issueNumbers = JSON.parse(process.env.ISSUE_NUMBERS);
for (const issue_number of issueNumbers) {
// Reopen the issue
await github.rest.issues.update({
Expand All @@ -52,7 +62,26 @@ jobs:
state: 'open'
});
console.log(`Reopened issue #${issue_number}`);
}
remove_label:
runs-on: ubuntu-latest
needs: reopen_issues
permissions:
issues: write

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Remove lifecycle/stale Label
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issueNumbers = JSON.parse(process.env.ISSUE_NUMBERS);
for (const issue_number of issueNumbers) {
// Remove the lifecycle/stale label
await github.rest.issues.removeLabel({
owner: context.repo.owner,
Expand Down

0 comments on commit ccba8d1

Please sign in to comment.