automation.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: Automation
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request_target:
  7. issue_comment:
  8. permissions: {}
  9. jobs:
  10. label:
  11. name: Labeling
  12. runs-on: ubuntu-latest
  13. if: ${{ github.repository == 'jellyfin/jellyfin' }}
  14. steps:
  15. - name: Apply label
  16. uses: eps1lon/actions-label-merge-conflict@fd1f295ee7443d13745804bc49fe158e240f6c6e # tag=v2.1.0
  17. if: ${{ github.event_name == 'push' || github.event_name == 'pull_request_target'}}
  18. with:
  19. dirtyLabel: 'merge conflict'
  20. commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.'
  21. repoToken: ${{ secrets.JF_BOT_TOKEN }}
  22. project:
  23. name: Project board
  24. runs-on: ubuntu-latest
  25. if: ${{ github.repository == 'jellyfin/jellyfin' }}
  26. steps:
  27. - name: Remove from 'Current Release' project
  28. uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43 # v0.8.3
  29. if: (github.event.pull_request || github.event.issue.pull_request) && !contains(github.event.*.labels.*.name, 'stable backport')
  30. continue-on-error: true
  31. with:
  32. project: Current Release
  33. action: delete
  34. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  35. - name: Add to 'Release Next' project
  36. uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43 # v0.8.3
  37. if: (github.event.pull_request || github.event.issue.pull_request) && github.event.action == 'opened'
  38. continue-on-error: true
  39. with:
  40. project: Release Next
  41. column: In progress
  42. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  43. - name: Add to 'Current Release' project
  44. uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43 # v0.8.3
  45. if: (github.event.pull_request || github.event.issue.pull_request) && !contains(github.event.*.labels.*.name, 'stable backport')
  46. continue-on-error: true
  47. with:
  48. project: Current Release
  49. column: In progress
  50. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  51. - name: Check number of comments from the team member
  52. if: github.event.issue.pull_request == '' && github.event.comment.author_association == 'MEMBER'
  53. id: member_comments
  54. run: echo "::set-output name=number::$(curl -s ${{ github.event.issue.comments_url }} | jq '.[] | select(.author_association == "MEMBER") | .author_association' | wc -l)"
  55. - name: Move issue to needs triage
  56. uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43 # v0.8.3
  57. if: github.event.issue.pull_request == '' && github.event.comment.author_association == 'MEMBER' && steps.member_comments.outputs.number <= 1
  58. continue-on-error: true
  59. with:
  60. project: Issue Triage for Main Repo
  61. column: Needs triage
  62. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  63. - name: Add issue to triage project
  64. uses: alex-page/github-project-automation-plus@7ffb872c64bd809d23563a130a0a97d01dfa8f43 # v0.8.3
  65. if: github.event.issue.pull_request == '' && github.event.action == 'opened'
  66. continue-on-error: true
  67. with:
  68. project: Issue Triage for Main Repo
  69. column: Pending response
  70. repo-token: ${{ secrets.JF_BOT_TOKEN }}