-
Notifications
You must be signed in to change notification settings - Fork 10
LINBEE-21919 - continue workflow even if branch was deleted #479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added warnings for failed fetch of the head branch if it has been deleted and ensure the action continues even if a checkout fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| OSS Licenses | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨ PR Review
The changes appropriately implement graceful handling of deleted branches by adding error suppression with || true for git operations. However, the silent failure handling could make debugging difficult when operations fail.
1 issues detected:
🧹 Maintainability - Checkout failures are suppressed silently, reducing visibility into workflow execution issues 🛠️
Details: The checkout operations use
|| trueto suppress failures without any logging or warning messages. This makes it difficult to debug issues when git operations fail for reasons other than deleted branches.
File:action.yml (90-92)
🛠️ A suggested code correction is included in the review comments.
Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Review using Guidelines Learn how
MishaKav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds error handling to git operations in the GitHub Action workflow to prevent failures when the head branch has been deleted. The changes ensure the workflow continues execution even when branch checkout operations fail.
Changes:
- Added warning message for failed head branch fetch operations
- Modified git checkout commands to continue on failure using
|| true - Ensured workflow resilience when branches are deleted
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
✨ PR Description
Purpose: Fix workflow to continue execution when head branch has been deleted by adding error handling to git operations.
Main changes:
|| echo "::warning::..."to git fetch command to log warning and continue if upstream head branch fetch fails|| trueto allow workflow continuation even if branch checkout failsGenerated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how