Repository navigation
ci: add changesets to Dependabot PRs automatically - #183
Merged
Merged
Conversation
Dependabot doesn't write changesets, so its PRs always failed the changeset check. A pull_request_target workflow now writes a patch changeset for the packages a Dependabot PR touches and pushes it to the branch, without running any PR code. The changeset check skips Dependabot PRs because a GITHUB_TOKEN push doesn't re-trigger it.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Dependabot doesn't know about Changesets, so every Dependabot PR failed the
changesetcheck (e.g. #182).dependabot-changeset.yml(pull_request_target, Dependabot PRs from this repo only): if the PR has no changeset and touchespackages/*or the root lockfile/workspace, it writes.changeset/dependabot-<PR>.mdwith a patch bump for the touched packages (@crypt.fyi/corefor lockfile-only bumps) and pushes it to the branch. It only runs git and readspackage.jsonas data, never PR code, since the job has write access.changeset.ymlskips Dependabot PRs: the bot's push usesGITHUB_TOKEN, which doesn't re-trigger workflows, so the check would stay red.CONTRIBUTING.mdnotes the exemption.Dry-ran the script against #182's original commit (generated a
@crypt.fyi/webpatch changeset) and its fixed head (skipped).pull_request_targetruns the workflow frommain, so it only takes effect after merge.