Skip to content

Commit f09cdb2

Browse files
jolheisertechknowlogick
authored andcommitted
Fix protected branch using IssueID (#9348)
Signed-off-by: jolheiser <[email protected]>
1 parent 6e6936d commit f09cdb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/branches.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (protectBranch *ProtectedBranch) HasEnoughApprovals(pr *PullRequest) bool {
153153

154154
// GetGrantedApprovalsCount returns the number of granted approvals for pr. A granted approval must be authored by a user in an approval whitelist.
155155
func (protectBranch *ProtectedBranch) GetGrantedApprovalsCount(pr *PullRequest) int64 {
156-
approvals, err := x.Where("issue_id = ?", pr.Issue.ID).
156+
approvals, err := x.Where("issue_id = ?", pr.IssueID).
157157
And("type = ?", ReviewTypeApprove).
158158
And("official = ?", true).
159159
Count(new(Review))

0 commit comments

Comments
 (0)