Skip to content

Commit

Permalink
ci: update asana workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
meagharty committed Feb 21, 2024
1 parent 0f4b647 commit e0f90c3
Showing 1 changed file with 16 additions and 34 deletions.
50 changes: 16 additions & 34 deletions .github/workflows/asana.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,20 @@
name: Asana integration for Github PRs
on:
name: Asana integration for GitHub PRs
on:
workflow_dispatch:
pull_request:
types: [closed, edited, opened, reopened]
types: [review_requested, closed, opened, reopened, converted_to_draft, edited, ready_for_review]
pull_request_review:
types: [submitted]

jobs:
move-to-merged-asana-ticket-job:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- name: Github-Asana action from Insurify
uses: insurify/github-asana-action@v1.0.3
with:
asana-pat: ${{ secrets.ASANA_PERSONAL_ACCESS_TOKEN }}
trigger-phrase: "\\*\\*Asana Ticket:\\*\\*"
targets: '[{"project": "TRC - Sprint", "section": "Merged / Not Deployed"}]'
move-to-in-review-asana-ticket-job:
runs-on: ubuntu-latest
if: github.event.pull_request.merged != true
steps:
- name: Github-Asana action from Insurify
uses: insurify/github-asana-action@v1.0.3
with:
asana-pat: ${{ secrets.ASANA_PERSONAL_ACCESS_TOKEN }}
trigger-phrase: "\\*\\*Asana Ticket:\\*\\*"
targets: '[{"project": "TRC - Sprint", "section": "In Review"}]'
create-asana-attachment-job:
runs-on: ubuntu-latest
name: Create pull request attachments on Asana tasks
steps:
- name: Create pull request attachments
uses: Asana/create-app-attachment-github-action@latest
id: postAttachment
with:
asana-secret: ${{ secrets.ASANA_GITHUB_INTEGRATION_SECRET }}
- name: Log output status
run: echo "Status is ${{ steps.postAttachment.outputs.status }}"
call-workflow:
uses: mbta/workflows/.github/workflows/asana.yml@main
with:
development-section: "In Development"
review-section: "Pending Review"
merged-section: "Merged / Not Deployed"
trigger-phrase: "\\*\\*Asana Ticket:\\*\\*"
attach-pr: true
secrets:
asana-token: ${{ secrets.ASANA_PERSONAL_ACCESS_TOKEN }}
github-secret: ${{ secrets.ASANA_GITHUB_INTEGRATION_SECRET }}

0 comments on commit e0f90c3

Please sign in to comment.