From 0776e3f94e8762a59631e1de9e0b9350bbd4dbc9 Mon Sep 17 00:00:00 2001 From: MarkoAleksandric Date: Wed, 15 Jul 2026 12:39:43 +0200 Subject: [PATCH] implement flow --- .github/workflows/ExtReqImplementDispatch.yml | 54 +++++++++++++++++++ .../argus-extensibility-triage-feedback.yml | 2 +- .../argus-extensibility-triage-scheduled.yml | 4 +- 3 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ExtReqImplementDispatch.yml diff --git a/.github/workflows/ExtReqImplementDispatch.yml b/.github/workflows/ExtReqImplementDispatch.yml new file mode 100644 index 0000000000..01e42a5581 --- /dev/null +++ b/.github/workflows/ExtReqImplementDispatch.yml @@ -0,0 +1,54 @@ +name: ExtReqImplementDispatch + +# Template workflow for the SOURCE issue repository (for example +# microsoft/ALAppExtensions). When the guard label is added to an open issue, +# this workflow starts the target fix workflow in microsoft/BCAppsBugFix. +# +# Move this file to the source repository and configure: +# - secrets.EXT_REQ_DISPATCH_TOKEN (PAT with access to target repo) + +on: + issues: + types: [labeled] + +permissions: + contents: read + +concurrency: + group: ai-ext-fix-dispatch-${{ github.repository }}-${{ github.event.issue.number }} + cancel-in-progress: false + +env: + FIX_LABEL: ext-ready-to-implement + TARGET_REPO: microsoft/BCAppsBugFix + TARGET_WORKFLOW: ExtReqImplement.yaml + TARGET_REF: main + +jobs: + dispatch: + if: >- + github.event.issue.state == 'open' && + github.event.label.name == env.FIX_LABEL + runs-on: ubuntu-latest + steps: + - name: Validate PAT secret + env: + GH_TOKEN: ${{ secrets.EXT_REQ_DISPATCH_TOKEN }} + run: | + set -euo pipefail + if [ -z "${GH_TOKEN:-}" ]; then + echo "EXT_REQ_DISPATCH_TOKEN is required." >&2 + exit 1 + fi + + - name: Start the target fix workflow + env: + GH_TOKEN: ${{ secrets.EXT_REQ_DISPATCH_TOKEN }} + SOURCE_REPO: ${{ github.repository }} + ISSUE_NUMBER: ${{ github.event.issue.number }} + run: | + set -euo pipefail + gh workflow run "$TARGET_WORKFLOW" -R "$TARGET_REPO" --ref "$TARGET_REF" \ + -f source_repo="$SOURCE_REPO" \ + -f issue_number="$ISSUE_NUMBER" \ + -f label="$FIX_LABEL" diff --git a/.github/workflows/argus-extensibility-triage-feedback.yml b/.github/workflows/argus-extensibility-triage-feedback.yml index 32cf91e360..a77e443070 100644 --- a/.github/workflows/argus-extensibility-triage-feedback.yml +++ b/.github/workflows/argus-extensibility-triage-feedback.yml @@ -124,7 +124,7 @@ jobs: # ── Step 3: Log telemetry ──────────────────────────────────────────────── - name: Azure login (OIDC) if: steps.detect.outputs.skip == 'false' && steps.context.outputs.skip == 'false' - uses: azure/login@v2 + uses: azure/login@v3 with: client-id: ${{ secrets.AZURE_CLIENT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }} diff --git a/.github/workflows/argus-extensibility-triage-scheduled.yml b/.github/workflows/argus-extensibility-triage-scheduled.yml index 5d683c049a..4bba0cebab 100644 --- a/.github/workflows/argus-extensibility-triage-scheduled.yml +++ b/.github/workflows/argus-extensibility-triage-scheduled.yml @@ -161,7 +161,7 @@ jobs: run: chmod +x _triage-src/internal/Argus_Triage_Extensibility_Requests/scripts/process-issue.sh - name: Azure login (OIDC) - uses: azure/login@v2 + uses: azure/login@v3 with: client-id: ${{ secrets.AZURE_CLIENT_ID }} tenant-id: ${{ secrets.AZURE_TENANT_ID }} @@ -180,7 +180,7 @@ jobs: - name: Upload result artifact if: always() - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v7 with: name: argus-result-${{ github.run_id }}-issue-${{ matrix.issue }} path: _triage-src/internal/Argus_Triage_Extensibility_Requests/data/argus_result.json