mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-01-30 06:22:04 +00:00
Replace heredoc-in-command-substitution pattern with script-based release notes
generation to fix YAML parser interpretation issues.
Root cause:
- GitHub Actions YAML parser interprets heredoc content inside $() as YAML structure
- Line 149 error: parser expected ':' after '### Initial Release'
- Pattern: NOTES=$(cat <<EOF...) causes content to be parsed as YAML
Solution:
- Created scripts/generate-initial-release-notes.js (mirrors generate-release-notes.js)
- Script outputs markdown that YAML parser doesn't interpret
- Keeps --- separators (safe in script output, not in heredocs)
- Consistent pattern across workflow (all release notes from scripts)
Benefits:
- Fixes CI failures since Oct 24 (commit 0e26ea6)
- YAML validates successfully with Python yaml.safe_load()
- Easier to test and maintain release note generation
- No need to change --- to ___ separators
Testing:
- Script generates correct markdown locally
- YAML syntax validated
- TypeScript builds and type checks pass
Fixes: Release workflow runs 18806809439, 18806655633, 18806137471, etc.
Related: PR #371 (different approach attempted)
Concieved by Romuald Członkowski - www.aiadvisors.pl/en
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Generate release notes for the initial release
|
|
* Used by GitHub Actions when no previous tag exists
|
|
*/
|
|
|
|
const { execSync } = require('child_process');
|
|
|
|
function generateInitialReleaseNotes(version) {
|
|
try {
|
|
// Get total commit count
|
|
const commitCount = execSync('git rev-list --count HEAD', { encoding: 'utf8' }).trim();
|
|
|
|
// Generate release notes
|
|
const releaseNotes = [
|
|
'### 🎉 Initial Release',
|
|
'',
|
|
`This is the initial release of n8n-mcp v${version}.`,
|
|
'',
|
|
'---',
|
|
'',
|
|
'**Release Statistics:**',
|
|
`- Commit count: ${commitCount}`,
|
|
'- First release setup'
|
|
];
|
|
|
|
return releaseNotes.join('\n');
|
|
|
|
} catch (error) {
|
|
console.error(`Error generating initial release notes: ${error.message}`);
|
|
return `Failed to generate initial release notes: ${error.message}`;
|
|
}
|
|
}
|
|
|
|
// Parse command line arguments
|
|
const version = process.argv[2];
|
|
|
|
if (!version) {
|
|
console.error('Usage: generate-initial-release-notes.js <version>');
|
|
process.exit(1);
|
|
}
|
|
|
|
const releaseNotes = generateInitialReleaseNotes(version);
|
|
console.log(releaseNotes);
|