Skip to content

Commit

Permalink
Update workflow to simplify steps
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <[email protected]>
  • Loading branch information
t1m0thyj committed Jan 9, 2024
1 parent 8fcb3bd commit d1d58f2
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/update-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,26 @@ on:

env:
PROJECT_NUMBER: 21
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.pull_request }}
with:
assign-author: true
item-status: ${{ github.event.action == 'ready_for_review' && 'Review/QA' || 'In Progress' }}
project-number: ${{ env.PROJECT_NUMBER }}
project-token: ${{ secrets.ZOWE_ROBOT_TOKEN }}

- uses: zowe-actions/shared-actions/project-move-item@main
if: ${{ github.event.issue && github.event.label.name == 'priority-high' }}
if: ${{ github.event.issue && fromJSON(env.ISSUE_STATUSES)[github.event.label.name] }}
with:
item-status: High Priority
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.issue && github.event.label.name == 'priority-medium' }}
with:
item-status: Medium Priority
project-number: ${{ env.PROJECT_NUMBER }}
project-token: ${{ secrets.ZOWE_ROBOT_TOKEN }}

- uses: zowe-actions/shared-actions/project-move-item@main
if: ${{ github.event.issue && github.event.label.name == 'priority-low' }}
with:
item-status: Low Priority
project-number: ${{ env.PROJECT_NUMBER }}
project-token: ${{ secrets.ZOWE_ROBOT_TOKEN }}

- uses: zowe-actions/shared-actions/project-move-item@main
if: ${{ github.event.issue && github.event.label.name == 'Epic' }}
if: ${{ github.event.pull_request }}
with:
item-status: Epics
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 d1d58f2

Please sign in to comment.