pr-labels.yml 995 B

1234567891011121314151617181920212223242526272829303132333435
  1. name: pr-labels
  2. on:
  3. push:
  4. branches:
  5. - main
  6. jobs:
  7. is-properly-labeled:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Set up python
  11. uses: actions/setup-python@v2
  12. - name: Install requests
  13. run: pip install requests
  14. - name: Checkout repository
  15. uses: actions/checkout@v2
  16. - name: Process commit and find merger responsible for labeling
  17. id: commit
  18. run: echo "::set-output name=merger::$(python .github/process_commit.py ${{ github.sha }})"
  19. - name: Ping merger responsible for labeling if necessary
  20. if: ${{ steps.commit.outputs.merger != '' }}
  21. uses: mshick/add-pr-comment@v1
  22. env:
  23. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  24. with:
  25. message: |
  26. Hey ${{ steps.commit.outputs.merger }}!
  27. You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py