Fix YAML parsing errors and duplicate bot comments in PR workflows#32
Fix YAML parsing errors and duplicate bot comments in PR workflows#32
Conversation
- 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>
📋 PR Guidelines Validation Report
|
1 similar comment
📋 PR Guidelines Validation Report
|
|
🔧 Version Impact This PR will result in a patch version bump:
🐛 This is a fix or minor improvement - patch version will be incremented. |
1 similar comment
|
🔧 Version Impact This PR will result in a patch version bump:
🐛 This is a fix or minor improvement - patch version will be incremented. |
📋 PR Guidelines Validation Report
|
|
🔧 Version Impact This PR will result in a patch version bump:
🐛 This is a fix or minor improvement - patch version will be incremented. |
|
@copilot why this repaets bro pls fix github-actions bot These are suggestions to improve your PR. While not required, following these guidelines helps maintain code quality. 📖 Resources @github-actions These are suggestions to improve your PR. While not required, following these guidelines helps maintain code quality. 📖 Resources @github-actions github-actions bot added the version:patch label 2 hours ago This PR will result in a patch version bump: Current version: v0.0.5 @github-actions These are suggestions to improve your PR. While not required, following these guidelines helps maintain code quality. 📖 Resources @github-actions This PR will result in a patch version bump: Current version: v0.0.5 @github-actions github-actions bot added the ci/cd label 2 hours ago |
…ng new ones Use an invisible HTML marker comment to identify existing bot comments. On each run, paginate through PR comments to find the marker, then updateComment if found or createComment if first time. Also fix pr-auto-tag.yml to remove stale version:* labels before adding the new one. Co-authored-by: dill-lk <241706614+dill-lk@users.noreply.github.com>
|
🚨 Version Impact This PR will result in a major version bump:
|
📋 PR Guidelines Validation Report
|
|
✨ Thank you @Copilot for your contribution to Gravity-Lang! Your work in PR #32 has been merged and will be part of the next release. We appreciate your continued support! 🚀 |
Three GitHub Actions workflows (
pr-validation.yml,pr-auto-tag.yml,contributor-recognition.yml) silently failed to register with GitHub Actions due to YAML parsing errors, producing 0-job failed runs with the file path as the display name instead of the workflow name. Additionally,pr-validation.ymlandpr-auto-tag.ymlwere posting duplicate bot comments on every PR update event.Root cause (YAML parsing)
Multi-line JavaScript template literals inside
script: |YAML literal blocks had content lines at column 0. YAML terminates a literal block scalar when it encounters a non-empty line less indented than the block — so those lines escaped the block and caused parse failures.Root cause (duplicate comments)
Both
pr-validation.ymlandpr-auto-tag.ymlcalledcreateCommentunconditionally on every workflow trigger (opened,edited,synchronize,reopened), resulting in a new duplicate comment posted for every push or edit to the PR.Fixes
pr-validation.yml:\nescapes<!-- pr-validation-bot -->) to find and update the existing bot comment on subsequent runs instead of creating a new one (with pagination support for PRs with many comments)pr-auto-tag.yml:<!-- pr-auto-tag-bot -->) to find and update the existing bot comment on subsequent runs (with pagination support)version:*labels before adding the new one, preventing label accumulationcontributor-recognition.yml:'good first issue'→'good-first-issue'to match the label defined inlabels.yml💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.