-
Notifications
You must be signed in to change notification settings - Fork 31
Add CHANGELOG requirement to PR guidelines #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1e72d21
Add server-level icons with light and dark theme support
mattpodwysocki c205821
Update @modelcontextprotocol/sdk to 1.25.2
mattpodwysocki ca757a9
Merge branch 'main' of github.com:mapbox/mcp-server
mattpodwysocki dc3e501
Merge branch 'main' of github.com:mapbox/mcp-server
mattpodwysocki 8f325eb
Merge branch 'main' of github.com:mapbox/mcp-server
mattpodwysocki 5c160cc
Merge branch 'main' of github.com:mapbox/mcp-server
mattpodwysocki 04a1930
Merge branch 'main' of github.com:mapbox/mcp-server
mattpodwysocki 49695c3
Add CHANGELOG requirement to PR guidelines
mattpodwysocki 33d653f
Update CHANGELOG for PR #112
mattpodwysocki 9ff3a05
Add automated CHANGELOG release preparation script
mattpodwysocki 3ffa393
Add build artifacts to .gitignore
mattpodwysocki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,3 +151,7 @@ dist | |
|
|
||
| # Test results | ||
| test-results.xml | ||
|
|
||
| # Build artifacts | ||
| *.tsbuildinfo | ||
| PR_DESCRIPTION.md | ||
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| #!/usr/bin/env node | ||
| // Copyright (c) Mapbox, Inc. | ||
| // Licensed under the MIT License. | ||
|
|
||
| /** | ||
| * Prepares CHANGELOG.md for a new release by: | ||
| * 1. Replacing "## Unreleased" with "## {version}" | ||
| * 2. Adding current date to the version heading | ||
| * 3. Adding a new empty "## Unreleased" section at the top | ||
| * | ||
| * Usage: | ||
| * node scripts/prepare-changelog-release.cjs <version> | ||
| * npm run changelog:prepare-release <version> | ||
| * | ||
| * Example: | ||
| * node scripts/prepare-changelog-release.cjs 1.0.0 | ||
| */ | ||
|
|
||
| const fs = require('node:fs'); | ||
| const path = require('node:path'); | ||
| const process = require('node:process'); | ||
|
|
||
| function prepareChangelogRelease(version) { | ||
| if (!version) { | ||
| console.error('Error: Version number is required'); | ||
| console.error('Usage: node scripts/prepare-changelog-release.cjs <version>'); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| // Validate version format (basic semver check) | ||
| if (!/^\d+\.\d+\.\d+(-[a-zA-Z0-9.-]+)?$/.test(version)) { | ||
| console.error(`Error: Invalid version format: ${version}`); | ||
| console.error('Expected format: X.Y.Z or X.Y.Z-prerelease'); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| const changelogPath = path.join(process.cwd(), 'CHANGELOG.md'); | ||
|
|
||
| // Check if CHANGELOG.md exists | ||
| if (!fs.existsSync(changelogPath)) { | ||
| console.error('Error: CHANGELOG.md not found'); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| // Read CHANGELOG.md | ||
| const content = fs.readFileSync(changelogPath, 'utf8'); | ||
|
|
||
| // Check if "## Unreleased" exists | ||
| if (!content.includes('## Unreleased')) { | ||
| console.error('Error: No "## Unreleased" section found in CHANGELOG.md'); | ||
| console.error('Nothing to release - add changes under "## Unreleased" first'); | ||
| process.exit(1); | ||
| } | ||
|
|
||
| // Get current date in YYYY-MM-DD format | ||
| const date = new Date().toISOString().split('T')[0]; | ||
|
|
||
| // Replace "## Unreleased" with "## {version} - {date}" | ||
| // and add a new "## Unreleased" section at the top | ||
| const updatedContent = content.replace( | ||
| '## Unreleased', | ||
| `## Unreleased\n\n## ${version} - ${date}` | ||
| ); | ||
|
|
||
| // Write updated content back to CHANGELOG.md | ||
| fs.writeFileSync(changelogPath, updatedContent, 'utf8'); | ||
|
|
||
| console.log(`✓ CHANGELOG.md updated successfully`); | ||
| console.log(` - Released version ${version} (${date})`); | ||
| console.log(` - Added new "Unreleased" section`); | ||
| console.log(''); | ||
| console.log('Next steps:'); | ||
| console.log(' 1. Review CHANGELOG.md'); | ||
| console.log(' 2. Commit changes: git add CHANGELOG.md && git commit -m "Release v' + version + '"'); | ||
| console.log(' 3. Create tag: git tag v' + version); | ||
| console.log(' 4. Push: git push && git push --tags'); | ||
| } | ||
|
|
||
| // Process command line arguments | ||
| const version = process.argv[2]; | ||
| prepareChangelogRelease(version); |
This file was deleted.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.