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.
🧩 Analysis chain
🏁 Script executed:
Repository: daangn/stackflow
Length of output: 623
🏁 Script executed:
# First, let's examine the release.yml file completely cat -n .github/workflows/release.ymlRepository: daangn/stackflow
Length of output: 3098
🏁 Script executed:
# Check if scripts/publish-preview-packages.sh exists and examine it cat -n scripts/publish-preview-packages.shRepository: daangn/stackflow
Length of output: 2154
Provide explicit authentication credentials for the pull_request workflow path.
Setting
persist-credentials: falsecorrectly fixes the Changesets CI trigger issue forpushevents (line 71), but thepull_requestworkflow path (line 81-82) will fail because the script requires git authentication that is not provided.The script
scripts/publish-preview-packages.shperforms authenticated git operations:git fetch origingit show-ref --verify --quiet refs/remotes/origin/"$BASE_BRANCH"git diff --name-only origin/"$BASE_BRANCH"...HEADWith
persist-credentials: falseand no explicitGITHUB_TOKENpassed to the script, these operations will fail, particularly for private repositories. The Changesets action (line 77) explicitly providesGITHUB_TOKEN: ${{ secrets.DAANGNBOT_PAT }}, but the script step (line 82) receives no credentials.Fix: Add
GITHUB_TOKENto the script step:Recommended solution
- name: Continuous release via pkg.pr.new if: github.event_name == 'pull_request' run: ./scripts/publish-preview-packages.sh ${{ github.event.pull_request.base.ref }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Alternatively, split into separate jobs with different checkout configurations if you need more granular control over credentials per workflow path.
🤖 Prompt for AI Agents