Skip to content

Commit

Permalink
Fix update by rebase being wrongly disabled by protected base branch (#…
Browse files Browse the repository at this point in the history
…22825)

The branch this is force pushing to is the head branch in the head repo,
so it should be checking if that is protected, not the base.
  • Loading branch information
brechtvl committed Feb 9, 2023
1 parent 137fcc9 commit bdd2c9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/pull/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func IsUserAllowedToUpdate(ctx context.Context, pull *issues_model.PullRequest,
BaseBranch: pull.HeadBranch,
}

pb, err := git_model.GetFirstMatchProtectedBranchRule(ctx, pull.BaseRepoID, pull.BaseBranch)
pb, err := git_model.GetFirstMatchProtectedBranchRule(ctx, pr.BaseRepoID, pr.BaseBranch)
if err != nil {
return false, false, err
}
Expand Down

0 comments on commit bdd2c9d

Please sign in to comment.