Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #336 from zowe/ci/add-pr-to-project
Browse files Browse the repository at this point in the history
Add workflow to update issue and PR status on GH project board
  • Loading branch information
zFernand0 authored Jan 9, 2024
2 parents 9c15337 + 52e958e commit 98ca8f3
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/update-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Update GitHub Project

on:
issues:
types: [labeled]
pull_request_target:
types: [opened, reopened, converted_to_draft, ready_for_review]

env:
PROJECT_NUMBER: 15
ISSUE_STATUSES: '{"priority-high": "High Priority", "priority-medium": "Medium Priority", "priority-low": "Low Priority", "Epic": "Epics"}'
PR_STATUS_DRAFT: 'In Progress'
PR_STATUS_READY: 'Review/QA'

jobs:
update-project:
name: Move project item
runs-on: ubuntu-latest
steps:
- uses: zowe-actions/shared-actions/project-move-item@main
if: ${{ github.event.issue && fromJSON(env.ISSUE_STATUSES)[github.event.label.name] }}
with:
item-status: ${{ fromJSON(env.ISSUE_STATUSES)[github.event.label.name] }}
project-number: ${{ env.PROJECT_NUMBER }}
project-token: ${{ secrets.ZOWE_ROBOT_TOKEN }}

- uses: zowe-actions/shared-actions/project-move-item@main
if: ${{ github.event.pull_request }}
with:
assign-author: true
item-status: ${{ github.event.action == 'ready_for_review' && env.PR_STATUS_READY || env.PR_STATUS_DRAFT }}
project-number: ${{ env.PROJECT_NUMBER }}
project-token: ${{ secrets.ZOWE_ROBOT_TOKEN }}

0 comments on commit 98ca8f3

Please sign in to comment.