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

Extend approval options (#3348) #4429

Merged
merged 19 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli/repo/repo_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func repoUpdate(ctx context.Context, c *cli.Command) error {
}
// TODO: remove isGated in next major release
if c.IsSet("gated") {
log.Warn().Msgf("Deprecated 'gated' option was used, use 'require-approval' in the future to update an repo settings.")
6543 marked this conversation as resolved.
Show resolved Hide resolved
if gated {
6543 marked this conversation as resolved.
Show resolved Hide resolved
patch.RequireApproval = &woodpecker.RequireApprovalAllEvents
} else {
Expand Down
1 change: 1 addition & 0 deletions server/pipeline/gated.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func needsApproval(repo *model.Repo, pipeline *model.Pipeline) bool {
return false
}

// to be non breaking we have this case till v3.0.0
6543 marked this conversation as resolved.
Show resolved Hide resolved
if repo.RequireApproval == model.RequireApprovalNotSet {
6543 marked this conversation as resolved.
Show resolved Hide resolved
repo.RequireApproval = model.RequireApprovalNone
}
Expand Down