Skip to content

Instantly share code, notes, and snippets.

@taji-taji
Created September 28, 2022 12:53
Show Gist options
  • Select an option

  • Save taji-taji/732514d4d4ee463a07d87895acf90f35 to your computer and use it in GitHub Desktop.

Select an option

Save taji-taji/732514d4d4ee463a07d87895acf90f35 to your computer and use it in GitHub Desktop.
Pull Request を開いたら、自分をアサインする GitHub Actions workflow
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