Skip to content

Conversation

@yeelali14
Copy link
Contributor

@yeelali14 yeelali14 commented Jan 19, 2026

  • Added warnings for failed fetch of the head branch if it has been deleted and ensure the action continues even if a checkout fails.
Screenshot 2026-01-20 at 10 55 54

✨ PR Description

Purpose: Fix workflow to continue execution when head branch has been deleted by adding error handling to git operations.
Main changes:

  • Added || echo "::warning::..." to git fetch command to log warning and continue if upstream head branch fetch fails
  • Changed git checkout commands to use || true to allow workflow continuation even if branch checkout fails
  • Modified git branch creation to handle deletion scenarios gracefully without blocking subsequent steps

Generated 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

- Added warnings for failed fetch of the head branch if it has been deleted and  ensure the action continues even if a checkout fails.
Copy link

@orca-security-us orca-security-us bot left a 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
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed OSS Licenses high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

Copy link
Contributor

@gitstream-cm gitstream-cm bot left a 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 || true to 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 MishaKav requested a review from Copilot January 20, 2026 09:00
Copy link
Collaborator

@MishaKav MishaKav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

Copy link

Copilot AI left a 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.

@yeelali14 yeelali14 merged commit 24c7071 into develop Jan 20, 2026
19 checks passed
@yeelali14 yeelali14 deleted the LINBEE-21919-new branch January 20, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants