Skip to content

fix(DOPS-12542): inline the auto-approve bridge (public repo can't call internal reusable) - #77

Merged
chkp-adirb merged 2 commits into
masterfrom
chore/DOPS-12542-inline-bridge
Aug 12, 2026
Merged

fix(DOPS-12542): inline the auto-approve bridge (public repo can't call internal reusable)#77
chkp-adirb merged 2 commits into
masterfrom
chore/DOPS-12542-inline-bridge

Conversation

@chkp-yossefk

Copy link
Copy Markdown
Contributor

Why

The bridge stub called a reusable workflow in CheckPointSW/.github (internal). GitHub forbids a public repo from calling a reusable workflow in a private/internal repo, so the validator Lambda's workflow_dispatch failed:

422 ... error parsing called workflow "CheckPointSW/.github/.github/workflows/auto-approve-bridge.yml@main": workflow was not found

(an access error — the internal repo's "Access" setting only shares with private/internal callers, never public ones).

What

Inline the full bridge body into this workflow (no reusable uses:):
verify head sha + pinned validator-App success check → enable auto-merge (queue) → approve as github-actions[bot] (write access → the approval counts).

  • runs-on: checkpointsw-scaleset (no GitHub-hosted runners here). Dispatch-only + if: github.ref_name == default_branch guard keep untrusted PR code off the self-hosted runner.
  • Reads AUTO_APPROVER_APP_ID from the org secret directly (no secrets: inherit needed without the reusable call).
  • Same jq data-binding / app.id pin / input validation as before.

Depends on (admin)

  • Org secret AUTO_APPROVER_APP_ID visible to this public repo.
  • checkpointsw-scaleset runner group permits this repo.
  • allow_auto_merge ON + "Allow GitHub Actions to create and approve pull requests" ON.

Generated by the updated onboarding scaffold (STUB_TEMPLATE).

…ll internal reusable)

The stub called a reusable workflow in CheckPointSW/.github (internal). GitHub
forbids a PUBLIC repo from calling a reusable workflow in a private/internal
repo, so the Lambda's workflow_dispatch failed with
  422 ... called workflow ... was not found
(an access error, not a missing file).

Inline the full bridge body (verify head sha + pinned validator-App check ->
enable auto-merge -> approve as github-actions[bot]) into this workflow. Runs on
checkpointsw-scaleset; dispatch-only + default-branch guard keep untrusted PR
code off the self-hosted runner. Reads AUTO_APPROVER_APP_ID from the org secret
directly (no secrets: inherit needed without the reusable call).
AUTO_APPROVER_APP_ID (4287270) is a public identifier, not a secret. Inline it
as APPROVER_APP_ID: "4287270" — drops the org-secret-visibility prerequisite
for public repos.
@chkp-adirb
chkp-adirb merged commit 5ab8cec into master Aug 12, 2026
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.

2 participants