Skip to content

Fix YAML parsing errors and duplicate bot comments in PR workflows#32

Merged
dill-lk merged 3 commits intomainfrom
copilot/fix-pr-validator-messengers
Mar 11, 2026
Merged

Fix YAML parsing errors and duplicate bot comments in PR workflows#32
dill-lk merged 3 commits intomainfrom
copilot/fix-pr-validator-messengers

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

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.yml and pr-auto-tag.yml were 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.

# BROKEN: content at column 0 terminates the YAML literal block
script: |
  const body = `✅ Validation Passed

This line starts at column 0 — YAML parser exits the block here.`;

Root cause (duplicate comments)

Both pr-validation.yml and pr-auto-tag.yml called createComment unconditionally 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:

    • Converted two multi-line template literals (validation-passed comment, checklist reminder) to single-line strings with \n escapes
    • Uses an invisible HTML marker (<!-- 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:

    • Converted the version impact comment body; extracted inline ternary expressions into named variables
    • Uses an invisible HTML marker (<!-- pr-auto-tag-bot -->) to find and update the existing bot comment on subsequent runs (with pagination support)
    • Removes stale version:* labels before adding the new one, preventing label accumulation
  • contributor-recognition.yml:

    • Converted first-time and returning contributor message template literals
    • Fixed label name mismatch: 'good first issue''good-first-issue' to match the label defined in labels.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.

- 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>
Copilot AI changed the title [WIP] Fix issues with PR validator and messengers Fix YAML parsing errors breaking PR validation and messenger workflows Mar 11, 2026
@github-actions
Copy link
Copy Markdown

📋 PR Guidelines Validation Report

⚠️ Recommendations

⚠️ PR title should follow conventional commit format

These are suggestions to improve your PR. While not required, following these guidelines helps maintain code quality.

📖 Resources


Status: ⚠️ All required checks passed, but consider the recommendations above.

1 similar comment
@github-actions
Copy link
Copy Markdown

📋 PR Guidelines Validation Report

⚠️ Recommendations

⚠️ PR title should follow conventional commit format

These are suggestions to improve your PR. While not required, following these guidelines helps maintain code quality.

📖 Resources


Status: ⚠️ All required checks passed, but consider the recommendations above.

@github-actions github-actions Bot added the version:patch Patch version bump (bug fixes) label Mar 11, 2026
@github-actions
Copy link
Copy Markdown

🔧 Version Impact

This PR will result in a patch version bump:

  • Current version: v0.0.5
  • Next version (if merged): v0.0.6

🐛 This is a fix or minor improvement - patch version will be incremented.

1 similar comment
@github-actions
Copy link
Copy Markdown

🔧 Version Impact

This PR will result in a patch version bump:

  • Current version: v0.0.5
  • Next version (if merged): v0.0.6

🐛 This is a fix or minor improvement - patch version will be incremented.

@github-actions
Copy link
Copy Markdown

📋 PR Guidelines Validation Report

⚠️ Recommendations

⚠️ PR title should follow conventional commit format

These are suggestions to improve your PR. While not required, following these guidelines helps maintain code quality.

📖 Resources


Status: ⚠️ All required checks passed, but consider the recommendations above.

@github-actions
Copy link
Copy Markdown

🔧 Version Impact

This PR will result in a patch version bump:

  • Current version: v0.0.5
  • Next version (if merged): v0.0.6

🐛 This is a fix or minor improvement - patch version will be incremented.

@github-actions github-actions Bot added ci/cd CI/CD workflow changes size/S Small PR (< 50 lines) work-in-progress Work in progress, not ready for review breaking-change Breaking change - major version bump required labels Mar 11, 2026
@dill-lk
Copy link
Copy Markdown
Member

dill-lk commented Mar 11, 2026

@copilot why this repaets bro pls fix github-actions bot
commented
2 hours ago
📋 PR Guidelines Validation Report
⚠️ Recommendations
⚠️ PR title should follow conventional commit format

These are suggestions to improve your PR. While not required, following these guidelines helps maintain code quality.

📖 Resources
Contributing Guidelines
Code of Conduct
Pull Request Template
Status: ⚠️ All required checks passed, but consider the recommendations above.

@github-actions
github-actions bot
commented
2 hours ago
📋 PR Guidelines Validation Report
⚠️ Recommendations
⚠️ PR title should follow conventional commit format

These are suggestions to improve your PR. While not required, following these guidelines helps maintain code quality.

📖 Resources
Contributing Guidelines
Code of Conduct
Pull Request Template
Status: ⚠️ All required checks passed, but consider the recommendations above.

@github-actions github-actions bot added the version:patch label 2 hours ago
@github-actions
github-actions bot
commented
2 hours ago
🔧 Version Impact

This PR will result in a patch version bump:

Current version: v0.0.5
Next version (if merged): v0.0.6
🐛 This is a fix or minor improvement - patch version will be incremented.

@github-actions
github-actions bot
commented
2 hours ago
📋 PR Guidelines Validation Report
⚠️ Recommendations
⚠️ PR title should follow conventional commit format

These are suggestions to improve your PR. While not required, following these guidelines helps maintain code quality.

📖 Resources
Contributing Guidelines
Code of Conduct
Pull Request Template
Status: ⚠️ All required checks passed, but consider the recommendations above.

@github-actions
github-actions bot
commented
2 hours ago
🔧 Version Impact

This PR will result in a patch version bump:

Current version: v0.0.5
Next version (if merged): v0.0.6
🐛 This is a fix or minor improvement - patch version will be incremented.

@github-actions github-actions bot added the ci/cd label 2 hours ago
@github-actions github-actions bot added size/S work-in-progress breaking-change labels [2 hours ago](#32 (comment) and also make more power

…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>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 11, 2026

🚨 Version Impact

This PR will result in a major version bump:

  • Current version: v0.0.5
  • Next version (if merged): v1.0.0

⚠️ This is a breaking change - major version will be incremented.

Copilot AI changed the title Fix YAML parsing errors breaking PR validation and messenger workflows Fix YAML parsing errors and duplicate bot comments in PR workflows Mar 11, 2026
@github-actions github-actions Bot added version:major Major version bump (breaking changes) size/M Medium PR (< 250 lines) and removed version:patch Patch version bump (bug fixes) size/S Small PR (< 50 lines) labels Mar 11, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 11, 2026

📋 PR Guidelines Validation Report

⚠️ Recommendations

⚠️ PR title should follow conventional commit format

These are suggestions to improve your PR. While not required, following these guidelines helps maintain code quality.

📖 Resources


Status: ⚠️ All required checks passed, but consider the recommendations above.

@dill-lk dill-lk marked this pull request as ready for review March 11, 2026 09:40
@dill-lk dill-lk merged commit 594d077 into main Mar 11, 2026
8 of 10 checks passed
@dill-lk dill-lk deleted the copilot/fix-pr-validator-messengers branch March 11, 2026 09:40
@github-actions
Copy link
Copy Markdown

✨ 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! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Breaking change - major version bump required ci/cd CI/CD workflow changes size/M Medium PR (< 250 lines) version:major Major version bump (breaking changes) work-in-progress Work in progress, not ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants