Skip to content

Move protected branch determination to handler#2569

Merged
saquibmian merged 2 commits intomainfrom
saquib/bsr-3027-move-protected-branch-logic-out-to-isprotectedbranch
Nov 13, 2023
Merged

Move protected branch determination to handler#2569
saquibmian merged 2 commits intomainfrom
saquib/bsr-3027-move-protected-branch-logic-out-to-isprotectedbranch

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
@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