Skip to content

Commit

Permalink
ci: Add some additional GH project automation
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Sep 6, 2024
1 parent a8e5f59 commit adc5fb7
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/project-automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
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 }}

0 comments on commit adc5fb7

Please sign in to comment.