Skip to content

ci: auto-create changeset for dependabot PRs#582

Merged
cameri merged 2 commits intodependabot/npm_and_yarn/uuid-14.0.0from
copilot/add-dependabot-changeset-workflow
Apr 26, 2026
Merged

ci: auto-create changeset for dependabot PRs#582
cameri merged 2 commits intodependabot/npm_and_yarn/uuid-14.0.0from
copilot/add-dependabot-changeset-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 26, 2026

  • Create .github/workflows/dependabot-changeset.yml workflow that:
    • Triggers on opened and reopened pull_request events from dependabot[bot]
    • Checks whether .changeset/dependabot-pr-<number>.md already exists (the specific file it creates)
    • If it doesn't exist, creates it with "nostream": patch bump and PR title as description
    • Commits and pushes the changeset to the PR branch

Agent-Logs-Url: https://github.com/cameri/nostream/sessions/d4c27474-5e00-4668-ab36-b9ffe83a3c96

Co-authored-by: cameri <378886+cameri@users.noreply.github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 26, 2026

⚠️ No Changeset found

Latest commit: 83ee5c9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 26, 2026

Coverage Status

Coverage is 63.498%copilot/add-dependabot-changeset-workflow into dependabot/npm_and_yarn/uuid-14.0.0. No base build found for dependabot/npm_and_yarn/uuid-14.0.0.

@cameri cameri marked this pull request as ready for review April 26, 2026 00:18
@cameri cameri requested a review from Copilot April 26, 2026 00:18
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow intended to automatically create a Changesets entry on Dependabot PRs so they pass the repo’s “Changeset Required” CI check.

Changes:

  • Introduces .github/workflows/dependabot-changeset.yml to generate a patch changeset for nostream using the PR title.
  • Commits and pushes the generated .changeset/dependabot-pr-<number>.md back onto the Dependabot PR branch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to +29
- name: Check for existing changeset
id: check
run: |
count=$(find .changeset -maxdepth 1 -name '*.md' ! -name 'README.md' 2>/dev/null | wc -l)
if [ "$count" -gt 0 ]; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
Copy link

Copilot AI Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Check for existing changeset" step is checking whether any .changeset/*.md file exists in the repo, which will be true on branches created from main (this repo already contains many changesets). As a result, exists will almost always be true and the workflow will never create a changeset for Dependabot PRs.

Instead, detect whether the PR introduces a changeset relative to the base branch (e.g. reuse the same logic as CI: pnpm exec changeset status --since origin/${{ github.base_ref }}), or at least check for the presence of the specific file you intend to create (.changeset/dependabot-pr-<number>.md).

Copilot uses AI. Check for mistakes.
@cameri
Copy link
Copy Markdown
Owner

cameri commented Apr 26, 2026

@copilot The "Check for existing changeset" step is checking whether any .changeset/*.md file exists in the repo, which will be true on branches created from main (this repo already contains many changesets). As a result, exists will almost always be true and the workflow will never create a changeset for Dependabot PRs.

Instead, detect whether the PR introduces a changeset relative to the base branch (e.g. reuse the same logic as CI: pnpm exec changeset status --since origin/${{ github.base_ref }}), or at least check for the presence of the specific file you intend to create (.changeset/dependabot-pr-.md).

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 26, 2026

@copilot The "Check for existing changeset" step is checking whether any .changeset/*.md file exists in the repo, which will be true on branches created from main (this repo already contains many chan...

Fixed in 83ee5c9 — the check now tests specifically for .changeset/dependabot-pr-<number>.md (the exact file the workflow creates) rather than scanning for any changeset file.

Copilot AI requested a review from cameri April 26, 2026 00:33
@cameri cameri merged commit 1748ecc into dependabot/npm_and_yarn/uuid-14.0.0 Apr 26, 2026
15 checks passed
@cameri cameri deleted the copilot/add-dependabot-changeset-workflow branch April 26, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants