Skip to content

Commit

Permalink
feat(asana): add approved-section when PR is approved (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
meagharty authored Feb 7, 2024
1 parent b6ee5ab commit dc7fe53
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 @@ -9,6 +9,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.
merged-section:
type: string
required: 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 dc7fe53

Please sign in to comment.