From 063a37f5bb643df224a92f9c29bdb73ed182ad58 Mon Sep 17 00:00:00 2001 From: meagharty <149533950+meagharty@users.noreply.github.com> Date: Tue, 2 Jan 2024 11:35:12 -0500 Subject: [PATCH] feat(asana): add support for moving an asana task to a development section (#20) --- .github/workflows/asana.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/asana.yml b/.github/workflows/asana.yml index 320807a..5260bab 100644 --- a/.github/workflows/asana.yml +++ b/.github/workflows/asana.yml @@ -1,6 +1,10 @@ on: workflow_call: inputs: + development-section: + type: string + required: false + description: The Asana project section for tickets with PRs that are in development. Requires secrets.asana-token. merged-section: type: string required: false @@ -40,6 +44,17 @@ jobs: [ -n "${{ secrets.asana-token }}" ] && echo "has-asana-token=yes" >> "$GITHUB_OUTPUT" [ -n "${{ secrets.github-secret }}" ] && echo "has-github-secret=yes" >> "$GITHUB_OUTPUT" cat "$GITHUB_OUTPUT" + move-to-in-development-asana-ticket-job: + runs-on: ubuntu-latest + needs: check-for-secrets + if: inputs.development-section != '' && needs.check-for-secrets.outputs.has-asana-token == 'yes' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.actor != 'dependabot[bot]' + steps: + - name: Move ticket to In Development + uses: mbta/github-asana-action@v4.3.0 + with: + asana-pat: ${{ secrets.asana-token }} + trigger-phrase: ${{ inputs.trigger-phrase }} + target-section: ${{ inputs.development-section }} move-to-merged-asana-ticket-job: runs-on: ubuntu-latest needs: check-for-secrets