Created
September 28, 2022 12:53
-
-
Save taji-taji/732514d4d4ee463a07d87895acf90f35 to your computer and use it in GitHub Desktop.
Pull Request を開いたら、自分をアサインする GitHub Actions workflow
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: Assign self to Pull Request | |
| on: | |
| pull_request: | |
| types: [opened] | |
| jobs: | |
| assign_self_to_pull_request: | |
| name: Assign self to Pull Request | |
| # dependabot を使っている場合は dependabot の作る PR では動かさない | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| runs-on: ubuntu-latest | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| NUMBER: ${{ github.event.pull_request.number }} | |
| ASSIGNEE: ${{ github.event.pull_request.user.login }} | |
| steps: | |
| - name: Assign self to pull request | |
| run: gh pr edit $NUMBER --add-assignee $ASSIGNEE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment