Make it easier to develop async APIs #17
This file contains hidden or 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 Comment on New Issues | |
on: | |
issues: | |
types: [opened] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MY_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
auto-comment: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: Auto Comment | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const creator = context.payload.issue.user.login; | |
const commentBody = `Thank you ${creator} for sharing your idea! We have a lot of them so please be patient. You can see the current queue here. | |
### Community instructions | |
For commenters, please use the emoji reactions on the issue to express support, and/or concern easily. Please use the comments to ask questions or contribute knowledge about the idea. It is unhelpful to post comments of "I'd love this" or "What's the state of this?" | |
### Reaction Guide | |
- 👍 This is something I would use | |
- 👎 This is something that would cause problems for me or Django | |
- 😕 I’m indifferent to this | |
- 🎉 This is an easy win | |
`; | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: commentBody | |
}); | |
move-issue-to-repository-project-column: | |
name: Move issues to repository project column | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
repository-projects: write | |
steps: | |
- name: Assign new issues to project new-features | |
uses: actions/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
project-url: 'https://github.com/orgs/django/projects/24' | |
labeled: this-is-a-dirty-hack-but-i-m-getting-tired-of-this | |
label-operator: NOT |