From 47ab655404edd0f5629617ff95b623a3b280f722 Mon Sep 17 00:00:00 2001 From: Vishakh Pillai Date: Tue, 28 Jul 2026 11:27:18 -0400 Subject: [PATCH 1/2] fix: don't let flaky Asana API block PR merges Co-authored-by: Cursor --- .github/workflows/link-asana-task.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/link-asana-task.yml b/.github/workflows/link-asana-task.yml index e435019..a6dfdcc 100644 --- a/.github/workflows/link-asana-task.yml +++ b/.github/workflows/link-asana-task.yml @@ -34,7 +34,12 @@ jobs: core.setFailed("PR description must include an Asana task URL."); } + # Best-effort: this only links the PR as an Asana attachment, it doesn't gate + # the merge requirement above. The Asana API is occasionally slow/unresponsive, + # so we cap the wait and don't let a flaky third-party call block merges. - if: steps.gate.outputs.skip != 'true' + timeout-minutes: 2 + continue-on-error: true uses: Asana/create-app-attachment-github-action@v1.3 with: asana-secret: ${{ secrets.ASANA_SECRET }} From 7276dfd86907630f7a38272bd0faa10530332304 Mon Sep 17 00:00:00 2001 From: Vishakh Pillai Date: Tue, 28 Jul 2026 11:45:53 -0400 Subject: [PATCH 2/2] fix: accept Asana task links copied without a project segment Co-authored-by: Cursor --- .github/workflows/link-asana-task.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/link-asana-task.yml b/.github/workflows/link-asana-task.yml index a6dfdcc..b443427 100644 --- a/.github/workflows/link-asana-task.yml +++ b/.github/workflows/link-asana-task.yml @@ -29,7 +29,11 @@ jobs: with: script: | const body = context.payload.pull_request.body || ""; - const urlPattern = /https:\/\/app\.asana\.com\/(?:0\/(?:0|[0-9]+)\/(?:task\/)?([0-9]+)|1\/[0-9]+\/project\/[0-9]+\/task\/([0-9]+))/i; + // Accepts both legacy (app.asana.com/0/...) and current-UI + // (app.asana.com/1//[project//]task/) permalinks. + // The project segment is optional: Asana omits it when a task link is + // copied from a project-less context (My Tasks, Inbox, search, etc). + const urlPattern = /https:\/\/app\.asana\.com\/(?:0\/(?:0|[0-9]+)\/(?:task\/)?([0-9]+)|1\/[0-9]+\/(?:project\/[0-9]+\/)?task\/([0-9]+))/i; if (!body.match(urlPattern)) { core.setFailed("PR description must include an Asana task URL."); }