From 57962c7a47cdb4308bb1930c446194131fa4de6f Mon Sep 17 00:00:00 2001 From: Cora Grant Date: Thu, 19 Dec 2024 15:59:36 -0500 Subject: [PATCH] ci: switch to MBTA Asana GitHub workflow --- .github/workflows/asana-merged.yml | 16 ---------------- .github/workflows/asana-pr-opened.yml | 27 --------------------------- .github/workflows/asana.yml | 22 ++++++++++++++++++++++ 3 files changed, 22 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/asana-merged.yml delete mode 100644 .github/workflows/asana-pr-opened.yml create mode 100644 .github/workflows/asana.yml diff --git a/.github/workflows/asana-merged.yml b/.github/workflows/asana-merged.yml deleted file mode 100644 index 36fd252d7..000000000 --- a/.github/workflows/asana-merged.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Move Asana ticket after merge -on: - pull_request: - types: [closed] - -jobs: - move-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_SECRET_FOR_INSURIFY_ACTION }} - trigger-phrase: "\\*\\*Asana task\\*\\*:" - targets: '[{"project": "Screens Dev - Sprint", "section": "Ready to Deploy"}]' diff --git a/.github/workflows/asana-pr-opened.yml b/.github/workflows/asana-pr-opened.yml deleted file mode 100644 index 62ba74f5d..000000000 --- a/.github/workflows/asana-pr-opened.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Move Asana ticket after PR opened -on: - pull_request: - types: [opened, reopened] - -jobs: - move-asana-ticket-job: - runs-on: ubuntu-latest - steps: - - name: Github-Asana action from Insurify - uses: insurify/github-asana-action@v1.0.3 - with: - asana-pat: ${{ secrets.ASANA_SECRET_FOR_INSURIFY_ACTION }} - trigger-phrase: "\\*\\*Asana task\\*\\*:" - targets: '[{"project": "Screens Dev - Sprint", "section": "In Review"}]' - create-asana-attachment-job: - if: contains(github.event.pull_request.body, 'https://app.asana.com') - 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@v1.3 - id: postAttachment - with: - asana-secret: ${{ secrets.ASANA_GITHUB_INTEGRATION_SECRET }} - - name: Log output status - run: echo "Status is ${{ steps.postAttachment.outputs.status }}" diff --git a/.github/workflows/asana.yml b/.github/workflows/asana.yml new file mode 100644 index 000000000..99f4c25ad --- /dev/null +++ b/.github/workflows/asana.yml @@ -0,0 +1,22 @@ +name: Asana integration +on: + pull_request: + types: + - closed + - converted_to_draft + - opened + - ready_for_review + - reopened + +jobs: + asana: + uses: mbta/workflows/.github/workflows/asana.yml@v3 + with: + development-section: In Progress + review-section: In Review + merged-section: Ready to Deploy + attach-pr: true + trigger-phrase: "\\*\\*Asana task\\*\\*:" + secrets: + asana-token: ${{ secrets.ASANA_SECRET_FOR_INSURIFY_ACTION }} + github-secret: ${{ secrets.ASANA_GITHUB_INTEGRATION_SECRET }}