Finalize #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Close Issues | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
close_issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Close new issue | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const issueNumber = context.issue.number; | |
const issueMessage = "The ceremony has ended! If you'd like, you can provide a custom random beacon by commenting on issue #50 before June 20, 2024, 00:00:00 UTC. Thank you for your interest in participating in the ceremony!"; | |
await github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: issueNumber, | |
body: issueMessage | |
}); | |
await github.rest.issues.update({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: issueNumber, | |
state: 'closed' | |
}); |