Skip to content

Mechanically extract the existing reviewer gate - #484

Open
Parth Aggarwal (parth21999) wants to merge 3 commits into
masterfrom
paaggarwal-microsoft-reviewer-gate-action
Open

Parth Aggarwal (parth21999) wants to merge 3 commits into
masterfrom
paaggarwal-microsoft-reviewer-gate-action

Conversation

@parth21999

@parth21999 Parth Aggarwal (parth21999) commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Converts the existing workflow's reviewer-gate logic into a shared composite action. The Bash policy and comments remain unchanged, with minimal input wiring to preserve existing defaults. The existing workflow is unchanged and remains active; this PR does not switch execution.

The action allows a workflow to fetch and execute a trusted version selected at runtime. Workflows are still needed for events, runners, and permissions. Consumers will reuse this same centrally maintained action rather than separate gate implementations.

Further work

  1. Add any separately reviewed snapshot and failure-handling safeguards required for runtime loading.
  2. Update c-build-tools' workflow to load the action from the PR's trusted target branch.
  3. Update consumer dependencies and install thin caller workflows that use the target branch's deps/c-build-tools SHA.

This PR adds only .github/actions/two-human-reviewers/action.yml. Verified: byte-identical dedented Bash, Bash syntax, and input/default compatibility. No caller, policy, or dependency changes are included.

Extract the existing gate without changing production callers. Add an opt-in head/target snapshot contract, fail closed on shared-PR API errors, and exercise the real Bash with 64 offline fixtures and read-only CI.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@parth21999

Copy link
Copy Markdown
Member Author

/AzurePipelines run

@azure-pipelines

Copy link
Copy Markdown
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@parth21999

Copy link
Copy Markdown
Member Author

/azp run Azure-C-Build-Tools-Gate

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@parth21999

Parth Aggarwal (parth21999) commented Nov 6, 2026 •

Copy link
Copy Markdown
Member Author

seems like a lot of code to do something simple. Can we do it more simply? #Closed


Refers to: .github/actions/two-human-reviewers/action.yml:208 in 6eabcd4. [](commit_id = 6eabcd4, deletion_comment = False)

Keep only the new composite action and copy the existing master workflow Bash verbatim. Remove the snapshot API, runtime hardening, extra documentation, and fixture infrastructure from this prerequisite PR.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@parth21999

Copy link
Copy Markdown
Member Author

/AzurePipelines run

@azure-pipelines

Copy link
Copy Markdown
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@parth21999

Copy link
Copy Markdown
Member Author

/azp run Azure-C-Build-Tools-Gate

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Coerce the composite string input before applying the original default so omitted, empty, and zero values still require two approvals. Keep the original Bash block byte-for-byte unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@parth21999 Parth Aggarwal (parth21999) changed the title Extract reviewer gate action with snapshot guards Mechanically extract the existing reviewer gate Nov 6, 2026
@parth21999

Copy link
Copy Markdown
Member Author

/AzurePipelines run

@azure-pipelines

Copy link
Copy Markdown
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list.

@parth21999

Copy link
Copy Markdown
Member Author

/azp run Azure-C-Build-Tools-Gate

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

auto-merge was automatically disabled November 7, 2026 00:15

Pull request removed from stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant