Skip to content

Commit

Permalink
fix linter issues
Browse files Browse the repository at this point in the history
Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
  • Loading branch information
diogoteles08 committed Feb 16, 2024
1 parent 45f7a8c commit 53ed51d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions clients/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ type BranchRef struct {

// BranchProtectionRule captures the settings enabled on a branch for security.
type BranchProtectionRule struct {
PullRequestRule PullRequestRule
AllowDeletions *bool
AllowForcePushes *bool
RequireLinearHistory *bool
EnforceAdmins *bool
RequireLastPushApproval *bool
CheckRules StatusChecksRule
PullRequestRule PullRequestRule
AllowDeletions *bool
AllowForcePushes *bool
RequireLinearHistory *bool
EnforceAdmins *bool
RequireLastPushApproval *bool
CheckRules StatusChecksRule
}

// StatusChecksRule captures settings on status checks.
Expand Down
10 changes: 5 additions & 5 deletions clients/gitlabrepo/branches.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,11 @@ func makeBranchRefFrom(branch *gitlab.Branch, protectedBranch *gitlab.ProtectedB
Name: &branch.Name,
Protected: &branch.Protected,
BranchProtectionRule: clients.BranchProtectionRule{
PullRequestRule: pullRequestReviewRule,
AllowDeletions: newFalse(),
AllowForcePushes: &protectedBranch.AllowForcePush,
EnforceAdmins: newTrue(),
CheckRules: statusChecksRule,
PullRequestRule: pullRequestReviewRule,
AllowDeletions: newFalse(),
AllowForcePushes: &protectedBranch.AllowForcePush,
EnforceAdmins: newTrue(),
CheckRules: statusChecksRule,
},
}

Expand Down

0 comments on commit 53ed51d

Please sign in to comment.