commands.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: Commands
  2. on:
  3. issue_comment:
  4. types:
  5. - created
  6. - edited
  7. pull_request_target:
  8. types:
  9. - labeled
  10. - synchronize
  11. permissions: {}
  12. jobs:
  13. rebase:
  14. name: Rebase
  15. if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '@jellyfin-bot rebase') && github.event.comment.author_association == 'MEMBER'
  16. runs-on: ubuntu-latest
  17. steps:
  18. - name: Notify as seen
  19. uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
  20. with:
  21. token: ${{ secrets.JF_BOT_TOKEN }}
  22. comment-id: ${{ github.event.comment.id }}
  23. reactions: '+1'
  24. - name: Checkout the latest code
  25. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  26. with:
  27. token: ${{ secrets.JF_BOT_TOKEN }}
  28. fetch-depth: 0
  29. - name: Automatic Rebase
  30. uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
  31. env:
  32. GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
  33. rename:
  34. name: Rename
  35. if: contains(github.event.comment.body, '@jellyfin-bot rename') && github.event.comment.author_association == 'MEMBER'
  36. runs-on: ubuntu-latest
  37. steps:
  38. - name: pull in script
  39. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  40. with:
  41. repository: jellyfin/jellyfin-triage-script
  42. - name: install python
  43. uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
  44. with:
  45. python-version: '3.13'
  46. cache: 'pip'
  47. - name: install python packages
  48. run: pip install -r rename/requirements.txt
  49. - name: run rename script
  50. run: python3 rename.py
  51. working-directory: ./rename
  52. env:
  53. GH_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
  54. GH_REPO: ${{ github.repository }}
  55. ISSUE: ${{ github.event.issue.number }}
  56. COMMENT_ID: ${{ github.event.comment.id }}