project-automation.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. name: Project Automation
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request_target:
  7. issue_comment:
  8. permissions: {}
  9. jobs:
  10. project:
  11. name: Project board
  12. runs-on: ubuntu-latest
  13. if: ${{ github.repository == 'jellyfin/jellyfin' }}
  14. steps:
  15. - name: Remove from 'Current Release' project
  16. uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36 # v0.9.0
  17. if: (github.event.pull_request || github.event.issue.pull_request) && !contains(github.event.*.labels.*.name, 'stable backport')
  18. continue-on-error: true
  19. with:
  20. project: Current Release
  21. action: delete
  22. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  23. - name: Add to 'Release Next' project
  24. uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36 # v0.9.0
  25. if: (github.event.pull_request || github.event.issue.pull_request) && github.event.action == 'opened'
  26. continue-on-error: true
  27. with:
  28. project: Release Next
  29. column: In progress
  30. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  31. - name: Add to 'Current Release' project
  32. uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36 # v0.9.0
  33. if: (github.event.pull_request || github.event.issue.pull_request) && !contains(github.event.*.labels.*.name, 'stable backport')
  34. continue-on-error: true
  35. with:
  36. project: Current Release
  37. column: In progress
  38. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  39. - name: Check number of comments from the team member
  40. if: github.event.issue.pull_request == '' && github.event.comment.author_association == 'MEMBER'
  41. id: member_comments
  42. run: echo "::set-output name=number::$(curl -s ${{ github.event.issue.comments_url }} | jq '.[] | select(.author_association == "MEMBER") | .author_association' | wc -l)"
  43. - name: Move issue to needs triage
  44. uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36 # v0.9.0
  45. if: github.event.issue.pull_request == '' && github.event.comment.author_association == 'MEMBER' && steps.member_comments.outputs.number <= 1
  46. continue-on-error: true
  47. with:
  48. project: Issue Triage for Main Repo
  49. column: Needs triage
  50. repo-token: ${{ secrets.JF_BOT_TOKEN }}
  51. - name: Add issue to triage project
  52. uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36 # v0.9.0
  53. if: github.event.issue.pull_request == '' && github.event.action == 'opened'
  54. continue-on-error: true
  55. with:
  56. project: Issue Triage for Main Repo
  57. column: Pending response
  58. repo-token: ${{ secrets.JF_BOT_TOKEN }}