Skip to content

Commit

Permalink
Last update before v0.0.1 (#41)
Browse files Browse the repository at this point in the history
* test: the happy path

Closes #21 .

* fix: remove skipped update check

* feat: close linked issue once pr merged
  • Loading branch information
gordsport authored Jun 5, 2022
1 parent 42876fe commit e7e587c
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/project_board_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ jobs:
- name: 'Reopen if the linked issue closed'
id: reopen-issue
if: steps.issue-to-project.outcome == 'success' && env.LINKED_ISSUE_STATE == '"CLOSED"'
env:
ISSUE: ${{ env.LINKED_ISSUE_ID }}
PR_AUTHOR: ${{ env.AUTHOR_ID }}
run: |
gh api graphql -f query='
mutation($clientMutationId:String!, $issueId:ID!) {
Expand All @@ -243,8 +240,7 @@ jobs:
id
}
}
}' -f clientMutationId=${{ env.PR_AUTHOR }} \
-f issueId=${{ env.ISSUE }}
}' -f clientMutationId=$AUTHOR_ID -f issueId=$LINKED_ISSUE_ID
# check the env vars before the update to help debugging
- run: env
Expand Down Expand Up @@ -292,6 +288,19 @@ jobs:
echo 'ITEM_ID='${{ env.BOARD_ITEM_ID }} >> $GITHUB_ENV
echo 'CURRENT_STATUS='${{ env.MERGED_COLUMN }} >> $GITHUB_ENV
- name: 'Close linked issue when PR mergd'
id: close-issue
if: steps.merged.outcome == 'success' && steps.linked.outcome == 'success'
run: |
gh api graphql -f query='
mutation($clientMutationId:String!, $issueId:ID!) {
closeIssue(input: {clientMutationId:$clientMutationId, issueId:$issueId}) {
issue{
id
}
}
}' -f clientMutationId=$AUTHOR_ID -f issueId=$LINKED_ISSUE_ID
#######
## Take the set item fields, update and move the item on the board
#######
Expand Down

0 comments on commit e7e587c

Please sign in to comment.