Skip to content

Conversation

@GrantBirki
Copy link
Member

resolves: #424

Copilot AI review requested due to automatic review settings November 26, 2025 20:18
@GrantBirki GrantBirki added the bug Something isn't working label Nov 26, 2025
Copilot finished reviewing on behalf of GrantBirki November 26, 2025 20:20
Copy link
Contributor

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 a branch existence check to handle edge cases where deployments are attempted on pull requests with deleted branches (e.g., after merge/close). The fix prevents deployments from failing with unclear errors by proactively checking if the branch exists and providing helpful error messages with alternative deployment options.

Key changes:

  • Adds branch existence validation before proceeding with deployments
  • Implements conditional logic to skip the check for stable branches, SHA deployments, and forks
  • Provides clear, actionable error messages when branches are missing

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/functions/prechecks.js Adds branch existence check with conditional logic to skip for stable branches, SHA deployments, and forks; includes error handling for 404 and unexpected errors
dist/index.js Bundled distribution file reflecting the source changes
tests/functions/prechecks.test.js Comprehensive test coverage for all code paths including success, 404 errors, unexpected errors, and skip conditions

@GrantBirki
Copy link
Member Author

Screenshot 2025-11-26 at 12 21 49 PM

@GrantBirki GrantBirki merged commit 166d5fe into main Nov 26, 2025
4 checks passed
@GrantBirki GrantBirki deleted the deleted-branch-fixes branch November 26, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error on non existing branches

2 participants