assignme.yml 594 B

1234567891011121314151617181920
  1. name: Assign issue/pull to the commenter
  2. on:
  3. issue_comment:
  4. types: created
  5. jobs:
  6. assign:
  7. runs-on: ubuntu-latest
  8. if: |
  9. github.event.comment.body == '/assignme'
  10. steps:
  11. - name: Assigning to commentor
  12. run: |
  13. curl \
  14. -X POST \
  15. -H "Accept: application/vnd.github+json" \
  16. -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
  17. https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees \
  18. -d '{"assignees":["${{ github.event.comment.user.login }}"]}'