Conversation
- Add 'gh aw changeset' command with 'version' and 'release' subcommands - Parse changeset files from .changeset/ directory - Determine version bump based on changeset types (major/minor/patch) - Generate and update CHANGELOG.md with categorized changes - Delete processed changeset files on release - Add comprehensive tests for all changeset functionality Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Add changeset command section to CLI documentation - Include changeset file format examples - Document version and release commands - Add changeset commands to quick start guide - Explain release workflow and next steps Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot add implementation as a separate javascript script, not in the CLI. |
Clarify that major releases require explicit 'gh aw changeset release major' command and will fail with safety error if changesets indicate major bump but no type is specified. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Per @pelikhan's request, moved changeset logic from Go CLI to a standalone JavaScript script (changeset.js). This provides a simpler, dependency-free implementation that can be run directly with Node.js. Changes: - Remove pkg/cli/changeset_command.go and tests - Revert cmd/gh-aw/main.go to remove changeset command - Add changeset.js standalone script with full implementation - Add CHANGESET_README.md with usage documentation - Update docs/src/content/docs/tools/cli.md to reference script The JavaScript implementation provides the same functionality: - node changeset.js version - Preview next version - node changeset.js release - Create release and update CHANGELOG Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Refactored to standalone JavaScript script in commit 3c5ff90. The changeset logic is now in node changeset.js version # Preview next version
node changeset.js release # Create releaseSee |
|
@copilot add a --dry-run mode to the script to preview output but not write files or create release. Run script in dry-run mode and show output |
Implements dry-run mode that previews changes without modifying files: - Add --dry-run flag support to both version and release commands - Show "DRY RUN MODE" indicator when enabled - Display CHANGELOG entry that would be added - List changeset files that would be deleted - Update help text and documentation - Preserve all original functionality when flag not used Usage: node changeset.js version --dry-run node changeset.js release --dry-run node changeset.js release minor --dry-run Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added node changeset.js version --dry-run
node changeset.js release --dry-runDry-run output showing preview without modifying files: |
| github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 | ||
| github.com/sourcegraph/conc v0.3.0 | ||
| github.com/spf13/cobra v1.9.1 | ||
| gopkg.in/yaml.v3 v3.0.1 |
There was a problem hiding this comment.
@copilot use existing yaml package, do not add new one
There was a problem hiding this comment.
Fixed in commit (pending). Reverted go.mod and go.sum to remove the gopkg.in/yaml.v3 dependency that was accidentally added. The changeset script is JavaScript-only and doesn't use Go YAML packages.
- Add prerequisite checks: clean tree and main branch requirement - Add checkGitPrerequisites() function that validates: - Working tree is clean (no uncommitted changes) - Currently on 'main' branch - Checks are skipped in dry-run mode for flexibility - Add Makefile targets: - make changeset-version: Preview next version - make changeset-release: Create release - make changeset-dry-run: Preview without modifying files - Update documentation with prerequisites and make targets - Revert go.mod/go.sum to remove unnecessary yaml.v3 dependency The release command now ensures safety by requiring clean state and main branch before allowing actual releases. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added in commit (pending). The script now:
Example error when not on main: $ node changeset.js release
✗ Must be on 'main' branch to create a release (currently on 'feature-branch') |
|
| gh aw logs ci-doctor # View execution logs | ||
| gh aw audit 12345678 # Audit a specific run | ||
|
|
||
| # Release management |
There was a problem hiding this comment.
@copilot internal release tool, remove from these docs
There was a problem hiding this comment.
Removed in commit (pending). Reverted the file to its original state before changeset documentation was added.
| - **`disable`**: Stops workflows from executing automatically and cancels any currently running workflow instances | ||
| - Both commands support pattern matching to operate on multiple workflows at once | ||
|
|
||
| ## 📦 Release Management with Changesets |
There was a problem hiding this comment.
Removed in commit (pending). All changeset-related changes have been reverted from this file.
Changes: - Simplify version command: always operates in preview mode (never writes files) - Remove --dry-run flag from version command (unnecessary since it never modifies) - Clarify that --dry-run is only for release command - Fix push instruction to match patch-release/minor-release format: Changed from "git push origin main v0.15.0" to "git push origin v0.15.0" (Only push the tag, not the branch) - Update all documentation to reflect simplified workflow - Update help text to clarify command usage This makes the distinction clear: - version: Always preview, never modify files - release: Actually modify files (unless --dry-run specified) - release --dry-run: Preview changes without modifying files Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in commit ad053ef:
Example: $ node changeset.js version
# Always shows preview, never writes files
$ node changeset.js release --dry-run
# Preview release changes
$ node changeset.js release
# Actually create release |
Per @pelikhan's feedback, the changeset tool is an internal release tool and should not be documented in the public CLI documentation. Reverted docs/src/content/docs/tools/cli.md to original state before changeset documentation was added. The changeset functionality is still available via: - changeset.js script - CHANGESET_README.md documentation - Makefile targets (changeset-version, changeset-release, changeset-dry-run) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot remove --dry-run as it is the same as the version command |
Per @pelikhan's feedback, --dry-run is redundant since the version command already provides preview functionality without modifying files. Changes: - Remove --dry-run flag support from changeset.js - Remove dryRun parameters from all functions - Simplify release command to always modify files - Remove changeset-dry-run Makefile target - Update help text to remove --dry-run references - Update CHANGESET_README.md to remove dry-run documentation Now the workflow is simpler: - version: Always previews (never modifies files) - release: Always creates release (modifies files) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Removed in commit (pending). The
The |
|
@copilot run preview and show output |
Preview output from The preview command analyzes the 3 changeset files in |
| @@ -0,0 +1,507 @@ | |||
| #!/usr/bin/env node | |||
There was a problem hiding this comment.
Moved to scripts/ folder in commit (pending). Updated all references in Makefile, CHANGESET_README.md, and the script's help text.
Per @pelikhan's request, moved changeset.js to scripts/ folder for better project organization. Changes: - Create scripts/ folder - Move changeset.js to scripts/changeset.js - Update Makefile targets to use scripts/changeset.js - Update CHANGESET_README.md with new path references - Update help text in script to reflect new path All functionality remains the same, just better organized. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
This PR implements a minimalistic changeset script inspired by
@changesets/clifor managing version releases in gh-aw. The implementation provides a streamlined workflow for tracking changes, determining version bumps, and updating the CHANGELOG. This is an internal tool for project maintainers and is not included in public CLI documentation.Problem Statement
The project needed a simple way to:
Solution
Added a standalone JavaScript script in
scripts/changeset.jsthat can be run directly with Node.js or via Makefile targets:node scripts/changeset.js versionAnalyzes changeset files in
.changeset/directory and previews the next release (always read-only):node scripts/changeset.js release [type]Creates a release by updating CHANGELOG.md and cleaning up changeset files:
Safety Checks
Before creating a release, the script validates:
mainbranch to create a releaseMakefile Targets
Convenience targets for common operations:
Implementation Details
Changeset File Format:
Key Features:
versionalways previews (never modifies),releasecreates actual releasepatch-releaseandminor-releasetargets (tag only)Files Added:
scripts/changeset.js- Standalone Node.js script with safety checks and simplified commandsCHANGESET_README.md- Internal documentation for maintainersMakefile- Added changeset-version and changeset-release targetsNote: This is an internal tool for project maintainers. It is not documented in the public CLI documentation (
docs/src/content/docs/tools/cli.md) as it is not intended for general user consumption.Testing
Manual testing confirms all functionality works correctly:
Usage (For Maintainers)
.changeset/directorynode scripts/changeset.js versionto preview the next releasemainbranch with a clean working treenode scripts/changeset.js releaseto prepare the releaseThis provides a simple, standalone script for managing releases without requiring CLI integration or external dependencies. The script can be run anywhere Node.js is installed, includes safety checks to prevent accidental releases, and has a clear distinction between preview (
version) and action (release) commands.Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.