Skip to content

Commit

Permalink
Remove required branch from branch protection rules and use default (
Browse files Browse the repository at this point in the history
…#214)

This makes it so that branch protection rules no longer have a
`required` parameter. Instead, this is replaced by a default value of
`""`

Signed-off-by: Juan Antonio Osorio <[email protected]>
  • Loading branch information
JAORMX authored Nov 18, 2024
1 parent a26b919 commit 5e9722f
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 28 deletions.
3 changes: 1 addition & 2 deletions rule-types/github/branch_protection_allow_deletions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
type: object
Expand Down
3 changes: 1 addition & 2 deletions rule-types/github/branch_protection_allow_force_pushes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
type: object
Expand Down
3 changes: 1 addition & 2 deletions rule-types/github/branch_protection_allow_fork_syncing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
properties:
Expand Down
3 changes: 1 addition & 2 deletions rule-types/github/branch_protection_enabled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
rule_schema: {}
# Defines the configuration for ingesting data relevant for the rule
ingest:
Expand Down
3 changes: 1 addition & 2 deletions rule-types/github/branch_protection_enforce_admins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
properties:
Expand Down
3 changes: 1 addition & 2 deletions rule-types/github/branch_protection_lock_branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
properties:
Expand Down
3 changes: 1 addition & 2 deletions rule-types/github/branch_protection_require_signatures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def:
branch:
type: string
description: "The name of the branch to check. If left empty, the default branch will be used."
required:
- branch
default: ""
# Defines the schema for writing a rule with this rule being checked
rule_schema:
type: object
Expand Down

0 comments on commit 5e9722f

Please sign in to comment.