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

Commit

Permalink
Update workflow to simplify steps
Browse files Browse the repository at this point in the history
Signed-off-by: zFernand0 <[email protected]>
  • Loading branch information
zFernand0 committed Jan 9, 2024
1 parent cfc1260 commit 52e958e
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: 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.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 52e958e

Please sign in to comment.