Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/pr-e2e-gate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ run-name: >-
github.event.pull_request.number, github.event.pull_request.head.sha,
github.event.pull_request.base.sha,
github.event.action != 'closed') ||
format('E2E Gate {0} {1}', github.event_name, github.run_id) }}
github.event_name == 'workflow_run' &&
format('E2E Gate coordinate from {0}',
github.event.workflow_run.display_title) ||
format('E2E Gate approve PR #{0} head {1} base {2}',
inputs.pr_number, inputs.expected_head_sha, inputs.expected_base_sha) }}

on:
workflow_run:
Expand Down
5 changes: 5 additions & 0 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,9 @@ and advisor concurrency groups include that eligibility, so an ignored
metadata-edit run cannot cancel an eligible run for the same PR. The trusted
controller reads all changed files after eligible PR CI completes and builds
the deterministic risk plan.
The controller's Actions run name carries that CI display title so operators
can distinguish simultaneous PR, head, and base identities even when the event
omits pull-request metadata.
Runtime families and changes to workflow-wired live tests or their owning
helpers select canonical jobs from the trusted `e2e.yaml` inventory
independently of advisor output. A workflow-wired live test or owning helper
Expand Down Expand Up @@ -796,6 +799,8 @@ commit SHA, base SHA, selected jobs and targets, and
maintainer then chooses **Run workflow** on `main`, selects `approve-e2e`, and
supplies the PR number, recorded head SHA, recorded base SHA, and a specific
review reason.
The manual controller run name includes the supplied PR, head, and base
identity for operator coordination.
GitHub supplies the triggering actor; the controller requires that account to
have current `maintain` or `admin` permission.

Expand Down
17 changes: 11 additions & 6 deletions test/pr-e2e-gate-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ const HEAD_SHA = "a".repeat(40);
const BASE_SHA = "b".repeat(40);
const WORKFLOW_SHA = "d".repeat(40);
const TRUSTED_SETUP_NODE_ACTION = "actions/setup-node@820762786026740c76f36085b0efc47a31fe5020";
const PR_GATE_RUN_NAME = [
"${{ github.event_name == 'pull_request_target' &&",
"format('E2E Gate PR #{0} head {1} base {2} gate {3}',",
"github.event.pull_request.number, github.event.pull_request.head.sha,",
"github.event.pull_request.base.sha, github.event.action != 'closed') ||",
"github.event_name == 'workflow_run' &&",
"format('E2E Gate coordinate from {0}', github.event.workflow_run.display_title) ||",
"format('E2E Gate approve PR #{0} head {1} base {2}',",
"inputs.pr_number, inputs.expected_head_sha, inputs.expected_base_sha) }}",
].join(" ");

type CoordinatorJob = WorkflowJob & {
concurrency?: { group: string; queue?: "max"; "cancel-in-progress": boolean };
Expand Down Expand Up @@ -276,12 +286,7 @@ describe("PR E2E gate workflow", () => {
const observerPollMinutes = 21_480 / 60;

expect(workflow.name).toBe("E2E / PR Gate Controller");
expect(workflow["run-name"]).toContain("E2E Gate PR #{0} head {1} base {2} gate {3}");
expect(workflow["run-name"]).toContain("github.event.pull_request.number");
expect(workflow["run-name"]).toContain("github.event.pull_request.head.sha");
expect(workflow["run-name"]).toContain("github.event.pull_request.base.sha");
expect(workflow["run-name"]).toContain("github.event.action != 'closed'");
expect(workflow["run-name"]).not.toContain("github.event.changes.base != null");
expect(workflow["run-name"]).toBe(PR_GATE_RUN_NAME);
expect(workflow.on).toEqual({
workflow_run: {
workflows: ["CI / Pull Request"],
Expand Down
Loading