[TESTING] DO NOT MERGE : Feat/reimagine cr setup#152
Open
amaury901130 wants to merge 6 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the template’s developer workflow by introducing local Pushgate pre-push checks (with a committed .pushgate.yml), documenting the setup/usage in both readmes, and extending the scaffolding CLI to best-effort auto-install the Pushgate hook after dependency installation. It also introduces documentation/template guidance for PR risk labeling and adds a (currently standalone) gatekeeper script intended for label-based approval routing.
Changes:
- Add versioned Pushgate configuration + a Husky pre-push bridge to run
.git/hooks/pre-push. - Document Pushgate setup/skip behavior and a
risk:*PR label system in README files and the PR template. - Update
create-rootstrap-rn-appCLI flow to attempt Pushgate installation automatically afterpnpm install.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents PR risk labels and Pushgate install/skip workflow. |
| README-project.md | Adds Pushgate and PR risk label docs for generated projects. |
| cli/setup-project.js | Adds installPushgate() helper and exports it for the CLI. |
| cli/index.js | Calls installPushgate() after installing dependencies. |
| .pushgate.yml | Introduces Pushgate v2 config with AI advisory mode + blocking deterministic checks. |
| .husky/pre-push | Adds Husky hook to forward pushes to .git/hooks/pre-push (Pushgate). |
| .github/scripts/gatekeeper.js | Adds script to compute required approvals based on risk:* + ai:* labels and set a commit status. |
| .github/PULL_REQUEST_TEMPLATE.md | Adds “Layer 2: Risk Classification” section and setup checklist. |
| .github/copilot-instructions.md | Adds repo-specific Copilot guidance and review classification labels. |
| .agents/skills/pr-description/SKILL.md | Updates PR-description skill doc to include risk classification guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+27
to
+32
| consola.start('Installing Pushgate pre-push hook'); | ||
| try { | ||
| await execShellCommand( | ||
| `cd ${projectName} && curl -fsSL https://raw.githubusercontent.com/rootstrap/ai-pushgate/main/install.sh | bash` | ||
| ); | ||
| consola.success('Pushgate pre-push hook installed'); |
Comment on lines
+29
to
+36
| await execShellCommand( | ||
| `cd ${projectName} && curl -fsSL https://raw.githubusercontent.com/rootstrap/ai-pushgate/main/install.sh | bash` | ||
| ); | ||
| consola.success('Pushgate pre-push hook installed'); | ||
| } catch (error) { | ||
| consola.warn( | ||
| 'Could not auto-install Pushgate. Run installer manually from the project root.' | ||
| ); |
Comment on lines
+1
to
+5
| . "$(dirname "$0")/common.sh" | ||
|
|
||
| echo '>> Running Pushgate pre-push checks...' | ||
|
|
||
| "$(git rev-parse --git-common-dir)/hooks/pre-push" "$@" No newline at end of file |
Comment on lines
+40
to
+43
| review: | ||
| # Branch to diff against when collecting changes. | ||
| target_branch: master | ||
|
|
Comment on lines
+1
to
+5
| // Layer 4 - Classification and Routing Gatekeeper | ||
| // | ||
| // Routing table (required approvals): | ||
| // | ||
| // Risk \ AI findings | clean | minor | serious |
Comment on lines
+26
to
+38
| const installPushgate = async (projectName) => { | ||
| consola.start('Installing Pushgate pre-push hook'); | ||
| try { | ||
| await execShellCommand( | ||
| `cd ${projectName} && curl -fsSL https://raw.githubusercontent.com/rootstrap/ai-pushgate/main/install.sh | bash` | ||
| ); | ||
| consola.success('Pushgate pre-push hook installed'); | ||
| } catch (error) { | ||
| consola.warn( | ||
| 'Could not auto-install Pushgate. Run installer manually from the project root.' | ||
| ); | ||
| } | ||
| }; |
Comment on lines
+1
to
+5
| . "$(dirname "$0")/common.sh" | ||
|
|
||
| echo '>> Running Pushgate pre-push checks...' | ||
|
|
||
| "$(git rev-parse --git-common-dir)/hooks/pre-push" "$@" No newline at end of file |
Comment on lines
+40
to
+43
| review: | ||
| # Branch to diff against when collecting changes. | ||
| target_branch: master | ||
|
|
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.
Jira board reference:
What does this do?
Adds local Pushgate pre-push checks to the template with a committed
.pushgate.ymlconfiguration and documents the workflow in both template readmes. The config usestarget_branch: master, starts AI review inadvisorymode, and adds blocking deterministic checks fortype-check,eslint,lint,lint:translations, andtest, plusdiff_sizeandforbidden_pathspolicies. This PR also updates the project creation CLI so new apps created withcreate-rootstrap-rn-appattempt to install Pushgate automatically after dependency installation.Why did you do this?
The template now recommends Pushgate, but hooks are local and not tracked by git. Automating installation in the scaffold flow reduces onboarding misses, and documenting manual install/verification keeps existing clones and edge cases covered while ensuring the local checks stay consistent across new apps.
Who/what does this impact?
create-rootstrap-rn-app.How did you test this?
Notes:
Screenshots / Previews
N/A — tooling and documentation changes only.