automation.yml 2.8 KB

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