Skip to content

Commit 29e4150

Browse files
Copilotdill-lk
andcommitted
Fix YAML parsing errors in PR workflow files
- Replace multi-line JS template literals that had content at column 0 in pr-validation.yml, pr-auto-tag.yml, and contributor-recognition.yml with single-line strings using \\n escape sequences - Fix wrong label name 'good first issue' β†’ 'good-first-issue' in contributor-recognition.yml to match the label defined in labels.yml Co-authored-by: dill-lk <241706614+dill-lk@users.noreply.github.com>
1 parent 4883b70 commit 29e4150

3 files changed

Lines changed: 10 additions & 37 deletions

File tree

β€Ž.github/workflows/contributor-recognition.ymlβ€Ž

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,9 @@ jobs:
3535
3636
let message = '';
3737
if (isFirstTime) {
38-
message = `πŸŽ‰ Congratulations @${author} on your first merged contribution to Gravity-Lang!
39-
40-
This is a significant milestone, and we're grateful for your contribution. We hope this is the first of many!
41-
42-
🌟 You're now officially part of the Gravity-Lang community. Thank you for helping make this project better!`;
38+
message = `πŸŽ‰ Congratulations @${author} on your first merged contribution to Gravity-Lang!\n\nThis is a significant milestone, and we're grateful for your contribution. We hope this is the first of many!\n\n🌟 You're now officially part of the Gravity-Lang community. Thank you for helping make this project better!`;
4339
} else {
44-
message = `✨ Thank you @${author} for your contribution to Gravity-Lang!
45-
46-
Your work in PR #${prNumber} has been merged and will be part of the next release. We appreciate your continued support! πŸš€`;
40+
message = `✨ Thank you @${author} for your contribution to Gravity-Lang!\n\nYour work in PR #${prNumber} has been merged and will be part of the next release. We appreciate your continued support! πŸš€`;
4741
}
4842
4943
await github.rest.issues.createComment({
@@ -119,7 +113,7 @@ Your work in PR #${prNumber} has been merged and will be part of the next releas
119113
const labels = issue.labels.map(l => l.name);
120114
121115
// Only thank for issues that were actually resolved/helpful
122-
if (labels.includes('bug') || labels.includes('enhancement') || labels.includes('good first issue')) {
116+
if (labels.includes('bug') || labels.includes('enhancement') || labels.includes('good-first-issue')) {
123117
await github.rest.issues.createComment({
124118
owner: context.repo.owner,
125119
repo: context.repo.repo,

β€Ž.github/workflows/pr-auto-tag.ymlβ€Ž

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,15 @@ jobs:
9393
// Add comment with version info
9494
const versionEmoji = bumpType === 'major' ? '🚨' : bumpType === 'minor' ? '✨' : 'πŸ”§';
9595
96+
const majorNote = bumpType === 'major' ? '⚠️ This is a **breaking change** - major version will be incremented.' : '';
97+
const minorNote = bumpType === 'minor' ? 'πŸŽ‰ This adds new features - minor version will be incremented.' : '';
98+
const patchNote = bumpType === 'patch' ? 'πŸ› This is a fix or minor improvement - patch version will be incremented.' : '';
99+
96100
await github.rest.issues.createComment({
97101
owner: context.repo.owner,
98102
repo: context.repo.repo,
99103
issue_number: pr.number,
100-
body: `${versionEmoji} **Version Impact**
101-
102-
This PR will result in a **${bumpType}** version bump:
103-
- Current version: \`${latestTag}\`
104-
- Next version (if merged): \`${nextVersion}\`
105-
106-
${bumpType === 'major' ? '⚠️ This is a **breaking change** - major version will be incremented.' : ''}
107-
${bumpType === 'minor' ? 'πŸŽ‰ This adds new features - minor version will be incremented.' : ''}
108-
${bumpType === 'patch' ? 'πŸ› This is a fix or minor improvement - patch version will be incremented.' : ''}
109-
`
104+
body: `${versionEmoji} **Version Impact**\n\nThis PR will result in a **${bumpType}** version bump:\n- Current version: \`${latestTag}\`\n- Next version (if merged): \`${nextVersion}\`\n\n${majorNote}${minorNote}${patchNote}`
110105
});
111106
112107
return {

β€Ž.github/workflows/pr-validation.ymlβ€Ž

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,7 @@ jobs:
240240
owner: context.repo.owner,
241241
repo: context.repo.repo,
242242
issue_number: pr.number,
243-
body: `βœ… **PR Guidelines Validation Passed**
244-
245-
This PR follows all required contributing guidelines! Thank you for following best practices.
246-
247-
πŸ“– See [CONTRIBUTING.md](../CONTRIBUTING.md) for more information.`
243+
body: 'βœ… **PR Guidelines Validation Passed**\n\nThis PR follows all required contributing guidelines! Thank you for following best practices.\n\nπŸ“– See [CONTRIBUTING.md](../CONTRIBUTING.md) for more information.'
248244
});
249245
} else {
250246
// Generate detailed report
@@ -299,19 +295,7 @@ This PR follows all required contributing guidelines! Thank you for following be
299295
300296
// Only add checklist if PR doesn't already have one
301297
if (!body.includes('- [') && !body.includes('- [ ]')) {
302-
const checklist = `### πŸ“ Pre-submission Checklist
303-
304-
Before merging, please ensure:
305-
306-
- [ ] Code follows project coding standards
307-
- [ ] Self-reviewed code changes
308-
- [ ] Added comments for complex logic
309-
- [ ] Updated documentation for functionality changes
310-
- [ ] No new warnings generated
311-
- [ ] Tests added/updated and passing
312-
- [ ] Dependent changes merged and published
313-
314-
You can check these items in your PR description or as you work through them.`;
298+
const checklist = '### πŸ“ Pre-submission Checklist\n\nBefore merging, please ensure:\n\n- [ ] Code follows project coding standards\n- [ ] Self-reviewed code changes\n- [ ] Added comments for complex logic\n- [ ] Updated documentation for functionality changes\n- [ ] No new warnings generated\n- [ ] Tests added/updated and passing\n- [ ] Dependent changes merged and published\n\nYou can check these items in your PR description or as you work through them.';
315299
316300
await github.rest.issues.createComment({
317301
owner: context.repo.owner,

0 commit comments

Comments
Β (0)