automation.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: Automation
  2. on:
  3. pull_request:
  4. issues:
  5. issue_comment:
  6. jobs:
  7. main:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Does PR has the stable backport label?
  11. uses: Dreamcodeio/does-pr-has-label@v1.2
  12. id: checkLabel
  13. with:
  14. label: stable backport
  15. - name: Remove from 'Current Release' project
  16. uses: alex-page/github-project-automation-plus@v0.6.0
  17. if: (github.event.pull_request || github.event.issue.pull_request) && !steps.checkLabel.outputs.hasLabel
  18. continue-on-error: true
  19. with:
  20. project: Current Release
  21. action: delete
  22. repo-token: ${{ secrets.GH_TOKEN }}
  23. - name: Add to 'Release Next' project
  24. uses: alex-page/github-project-automation-plus@v0.6.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.GH_TOKEN }}
  31. - name: Add to 'Current Release' project
  32. uses: alex-page/github-project-automation-plus@v0.6.0
  33. if: (github.event.pull_request || github.event.issue.pull_request) && steps.checkLabel.outputs.hasLabel
  34. continue-on-error: true
  35. with:
  36. project: Current Release
  37. column: In progress
  38. repo-token: ${{ secrets.GH_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@v0.6.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.GH_TOKEN }}
  51. - name: Add issue to triage project
  52. uses: alex-page/github-project-automation-plus@v0.6.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.GH_TOKEN }}