Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/changeset.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 23 additions & 6 deletions .github/workflows/changeset.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,23 @@ Your task is to:

1. **Analyze the Pull Request**: Review the pull request title and description above to understand what has been modified.

2. **Determine if a Changeset is Needed**:
2. **Gather change information**: Use bash to examine the PR changes:

```bash
# List changed files, excluding .lock.yml files
git diff --name-only origin/${{ github.event.repository.default_branch }}...HEAD -- ':!*.lock.yml'
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The git pathspec syntax uses a colon prefix for magic signatures. The correct syntax should be -- ':!*.lock.yml' with quotes around the pathspec to protect the exclamation mark from shell interpretation. However, the implementation uses quotes correctly, so this is fine.

That said, the pathspec pattern ':!*.lock.yml' will only exclude files named exactly *.lock.yml in the current directory. To exclude all .lock.yml files in any directory (including .github/workflows/changeset.lock.yml), the pattern should be ':!**/*.lock.yml' or ':(exclude)*.lock.yml'.

For example, with the current pattern:

  • .github/workflows/changeset.lock.yml would NOT be excluded (needs ** to match subdirectories)
  • changeset.lock.yml in the root would be excluded

The intent appears to be excluding all .lock.yml files throughout the repository, so the pattern should use the globstar syntax.

Suggested change
git diff --name-only origin/${{ github.event.repository.default_branch }}...HEAD -- ':!*.lock.yml'
git diff --name-only origin/${{ github.event.repository.default_branch }}...HEAD -- ':!**/*.lock.yml'

Copilot uses AI. Check for mistakes.
```

If the diff is too large (over ~200 changed files or the patch itself is very large), fall back to commit messages only:

```bash
# Get commit messages for this PR
git log --oneline origin/${{ github.event.repository.default_branch }}..HEAD
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The git log command uses two dots (..) instead of three dots (...) which has different semantics than the git diff command on line 70.

  • git diff A...B shows changes on B since the common ancestor with A (symmetric difference)
  • git log A..B shows commits reachable from B but not from A (asymmetric difference)

For consistency and to match the same commit range, both commands should use the same syntax. If line 70's three-dot syntax is correct for showing PR changes, then this should also use three dots. However, for git log, the two-dot syntax is actually the correct choice to show commits in the PR branch that aren't in the base branch.

The commands are semantically equivalent for this use case (commits in HEAD but not in the base branch), but the documentation should clarify why different syntaxes are used, or standardize to the same syntax if possible.

Copilot uses AI. Check for mistakes.
```

Use the commit messages as your primary source of truth in that case — do not attempt to read the full diff.

3. **Determine if a Changeset is Needed**:

**If the PR does NOT require a changeset** (see criteria below), call the `noop` tool with a reason message and **stop immediately**:

Expand All @@ -80,6 +96,7 @@ Your task is to:
- Development tooling changes (Makefile, scripts/, build configs)
- Changes to repository metadata (.gitignore, LICENSE, etc.)
- Internal refactoring with no user-facing impact
- Changes only to `.lock.yml` files (compiled workflow lock files, auto-generated)

**PRs that DO require a changeset**:
- Bug fixes affecting users
Expand All @@ -90,21 +107,21 @@ Your task is to:

If a changeset is needed, proceed with the steps below.

3. **Use the repository name as the package identifier** (gh-aw)
4. **Use the repository name as the package identifier** (gh-aw)

4. **Determine the Change Type**:
5. **Determine the Change Type**:
- **major**: Major breaking changes (X.0.0) - Very unlikely, probably should be **minor**
- **minor**: Breaking changes in the CLI (0.X.0) - indicated by "BREAKING CHANGE" or major API changes
- **patch**: Bug fixes, docs, refactoring, internal changes, tooling, new shared workflows (0.0.X)

**Important**: Internal changes, tooling, and documentation are always "patch" level.

5. **Generate the Changeset File**:
6. **Generate the Changeset File**:
- Create the `.changeset/` directory if it doesn't exist: `mkdir -p .changeset`
- Use format from the changeset format reference above
- Filename: `<type>-<short-description>.md` (e.g., `patch-fix-bug.md`)

6. **Commit and Push Changes**:
7. **Commit and Push Changes**:
- Add and commit the changeset file using git commands:
```bash
git add .changeset/<filename> && git commit -m "Add changeset"
Expand All @@ -119,7 +136,7 @@ Your task is to:
- This tool call is REQUIRED for your changes to be pushed to the pull request
- **WARNING**: If you don't call this tool, your changeset file will NOT be pushed and the job will be skipped

7. **Append Changeset to PR Description**:
8. **Append Changeset to PR Description**:
- After pushing the changeset file, append a summary to the pull request description
- Use the `update_pull_request` tool:
```javascript
Expand Down
Loading