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

Don't run repository sync on branch deletion. #3

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

johannesbulin
Copy link
Collaborator

Fixed an issue with the sync action that propagates changes from Github to Bitbucket. The problem was that

  • only pushes to the main branch were propagated to Bitbucket.
  • deleting any branch in Github also triggered a corresponding branch-delete in Bitbucket.

So when a non-main branch was created in Github, it was not replicated in Bitbucket (only the main branch). When such a branch was deleted in Github, the sync action tried to delete it in Bitbucket as well, where it didn't exist, causing an error.

I've fixed this by disabling the delete trigger in the sync.yml action. As we only want to keep main in sync (and won't delete this branch at any point), the delete sync isn't necessary.

The alternative would be to sync all branches to Bitbucket, even short-lived branches for pull-requests.

Copy link
Collaborator

@mlange05 mlange05 left a comment

Choose a reason for hiding this comment

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

Yes, looks good to me.

@mlange05 mlange05 merged commit a847cbd into main Nov 12, 2024
9 checks passed
@mlange05 mlange05 deleted the johannesbulin-sync_delete_fix branch November 12, 2024 10:25
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.

2 participants