Skip to content

Commit

Permalink
feat(asana): add approved-section when PR is approved
Browse files Browse the repository at this point in the history
  • Loading branch information
meagharty committed Jan 22, 2024
1 parent 1c8f002 commit 81900b3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/asana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
type: string
required: false
description: The Asana project section for tickets with PRs that have a review requested. Requires secrets.asana-token.
approved-section:
type: string
required: false
description: The Asana project section for tickets with PRs that have been approved. Requires secrets.asana-token.
complete-on-merge:
type: boolean
default: false
Expand Down Expand Up @@ -78,6 +82,17 @@ jobs:
asana-pat: ${{ secrets.asana-token }}
trigger-phrase: ${{ inputs.trigger-phrase }}
target-section: ${{ inputs.review-section }}
move-to-approved-asana-ticket-job:
runs-on: ubuntu-latest
needs: check-for-secrets
if: inputs.approved-section != '' && needs.check-for-secrets.outputs.has-asana-token == 'yes' && github.event.action == 'submitted' && github.event.review.state == 'approved' && !github.event.pull_request.draft && github.actor != 'dependabot[bot]'
steps:
- name: Move ticket on approval
uses: mbta/[email protected]
with:
asana-pat: ${{ secrets.asana-token }}
trigger-phrase: ${{ inputs.trigger-phrase }}
target-section: ${{ inputs.approved-section }}
create-asana-attachment-job:
runs-on: ubuntu-latest
needs: check-for-secrets
Expand Down

0 comments on commit 81900b3

Please sign in to comment.