Skip to content
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

chore: fix branch not found issue #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

siddarthkay
Copy link

@siddarthkay siddarthkay commented Aug 27, 2024

Problem Statement

We use caddy-server and caddy-git plugin to host our websites.
When our deploy branch changed in our github repo from gh-pages to deploy-master we noticed that caddy-git was unable to update a site when the config change indicated a change in branch name.

The core problem was that the deployed repo folder was missing the branch from the remote origin

Solution

In the event of a failure to update a branch this PR adds a case and validates if the update failed due to a change in branch name and if so we fetch the remote and try to switch the branch to the config.
This would ensure the caddy service would not break.

@siddarthkay siddarthkay marked this pull request as ready for review August 27, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant