You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Github workflow doesn't originally run on the PR branch and manual checkout to new branch is done, pkg.pr.new uses wrong commit hash in the package name.
For example when creating a workflow that publishes packages when given keyword is commented, we'll need to checkout manually to a branch. The issue_comment doesn't do that automatically:
# Run when new comment is createdon:
issue_comment:
types: [created]
...
# Checkout to the PR branch
- uses: actions/checkout@v4with:
ref: refs/pull/${{ github.event.issue.number }}/head# Publish
- name: Publish to pkg.pr.newrun: > pnpm dlx pkg-pr-new@0.0 publish --compact --pnpm ./packages/eslint-remote-tester ./packages/repositoriesenv:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
This works well, but pkg.pr.new is picking the commit sha for package name from default branch, instead of the branch that was checkout to. Here's example: AriPerkkio/eslint-remote-tester#552
When Github workflow doesn't originally run on the PR branch and manual checkout to new branch is done,
pkg.pr.new
uses wrong commit hash in the package name.For example when creating a workflow that publishes packages when given keyword is commented, we'll need to checkout manually to a branch. The
issue_comment
doesn't do that automatically:issue_comment
event? actions/checkout#331 (comment)This works well, but
pkg.pr.new
is picking the commit sha for package name from default branch, instead of the branch that was checkout to. Here's example: AriPerkkio/eslint-remote-tester#552Example workflows where this happens:
The text was updated successfully, but these errors were encountered: