-
Notifications
You must be signed in to change notification settings - Fork 0
fix: point pr-review workflow at the smart review recipes #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,7 @@ | ||
| #!/usr/bin/env bash | ||
| npx -y conventional-commit-msg "$1" | ||
| # `@latest` + explicit `--package` dodge two npm footguns: an inherited | ||
| # npm_config_package (agent wrappers like axexec/axrun set it, hijacking | ||
| # `npx -y` into exit 127), and local-root shadowing — without the version, | ||
| # `npm exec` resolves the conventional-commit-msg repo's own package and the | ||
| # bin is "not found", breaking the hook in that repo after prepare wires it up. | ||
| npm exec --yes --package=conventional-commit-msg@latest -- conventional-commit-msg "$1" |
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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| --- | ||
| name: PR Review | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: [opened, synchronize, reopened] | ||
| workflow_dispatch: | ||
| inputs: | ||
| pr_number: | ||
| description: "PR number to review" | ||
| required: true | ||
| type: number | ||
|
|
||
| jobs: | ||
| approach: | ||
| if: ${{ github.event_name == 'workflow_dispatch' || github.event.action == 'opened' }} | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| actions: read | ||
| uses: Jercik/axgithub/.github/workflows/pr-review.yml@v1 | ||
| with: | ||
| label: approach | ||
| recipes: '[{"recipe":"pr-review-approach-smart","name":"smart draw 1"},{"recipe":"pr-review-approach-smart","name":"smart draw 2"},"pr-review-approach-2","pr-review-approach-3"]' | ||
| pr_number: ${{ github.event.pull_request.number || inputs.pr_number }} | ||
| secrets: | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| AXRECIPE_API_KEY: ${{ secrets.AXRECIPE_API_KEY }} | ||
|
|
||
| code: | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| actions: read | ||
| uses: Jercik/axgithub/.github/workflows/pr-review.yml@v1 | ||
| with: | ||
| label: code | ||
| recipes: '[{"recipe":"pr-review-code-smart","name":"smart draw 1"},{"recipe":"pr-review-code-smart","name":"smart draw 2"}]' | ||
| pr_number: ${{ github.event.pull_request.number || inputs.pr_number }} | ||
| secrets: | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| AXRECIPE_API_KEY: ${{ secrets.AXRECIPE_API_KEY }} |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For PRs opened from forks,
secrets.NPM_TOKENis empty because GitHub does not pass repository secrets to fork-triggered workflows exceptGITHUB_TOKEN(docs). Since this workflow runs on everypull_request, the new unconditional guard fails before install for any outside contributor PR;dedupe-check.ymlhas the same pattern. Consider gating the private-registry install to trusted PRs or using a public/non-secret fallback for forked PR checks.Useful? React with 👍 / 👎.