Add reusable ai-guarded-review workflow#44
Merged
jolelievre merged 2 commits intoPrestaShop:masterfrom Apr 23, 2026
Merged
Conversation
cnavarro-prestashop
approved these changes
Apr 23, 2026
mattgoud
approved these changes
Apr 23, 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.
ai-guarded-review.ymlthat combines guard checks, Claude review execution, validation, and label management into a single callable workflow. This replaces the previousai-prereview-guard.ymlwhich only handled the guard.ai-prereview-guard.ymlis superseded by this workflow (kept for now for backward compatibility)ps_apiresources2. On a test PR inps_apiresources, add theNeed AI reviewlabel as a team member 3. Verify the full flow: guard passes, Claude posts a review, labels are updated 4. Test with a non-team-member: verify guard fails with error and trigger label is removed 5. Test on an already-reviewed PR: verify it skips earlyDetails
Reusable workflow
ai-guarded-review.ymlCombines all the logic that was previously split between
ai-prereview-guard.ymland each consumer's workflow into a single reusable workflow. Consumer repos only need to handle event triggering, code change detection, and prompt loading.Inputs:
team-slug,actor,pr-number,repository— guard configurationprompt— the review prompt content (loaded by the caller)trigger-label(default:Need AI review) — removed on completion or guard failurereviewed-label(default:AI reviewed) — added after successful reviewclaude-model(default:claude-sonnet-4-6) — customizable per repomax-turns(default:30) — customizable per repoallowed-tools(default:Read,Glob,Grep,LS,WebFetch,Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr comment:*)) — customizable per repoSecrets:
org-read-token,github-token,anthropic-api-keyJobs: