Repository navigation
HttpError: Not Found #346
Copy link
Copy link
Closed
Description
error log
Run changesets/action@v[1](https://github.com/zhaohuanyuu/wid-cli/actions/runs/7356642052/job/20027089392#step:7:1)
setting git user
/usr/bin/git config user.name "github-actions[bot]"
/usr/bin/git config user.email "github-actions[bot]@users.noreply.github.com"
setting GitHub credentials
/usr/bin/git checkout changeset-release/main
error: pathspec 'changeset-release/main' did not match any file(s) known to git
/usr/bin/git checkout -b changeset-release/main
Switched to a new branch 'changeset-release/main'
/usr/bin/git reset --hard 97bf9fbe7230df12e3d9552ccfc5e80318cfe8ba
HEAD is now at 97bf9fb test: changeset workflow modified
/opt/hostedtoolcache/node/20.[10](https://github.com/zhaohuanyuu/wid-cli/actions/runs/7356642052/job/20027089392#step:7:11).0/x64/bin/node /home/runner/work/wid-cli/wid-cli/node_modules/.pnpm/@changesets+cli@2.27.1/node_modules/@changesets/cli/bin.js version
🦋 All files have been updated. Review them and commit at your leisure
/usr/bin/git status --porcelain
D .changeset/gold-pots-juggle.md
D .changeset/rich-rocks-smash.md
D .changeset/swift-numbers-lay.md
M package.json
?? CHANGELOG.md
/usr/bin/git add .
/usr/bin/git commit -m Version Packages
[changeset-release/main bee8d42] Version Packages
5 files changed, 10 insertions(+), [16](https://github.com/zhaohuanyuu/wid-cli/actions/runs/7356642052/job/20027089392#step:7:17) deletions(-)
delete mode 100644 .changeset/gold-pots-juggle.md
delete mode 100644 .changeset/rich-rocks-smash.md
delete mode 100644 .changeset/swift-numbers-lay.md
create mode 100644 CHANGELOG.md
/usr/bin/git push origin HEAD:changeset-release/main --force
remote:
remote: Create a pull request for 'changeset-release/main' on GitHub by visiting:
remote: https://github.com/zhaohuanyuu/wid-cli/pull/new/changeset-release/main
remote:
To https://github.com/zhaohuanyuu/wid-cli
* [new branch] HEAD -> changeset-release/main
{
"total_count": 0,
"incomplete_results": false,
"items": []
}
creating pull request
Error: HttpError: Not Found
Error: Not Foundrealease yml
name: Release
on:
push:
branches: [main]
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm build
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run publish
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PAKCAGE_RELEASE }}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
charlie-bud commentedon Jan 3, 2024
+1 - We're also experiencing the same issue with this action.
swapnil-srivastava commentedon Jan 22, 2024
+1 experiencing the same issue while publishing using changeset with github actions
MartinPlayon commentedon Feb 14, 2024
+1 Here. I'm not really sure if there is some setting. but it happens with GitHub actions
BartoszKut commentedon Mar 19, 2024
+1 Almost the same output as @MartinPlayon.
MartinPlayon commentedon Mar 21, 2024
Adding more information. I would think it's something with permissions with GitHub.
BartoszKut commentedon Mar 27, 2024
I've added permissions as follows, and that fixes my issue.
In your case, not all of these must be required.
MartinPlayon commentedon Apr 4, 2024
@BartoszKut, thank you for the info, but it doesn't look like the issue is there.
I think the problem lies in configuring the
baseBranchvalue. On an issue in the changeset repo when a developer's main branch doesn't have the latest, there can be an issue in resolving the correct version issue. The solution was to configure"baseBranch": "origin/main",However, when creating the PR, it uses this value, and
origin/doesn't exist in GitHub actions. There should be a way to override the value to another branch if the default behavior is not the expected one.MartinPlayon commentedon May 13, 2024
I did find the issue. If you have set in your config.json the
"baseBranch": "origin/main"to point to the origin, then that is not a valid branch in the actions. However, it is not really well documented. I found in the code that there is abranchvalue that can be passed to specify on which branch the action is running, and that will fix the HTTP error issue.steven-fe commentedon Jul 25, 2024
You need check "public_repo" .
mek-earnin commentedon Feb 19, 2025
I was able to fix this issue by inviting the account that owns the token into the private repo thanks to the hint that @steven-fe 's comment.
It was like, the account that owns the token couldn't see the repo so it returns "Not found".
After fixing it, a github release was created successfully.
bluwy commentedon May 15, 2026
I believe this relates to #199