changesets / bot

https://github.com/apps/changeset-bot
56 stars 20 forks source link

Bot reporting "No Changeset found", but there is. How to debug? #78

Open chizmw opened 1 year ago

chizmw commented 1 year ago

I've been exploring changesets recently and am in a mostly good place.

I have it working in three repos as expected.

One repo confused the bot in ways I can't understand. I keep getting:

πŸ¦‹ No Changeset found

no matter what I try.

My current status:

Then I create and view the PR.

πŸ¦‹ No Changeset found

This is a summary of the branch:

❯ /bin/ls -a
.                       .markdownlint.jsonc     node_modules
..                      .markdownlintignore     package.json
.changeset              .pre-commit-config.yaml terraform
.git                    .pytest_cache           yarn.lock
.infracost              .venv
❯ tree .changeset/
.changeset/
β”œβ”€β”€ README.md
β”œβ”€β”€ config.json
└── weak-beans-share.md

1 directory, 3 files

and

❯ cat .changeset/weak-beans-share.md
---
'botc-custom-script-json2pdf': patch
---

add changeset tool

I'm stumped, and don't know where to look for issues, not what to try to get the bot working as expected in this repo.

Any and all suggestions welcome.

chizmw commented 1 year ago

Not fully solving the issue, but possibly a pointer to the root cause, I found that removing changie files

appears to confuse the bot in some way.

In a different branch where I only add the changesets tooling, and do not remove any files I see:

πŸ¦‹ Changeset detected

If I run:

git rm -r .changie.yaml .changes/
git commit -m 'remove changie'
git push

the PR comment is updated to:

⚠️ No Changeset found

.changeset/ still exists after the previous operation:

❯ tree .changeset/
.changeset/
β”œβ”€β”€ README.md
β”œβ”€β”€ config.json
└── fair-walls-join.md
chizmw commented 1 year ago

Renaming the files does not immediately confuse the bot:

git mv .changes .no-more-changie
git commit -m 'git mv .changes .no-more-changie' --no-verify
git push

still gives the expected:

πŸ¦‹ Changeset detected

However, even after renaming, removing the files confuses the bot again:

git rm -rf .no-more-changie
git commit -m 'git rm .no-more-changie' --no-verify
git push

puts us back to:

⚠️ No Changeset found

chizmw commented 1 year ago

❓ is there a limit to the number of results/files returned in octocat calls?

I have another PR in a different repo where I believe I followed the same process and the bot's fine.

The only obvious difference I can see is "Files Changed: 81" versus "Files Changed: 18"

Note: Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.

source: https://octokit.github.io/rest.js/v19#pulls-list-files