process issues - github script sample #3
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: process issues - github script sample | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
comment: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v4 | |
with: | |
script: | | |
github.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: ":thumbsup: Thank you for reporting this issue" | |
}) | |
apply-label: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v4 | |
with: | |
script: | | |
github.issues.addLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ['needs-classification'] | |
}) | |
auto-assign: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Auto-assign issue' | |
uses: pozil/auto-assign-issue@v1 | |
with: | |
repo-token: ${{ secrets.ISSUES_SECRET }} | |
assignees: ${{ secrets.DEFAULT_ISSUE_ASSIGNEE }} |