ci: Add some additional GH project automation #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Automation: Update GH Project" | |
on: | |
pull_request: | |
types: | |
- closed | |
- opened | |
- reopened | |
- ready_for_review | |
jobs: | |
# When a PR is a draft, it should go into "In Progress" | |
mark_as_in_progress: | |
if: | | |
(github.event.action == 'opened' || github.event.action == 'reopened') | |
&& github.event.pull_request.draft == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update status to in_progress | |
id: update_status | |
uses: peter-evans/create-or-update-project-card@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
project-location: getsentry | |
project-number: 31 | |
column-name: "🏗 In Progress" | |
issue-number: ${{ github.event.number }} | |
# When a PR is not a draft, it should go into "In Review" | |
mark_as_in_review: | |
if: | | |
(github.event.action == 'opened' || github.event.action == 'reopened' || github.event.action == 'ready_for_review') | |
&& github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update status to in_review | |
id: update_status | |
uses: peter-evans/create-or-update-project-card@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
project-location: getsentry | |
project-number: 31 | |
column-name: "👀 In Review" | |
issue-number: ${{ github.event.number }} | |
# By default, closed PRs go into "Ready for Release" | |
# But if they are closed without merging, they should go into "Done" | |
mark_as_done: | |
if: | | |
github.event.action == 'closed' && github.event.pull_request.merged == false | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update status to done | |
id: update_status | |
uses: peter-evans/create-or-update-project-card@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
project-location: getsentry | |
project-number: 31 | |
column-name: "✅ Done" | |
issue-number: ${{ github.event.number }} |