feat(ci): add /fix slash command and widen review-relay filter#1561
Merged
feat(ci): add /fix slash command and widen review-relay filter#1561
Conversation
5937a75 to
7f85ea1
Compare
Relay now matches the current sync pipeline branch naming (auto/openapi-sync-*) instead of the retired feature/auto-P* prefix, so reviews on new auto-PRs reach gdc-nas. Adds sdk-slash-commands.yaml: a /fix PR comment dispatches the same sdk-review-submitted repository_dispatch payload to gdc-nas that a formal review does. Access is gated by gdc-nas collaborator membership using the existing TOKEN_GITHUB_YENKINS_ADMIN PAT — no new secrets, no changes in gdc-nas. risk: low
7f85ea1 to
c915fc2
Compare
jaceksan
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Two fixes to the PR-review automation between
gooddata-python-sdkandgdc-nas.1. Relay missed the new auto-PR branch naming.
The sync pipeline used to name PRs
feature/auto-P.... It now names themauto/openapi-sync-C<cluster>-<date>-r<run>. The relay'sif:filter hadn't been updated, so reviews on every new auto-PR were silently dropped and never reachedgdc-nas. The filter now matches the current naming. Thefeature/auto-P*prefix is retired — last produced 2026-03-18, no open PRs carry it today.if: >- (github.event.review.state == 'changes_requested' || (github.event.review.state == 'commented' && github.event.review.body)) && github.event.pull_request.user.login == 'yenkins-admin' - && startsWith(github.event.pull_request.head.ref, 'feature/auto-P') + && startsWith(github.event.pull_request.head.ref, 'auto/openapi-sync-') && github.event.pull_request.head.repo.full_name == ...2. No lightweight way to re-kick the pipeline.
Until now the only trigger was a formal "Request changes" review. For small follow-ups — or re-kicking after a missed relay event — that's heavier than needed. A PR comment of
/fix(optionally/fix short note) now dispatches the same event as a formal review.Important
GitHub activates
issue_comment/pull_request_reviewworkflow changes only from the default branch. Full end-to-end verification can only happen after this PR is merged.Note
No changes are required in
gdc-nas. The new workflow emits the exact samerepository_dispatch: sdk-review-submittedpayload that the existing relay does.How it works
Topology
flowchart LR A["Reviewer submits<br/>formal review"] --> R B["User comments<br/>/fix [note]"] --> S subgraph SDK["gooddata-python-sdk (public)"] R["sdk-review-relay.yml<br/><i>pull_request_review</i>"] S["sdk-slash-commands.yaml<br/><i>issue_comment</i>"] G{"Gates"} R --> G S --> G end G -->|"repository_dispatch<br/>sdk-review-submitted"| N subgraph NAS["gdc-nas (private)"] N["sdk-py-review-fix.yml<br/><i>unchanged</i>"] end style R fill:#d4edda,stroke:#28a745,color:#000 style S fill:#d4edda,stroke:#28a745,color:#000 style N fill:#cce5ff,stroke:#004085,color:#000 style G fill:#fff3cd,stroke:#856404,color:#000/fixdecision flowflowchart TD Start(["User comments<br/><b>/fix [note]</b>"]) Syntax{"Valid <b>/fix</b> syntax?<br/><i>(not /fixme, /fix-review, …)</i>"} Context{"PR open, open auto-PR,<br/>authored by yenkins-admin?"} Branch{"head.ref starts with<br/><b>auto/openapi-sync-</b>?"} Auth{"Commenter is a<br/><b>gdc-nas</b> collaborator?"} Dispatch["POST repository_dispatch<br/><b>sdk-review-submitted</b>"] Ack["🚀 reaction on comment"] Silent(["Silent exit<br/><i>green run, no reply</i>"]) Done(["<b>gdc-nas</b> runs<br/>sdk-py-review-fix.yml"]) Start --> Syntax Syntax -->|no| Silent Syntax -->|yes| Context Context -->|no| Silent Context -->|yes| Branch Branch -->|no| Silent Branch -->|yes| Auth Auth -->|no| Silent Auth -->|yes| Dispatch Dispatch --> Ack Dispatch --> Done style Start fill:#e7f3ff,stroke:#004085,color:#000 style Dispatch fill:#d4edda,stroke:#28a745,color:#000,font-weight:bold style Ack fill:#d4edda,stroke:#28a745,color:#000 style Done fill:#d4edda,stroke:#28a745,color:#000 style Silent fill:#f8d7da,stroke:#721c24,color:#000/fixsecurity modelGate ladder — cheap checks first, API calls last (click to expand)
issue.pull_request != nullissue.state == 'open'startsWith(body, '/fix')+ strict regex^/fix([[:space:]].*)?$/fixme,/fix-review, etc.issue.user.login == 'yenkins-admin'head.refstarts withauto/openapi-sync-gooddata/gdc-nasGates 1–4 are free (job
if:). Gate 5 is one API call to resolve the PR'shead.ref. Gate 6 is the auth check.Caution
Denied commenters get a silent green run — no reply, no reaction. This is intentional: it avoids leaking authorization state (who is / isn't on the gdc-nas ACL) from the public Actions tab.
Cost to the repo
TOKEN_GITHUB_YENKINS_ADMINPAT.gdc-nas. Payload is byte-identical to what the receiver already consumes.GITHUB_TOKENis restricted topull-requests: read; every write uses the PAT.Payload compatibility — which fields the receiver reads (click to expand)
All seven fields match
gdc-nas/.github/workflows/sdk-py-review-fix.yml:pr_numbergithub.event.issue.numbergithub.event.pull_request.numberpr_branchgh api .../pulls/Ngithub.event.pull_request.head.refpr_author"yenkins-admin"github.event.pull_request.user.loginreviewergithub.event.comment.user.logingithub.event.review.user.loginreview_id""(empty)github.event.review.idreview_state"commented"github.event.review.statereview_body/fixarg (first line, trimmed)github.event.review.bodyEmpty
review_idis guarded on the receiver side — it falls back to a GraphQL unresolved-threads query, so no 404.