fix(workflows): resolve yaml syntax error and python script exceptions#4938
fix(workflows): resolve yaml syntax error and python script exceptions#4938subodha-wijesekara wants to merge 2 commits intowso2:mainfrom
Conversation
This commit fixes two issues in the GitHub Actions workflows: - resolution_label_notifier.yml: Added missing closing single quote preventing valid YAML parsing. - label_checker.py: Swapped .index() to .find() to avoid ValueError on missing issue template fields and improved robust version extraction.
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughChanges.github/workflows/resolution_label_notifier.ymlFixed a YAML syntax error by adding a missing closing single quote in the workflow condition that checks for the .github/workflows/label_checker.pyEnhanced robustness of the issue label extraction logic:
These changes allow the script to gracefully handle missing template sections without raising errors while maintaining correct label assignment functionality. WalkthroughTwo GitHub Actions workflow-related changes: the label_checker.py script now uses boundary-aware Changes
Estimated code review effort🎯 Medium | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/label_checker.py:
- Around line 19-20: The extraction of component from os.environ["ISSUE_BODY"]
uses indices i and j but only checks they are not -1, allowing wrong order
(e.g., '### Version' before '### Affected Component') which yields malformed
text; change the condition to require i != -1 and j != -1 and j > i before
performing component = os.environ["ISSUE_BODY"][i+23:j].strip() so the slice
only occurs when the Affected Component header appears before the Version
header.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cd0e78cc-ee31-4bc4-b7de-c3d5dcbf0a37
📒 Files selected for processing (2)
.github/workflows/label_checker.py.github/workflows/resolution_label_notifier.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit fixes two issues in the GitHub Actions workflows:
resolution_label_notifier.yml: Added missing closing single quote preventing valid YAML parsing.
label_checker.py: Swapped .index() to .find() to avoid ValueError on missing issue template fields and improved robust version extraction.