Skip to content

sdf-pr-preview/gate: optional maintainer approval label for non-member PRs - #119

Merged
Jonathan-Eid merged 4 commits into
mainfrom
preview-approval-label
Oct 20, 2026
Merged

Jonathan-Eid merged 4 commits into
mainfrom
preview-approval-label

Conversation

@Jonathan-Eid

@Jonathan-Eid Jonathan-Eid commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR

Adds an optional approval-label input to sdf-pr-preview/gate, so an org member can approve a preview build for a same-repo PR whose author isn't a member, such as the stellar-triage-bot App on stellar-docs (stellar/ops#4953). Each label approves one commit. Callers that don't set the input see no change.

UX flow

  1. The bot opens a PR. The gate skips the build because the author isn't a member.
  2. A maintainer adds the preview-approved label.
  3. The gate checks that the person who added the label is an org member and that the PR comes from a same-repo branch. It then removes the label and builds the head commit from the label event.
  4. The usual PR Preview: https://… comment appears.
  5. When the bot pushes again, the preview is withdrawn. A maintainer re-adds the label to rebuild.

Safety

  • Branches: same-repo only. Fork PRs can't be approved this way.
  • Who can approve: whoever adds the label must be an org member. The bot can't approve its own PR.
  • Scope of an approval: one commit. The build is pinned to the SHA in the labeled payload, and every run consumes the label.
  • What changes in the check: the approval replaces the author check only.

Caller changes

Add labeled to pull_request_target types, and add a job-level if that ignores other labels (otherwise any label withdraws a live preview). See the README and stellar/stellar-docs#2923.

Testing

Not yet tested end to end. It can only be tested once this and the docs PR are on main.

🤖 Generated with Claude Code

…r PRs

Lets an org member approve one preview build of a same-repo PR whose
author is not a member (e.g. the stellar-triage-bot App) by applying a
label. The label is consumed on every run, so each new head needs a
fresh approval. Refs stellar/ops#4953.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Multiple moderate issues affect repository safety, one-shot approval consumption, and documented behavior.

4 open issues
What changed in this PR

Adds optional maintainer approval labels for preview builds of non-member, same-repository pull requests.

Changes:

  • Adds approval-label handling with one-shot consumption.
  • Adds approval authorization and repository checks.
  • Documents workflow configuration and approval constraints.
File Review notes
sdf-pr-preview/​README.md Update outdated trust-boundary statements for the member-label exception (moderate, 2 votes) and clarify that same-repo means the exact base repository, not merely the same owner (moderate, 1 vote).
sdf-pr-preview/​gate/​action.yml Require an exact base-repository match (moderate, 3 votes); fail closed and make consumption replay-safe (moderate, 2 votes); fail closed when label removal cannot be confirmed (moderate, 2 votes); reject preview as the approval label (moderate, 1 vote).

Review effort: Lite

Comment thread sdf-pr-preview/README.md Resolved
Comment thread sdf-pr-preview/gate/action.yml Resolved
Comment thread sdf-pr-preview/gate/action.yml Resolved
Comment thread sdf-pr-preview/gate/action.yml Resolved
- Consume the approval label with a REST DELETE in the check step and
  only honour the approval if that removal succeeds, so reruns of an old
  labeled run and failed removals do not build without a fresh label.
- Require the head repo to be this repo, not just org-owned.
- Require the payload head SHA to still be the PR head.
- Update README trust-boundary notes for the approval path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread sdf-pr-preview/gate/action.yml Resolved
Check the live PR state before the approval and membership paths, so a
label added to a closed PR, or a run that starts after close, builds
nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Update the action metadata to document the required labeled trigger for approval events.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Document labeled trigger requirement for approval-label

sdf-pr-preview/​gate/​action.yml:38

The action-level header still tells callers that pull_request_target only needs opened, synchronize, reopened, closed, while this new input requires adding labeled for approval events. That leaves two contradictory trigger contracts in the same metadata file; update the header to describe labeled as required when approval-label is configured so callers do not enable the input without ever receiving approval events.

1 resolved since last review

Review effort: Lite

@Jonathan-Eid

Copy link
Copy Markdown
Contributor Author

Copilot's "previously missed" note on the action header (trigger types missing labeled): fixed in 2177e2a. The header now says labeled is required when approval-label is set, together with the job-level label filter.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Unresolved moderate correctness and approval-safety issues remain.

No open issues 🎉

Review effort: Lite

@Jonathan-Eid
Jonathan-Eid merged commit 97ffa34 into main Oct 20, 2026
9 checks passed
@Jonathan-Eid
Jonathan-Eid deleted the preview-approval-label branch October 20, 2026 15:54
ElliotFriend pushed a commit to ElliotFriend/stellar-docs that referenced this pull request Oct 21, 2026
)

Members can apply the preview-approved label to build a preview for a
PR opened by the stellar-triage-bot App. Needs stellar/actions#119.
Refs stellar/ops#4953.

Co-authored-by: Claude Opus 5.5 <[email protected]>
ElliotFriend added a commit to stellar/stellar-docs that referenced this pull request Oct 22, 2026
* Point Confidential Token resources to OpenZeppelin's stable release (#2915)

* Fix broken Confidential Token repo link on Privacy page

OpenZeppelin deleted the feat/confidential-verifier-ultrahonk branch.
The code now lives in packages/confidential on main.

- Link the package, the deployment guide and examples, and the design overview.
- Mark the demo as a developer preview. It still targets the old branch.
- Point to the stellar-contracts library for the Stellar implementation.

Refs #2914

* Point Confidential Token resources to OpenZeppelin's stable release

OpenZeppelin released the confidential token in stellar-contracts v0.8.0.

- Pin the Privacy page links to v0.8.0. Add crates.io, release notes, and the OpenZeppelin docs page.
- Replace the developer-preview caution. The v0.8.0 audit covers the token, but proofs are not yet zero-knowledge.
- Add a Confidential Token entry to the OpenZeppelin page and add confidential/ to the repository tree.
- Remove "Coming Soon". Governor shipped in v0.7.0, so it moves to Utilities.

Refs #2914

* Pin the stellar-confidential crates.io link to 0.8.0

* Describe the Confidential Token as a wrapper around a SEP-41 token

The v0.8.0 interface exposes confidential_balance and confidential_transfer, not the SEP-41 balance and transfer methods.

(cherry picked from commit fc4b3c9)

* pr-preview: allow maintainer-approved previews for bot PRs (#2923)

Members can apply the preview-approved label to build a preview for a
PR opened by the stellar-triage-bot App. Needs stellar/actions#119.
Refs stellar/ops#4953.

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit a55db9e)

* Stellar-rpc: Document the queryEvents beta RPC method (#2922)

queryEvents is only served by the archive RPC node (stellar-rpc tag archive-node-beta). Keep it out of the main OpenRPC spec.

Also drop the deprecated inSuccessfulContractCall field from the shared Event schema.

(cherry picked from commit 8255fe9)

* ci: add manual build of legacy-docs image for legacydocs.stellar.org (#2935)

* ci: add manual build of legacy-docs image for legacydocs.stellar.org

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci: don't persist checkout credentials into the legacy docs build context

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 17f2d69)

* chore: reword the legacy docs banner

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: point the legacy README at main's last Docusaurus commit

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Kaan Kacar <[email protected]>
Co-authored-by: Jonathan Eid <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: urvisavla <[email protected]>
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.

3 participants