Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update asana workflow #340

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
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/[email protected]
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 }}
Loading