2021-03-09 20:13:27 +00:00
|
|
|
name: Automation
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
main:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Does PR has the stable backport label?
|
|
|
|
uses: Dreamcodeio/does-pr-has-label@v1.2
|
|
|
|
id: checkLabel
|
|
|
|
with:
|
|
|
|
label: stable backport
|
|
|
|
|
|
|
|
- name: Remove from 'Current Release' project
|
2021-05-03 12:03:25 +00:00
|
|
|
uses: alex-page/github-project-automation-plus@v0.7.1
|
2021-03-09 20:13:27 +00:00
|
|
|
if: (github.event.pull_request || github.event.issue.pull_request) && !steps.checkLabel.outputs.hasLabel
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
project: Current Release
|
|
|
|
action: delete
|
|
|
|
repo-token: ${{ secrets.GH_TOKEN }}
|
|
|
|
|
|
|
|
- name: Add to 'Release Next' project
|
2021-05-03 12:03:25 +00:00
|
|
|
uses: alex-page/github-project-automation-plus@v0.7.1
|
2021-03-09 20:13:27 +00:00
|
|
|
if: (github.event.pull_request || github.event.issue.pull_request) && github.event.action == 'opened'
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
project: Release Next
|
|
|
|
column: In progress
|
|
|
|
repo-token: ${{ secrets.GH_TOKEN }}
|
|
|
|
|
|
|
|
- name: Add to 'Current Release' project
|
2021-05-03 12:03:25 +00:00
|
|
|
uses: alex-page/github-project-automation-plus@v0.7.1
|
2021-03-09 20:13:27 +00:00
|
|
|
if: (github.event.pull_request || github.event.issue.pull_request) && steps.checkLabel.outputs.hasLabel
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
project: Current Release
|
|
|
|
column: In progress
|
|
|
|
repo-token: ${{ secrets.GH_TOKEN }}
|
|
|
|
|
|
|
|
- name: Check number of comments from the team member
|
|
|
|
if: github.event.issue.pull_request == '' && github.event.comment.author_association == 'MEMBER'
|
|
|
|
id: member_comments
|
|
|
|
run: echo "::set-output name=number::$(curl -s ${{ github.event.issue.comments_url }} | jq '.[] | select(.author_association == "MEMBER") | .author_association' | wc -l)"
|
|
|
|
|
|
|
|
- name: Move issue to needs triage
|
2021-05-03 12:03:25 +00:00
|
|
|
uses: alex-page/github-project-automation-plus@v0.7.1
|
2021-03-09 20:13:27 +00:00
|
|
|
if: github.event.issue.pull_request == '' && github.event.comment.author_association == 'MEMBER' && steps.member_comments.outputs.number <= 1
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
project: Issue Triage for Main Repo
|
|
|
|
column: Needs triage
|
|
|
|
repo-token: ${{ secrets.GH_TOKEN }}
|
|
|
|
|
|
|
|
- name: Add issue to triage project
|
2021-05-03 12:03:25 +00:00
|
|
|
uses: alex-page/github-project-automation-plus@v0.7.1
|
2021-03-09 20:13:27 +00:00
|
|
|
if: github.event.issue.pull_request == '' && github.event.action == 'opened'
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
project: Issue Triage for Main Repo
|
|
|
|
column: Pending response
|
|
|
|
repo-token: ${{ secrets.GH_TOKEN }}
|