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

Move protected branch determination to handler #2569

Conversation

saquibmian
Copy link
Contributor

This is preparation for protected branches being asserted server side.

This is preparation for protected branches being asserted server side.
GetModuleReleaseBranch(
// IsProtectedBranch is invoked when syncing branches to know if a branch's history is protected
// and must not diverge since the last sync. If an error is returned, sync will abort.
IsProtectedBranch(
Copy link
Member

Choose a reason for hiding this comment

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

Nit: we could invoke just once per module identity and get protectedBranches []string

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could, but the flow isn't like that right now. We cache anyway, so this is fine.

@saquibmian saquibmian merged commit fb220df into main Nov 13, 2023
7 checks passed
@saquibmian saquibmian deleted the saquib/bsr-3027-move-protected-branch-logic-out-to-isprotectedbranch branch November 13, 2023 15:51
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