@@ -161,6 +161,7 @@ SET pattern = $2, |
| 161 | prevent_force_push = $3, | 161 | prevent_force_push = $3, |
| 162 | prevent_deletion = $4, | 162 | prevent_deletion = $4, |
| 163 | require_pr_for_push = $5, | 163 | require_pr_for_push = $5, |
| | 164 | + require_signed_commits = $7::boolean, |
| 164 | allowed_pusher_user_ids = $6 | 165 | allowed_pusher_user_ids = $6 |
| 165 | WHERE id = $1 | 166 | WHERE id = $1 |
| 166 | ` | 167 | ` |
@@ -172,6 +173,7 @@ type UpdateBranchProtectionRuleParams struct { |
| 172 | PreventDeletion bool | 173 | PreventDeletion bool |
| 173 | RequirePrForPush bool | 174 | RequirePrForPush bool |
| 174 | AllowedPusherUserIds []int64 | 175 | AllowedPusherUserIds []int64 |
| | 176 | + RequireSignedCommits bool |
| 175 | } | 177 | } |
| 176 | | 178 | |
| 177 | func (q *Queries) UpdateBranchProtectionRule(ctx context.Context, db DBTX, arg UpdateBranchProtectionRuleParams) error { | 179 | func (q *Queries) UpdateBranchProtectionRule(ctx context.Context, db DBTX, arg UpdateBranchProtectionRuleParams) error { |
@@ -182,6 +184,7 @@ func (q *Queries) UpdateBranchProtectionRule(ctx context.Context, db DBTX, arg U |
| 182 | arg.PreventDeletion, | 184 | arg.PreventDeletion, |
| 183 | arg.RequirePrForPush, | 185 | arg.RequirePrForPush, |
| 184 | arg.AllowedPusherUserIds, | 186 | arg.AllowedPusherUserIds, |
| | 187 | + arg.RequireSignedCommits, |
| 185 | ) | 188 | ) |
| 186 | return err | 189 | return err |
| 187 | } | 190 | } |
@@ -206,9 +209,10 @@ const upsertBranchProtectionRule = `-- name: UpsertBranchProtectionRule :one |
| 206 | INSERT INTO branch_protection_rules ( | 209 | INSERT INTO branch_protection_rules ( |
| 207 | repo_id, pattern, | 210 | repo_id, pattern, |
| 208 | prevent_force_push, prevent_deletion, require_pr_for_push, | 211 | prevent_force_push, prevent_deletion, require_pr_for_push, |
| | 212 | + require_signed_commits, |
| 209 | allowed_pusher_user_ids, created_by_user_id | 213 | allowed_pusher_user_ids, created_by_user_id |
| 210 | ) VALUES ( | 214 | ) VALUES ( |
| 211 | - $1, $2, $3, $4, $5, $6, $7::bigint | 215 | + $1, $2, $3, $4, $5, $7::boolean, $6, $8::bigint |
| 212 | ) | 216 | ) |
| 213 | RETURNING id | 217 | RETURNING id |
| 214 | ` | 218 | ` |
@@ -220,6 +224,7 @@ type UpsertBranchProtectionRuleParams struct { |
| 220 | PreventDeletion bool | 224 | PreventDeletion bool |
| 221 | RequirePrForPush bool | 225 | RequirePrForPush bool |
| 222 | AllowedPusherUserIds []int64 | 226 | AllowedPusherUserIds []int64 |
| | 227 | + RequireSignedCommits bool |
| 223 | CreatedByUserID pgtype.Int8 | 228 | CreatedByUserID pgtype.Int8 |
| 224 | } | 229 | } |
| 225 | | 230 | |
@@ -231,6 +236,7 @@ func (q *Queries) UpsertBranchProtectionRule(ctx context.Context, db DBTX, arg U |
| 231 | arg.PreventDeletion, | 236 | arg.PreventDeletion, |
| 232 | arg.RequirePrForPush, | 237 | arg.RequirePrForPush, |
| 233 | arg.AllowedPusherUserIds, | 238 | arg.AllowedPusherUserIds, |
| | 239 | + arg.RequireSignedCommits, |
| 234 | arg.CreatedByUserID, | 240 | arg.CreatedByUserID, |
| 235 | ) | 241 | ) |
| 236 | var id int64 | 242 | var id int64 |