From fab6ddb5c9e5d1a3fe1b8a44207f83aa57f323ad Mon Sep 17 00:00:00 2001 From: stephaniezyen <77693576+stephaniezyen@users.noreply.github.com> Date: Wed, 18 Mar 2026 11:41:54 -0700 Subject: [PATCH 1/4] Add workflow to assign reviewers for external PRs Creating a workflow to assign engineers to external PRs. We are limiting this workflow to: - non-dependabot PRs - non-internal PRs (marked with 'MEMBER' tag) We are utilizing github's assignment script. This will automatically apply round-robin assignment for everyone in the "Bicep External Maintainers" team. Written with help from Copilot :) --- .../external-pr-review-assignment.yml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/external-pr-review-assignment.yml diff --git a/.github/workflows/external-pr-review-assignment.yml b/.github/workflows/external-pr-review-assignment.yml new file mode 100644 index 00000000000..4db1725a4aa --- /dev/null +++ b/.github/workflows/external-pr-review-assignment.yml @@ -0,0 +1,30 @@ +name: Assign reviewers for external PRs + +on: + pull_request_target: + types: [opened, ready_for_review, reopened] + +permissions: + pull-requests: write + contents: read + +jobs: + assign-reviewers: + # THe 'if' statement below will exclude Dependabot PRs and Internal ('MEMBER') PRs + if: > + github.actor != 'dependabot[bot]' && + github.event.pull_request.author_association != 'MEMBER' && + github.event.pull_request.head.repo.fork + runs-on: ubuntu-latest + # The job below will use the built-in "Request reviewers for a pull request" script to assign reviewers + steps: + - name: Assign reviewer from Bicep External Maintainers team + uses: actions/github-script@v7 + with: + script: | + await github.rest.pulls.requestReviewers({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + team_reviewers: ['bicep-external-maintainers'] + }) From 49fb710f84a4865a61958d2ab581661e7d4a272e Mon Sep 17 00:00:00 2001 From: stephaniezyen <77693576+stephaniezyen@users.noreply.github.com> Date: Wed, 20 May 2026 12:51:02 -0700 Subject: [PATCH 2/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/external-pr-review-assignment.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/external-pr-review-assignment.yml b/.github/workflows/external-pr-review-assignment.yml index 4db1725a4aa..ce976e8159d 100644 --- a/.github/workflows/external-pr-review-assignment.yml +++ b/.github/workflows/external-pr-review-assignment.yml @@ -10,10 +10,12 @@ permissions: jobs: assign-reviewers: - # THe 'if' statement below will exclude Dependabot PRs and Internal ('MEMBER') PRs + # The 'if' statement below will exclude Dependabot PRs and internal PRs if: > - github.actor != 'dependabot[bot]' && + github.actor != 'dependabot[bot]' && github.event.pull_request.author_association != 'MEMBER' && + github.event.pull_request.author_association != 'OWNER' && + github.event.pull_request.author_association != 'COLLABORATOR' && github.event.pull_request.head.repo.fork runs-on: ubuntu-latest # The job below will use the built-in "Request reviewers for a pull request" script to assign reviewers From e16c2857fc313a189c8f655e736b244faa9bd272 Mon Sep 17 00:00:00 2001 From: stephaniezyen <77693576+stephaniezyen@users.noreply.github.com> Date: Wed, 20 May 2026 12:52:20 -0700 Subject: [PATCH 3/4] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/external-pr-review-assignment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/external-pr-review-assignment.yml b/.github/workflows/external-pr-review-assignment.yml index ce976e8159d..301b135f0fe 100644 --- a/.github/workflows/external-pr-review-assignment.yml +++ b/.github/workflows/external-pr-review-assignment.yml @@ -6,7 +6,6 @@ on: permissions: pull-requests: write - contents: read jobs: assign-reviewers: From dd49ad689da5a60905cabe6d8dc5d79a85936595 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 19:55:04 +0000 Subject: [PATCH 4/4] Skip draft PRs in external reviewer assignment workflow Agent-Logs-Url: https://github.com/Azure/bicep/sessions/39574ccf-4cb6-4daf-8c50-a2c3b8b53e45 Co-authored-by: stephaniezyen <77693576+stephaniezyen@users.noreply.github.com> --- .github/workflows/external-pr-review-assignment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/external-pr-review-assignment.yml b/.github/workflows/external-pr-review-assignment.yml index 301b135f0fe..e96e157e8ce 100644 --- a/.github/workflows/external-pr-review-assignment.yml +++ b/.github/workflows/external-pr-review-assignment.yml @@ -12,6 +12,7 @@ jobs: # The 'if' statement below will exclude Dependabot PRs and internal PRs if: > github.actor != 'dependabot[bot]' && + !github.event.pull_request.draft && github.event.pull_request.author_association != 'MEMBER' && github.event.pull_request.author_association != 'OWNER' && github.event.pull_request.author_association != 'COLLABORATOR' &&