-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add branch protection #3
Conversation
This comment has been minimized.
This comment has been minimized.
otterdog/eclipse-ibeji.jsonnet
Outdated
@@ -21,8 +21,15 @@ orgs.newOrg('eclipse-ibeji') { | |||
allow_merge_commit: true, | |||
allow_update_branch: false, | |||
delete_branch_on_merge: false, | |||
description: "freyja project", | |||
secret_scanning_push_protection: "disabled", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either this PR or a separate one, but 'secret_scanning_push_protection' should either be removed and/or enabled.
the PR LGTM, just some food for thought. Some projects defined a template for their branch protection rules that they would like to use for all repos so that the settings dont have to be repeated. Take a look here: https://github.com/eclipse-vertx/.eclipsefdn/blob/main/otterdog/eclipse-vertx.jsonnet#L3 this might be of interest for you at some time. |
I like this idea, I'll go ahead and do it here too |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Thomas Neidhart <[email protected]>
Diff for e289266:Printing local diff for configuration at '/home/runner/work/.eclipsefdn/.eclipsefdn/otterdog-configs/otterdog.json'
Actions are indicated with the following symbols:
+ create
! modify
! forced update
- delete
Organization eclipse-ibeji[id=eclipse-ibeji]
! repository[name="freyja"] {
! description = null -> "freyja project"
! secret_scanning_push_protection = "disabled" -> "enabled"
! }
+ add branch_protection_rule[pattern="main", repository="freyja"] {
+ allows_deletions = false
+ allows_force_pushes = false
+ blocks_creations = false
+ bypass_force_push_allowances = []
+ bypass_pull_request_allowances = []
+ dismisses_stale_reviews = true
+ is_admin_enforced = false
+ lock_allows_fetch_and_merge = false
+ lock_branch = false
+ pattern = "main"
+ require_last_push_approval = false
+ required_approving_review_count = "1"
+ required_status_checks = [
+ "eclipse-eca-validation:eclipsefdn/eca"
+ ],
+ requires_code_owner_reviews = false
+ requires_commit_signatures = false
+ requires_conversation_resolution = false
+ requires_deployments = false
+ requires_linear_history = false
+ requires_pull_request = true
+ requires_status_checks = true
+ requires_strict_status_checks = false
+ restricts_pushes = false
+ restricts_review_dismissals = false
+ }
! repository[name="ibeji"] {
! secret_scanning_push_protection = "disabled" -> "enabled"
! }
+ add branch_protection_rule[pattern="main", repository="ibeji"] {
+ allows_deletions = false
+ allows_force_pushes = false
+ blocks_creations = false
+ bypass_force_push_allowances = []
+ bypass_pull_request_allowances = []
+ dismisses_stale_reviews = true
+ is_admin_enforced = false
+ lock_allows_fetch_and_merge = false
+ lock_branch = false
+ pattern = "main"
+ require_last_push_approval = false
+ required_approving_review_count = "1"
+ required_status_checks = [
+ "eclipse-eca-validation:eclipsefdn/eca"
+ ],
+ requires_code_owner_reviews = false
+ requires_commit_signatures = false
+ requires_conversation_resolution = false
+ requires_deployments = false
+ requires_linear_history = false
+ requires_pull_request = true
+ requires_status_checks = true
+ requires_strict_status_checks = false
+ restricts_pushes = false
+ restricts_review_dismissals = false
+ }
! repository[name="ibeji-example-applications"] {
! secret_scanning_push_protection = "disabled" -> "enabled"
! }
+ add branch_protection_rule[pattern="main", repository="ibeji-example-applications"] {
+ allows_deletions = false
+ allows_force_pushes = false
+ blocks_creations = false
+ bypass_force_push_allowances = []
+ bypass_pull_request_allowances = []
+ dismisses_stale_reviews = true
+ is_admin_enforced = false
+ lock_allows_fetch_and_merge = false
+ lock_branch = false
+ pattern = "main"
+ require_last_push_approval = false
+ required_approving_review_count = "1"
+ required_status_checks = [
+ "eclipse-eca-validation:eclipsefdn/eca"
+ ],
+ requires_code_owner_reviews = false
+ requires_commit_signatures = false
+ requires_conversation_resolution = false
+ requires_deployments = false
+ requires_linear_history = false
+ requires_pull_request = true
+ requires_status_checks = true
+ requires_strict_status_checks = false
+ restricts_pushes = false
+ restricts_review_dismissals = false
+ }
Plan: 3 to add, 4 to change, 0 to delete. Showing diff to a canonical version of the configuration at '/home/runner/work/.eclipsefdn/.eclipsefdn/otterdog-configs/otterdog.json'
Organization eclipse-ibeji[id=eclipse-ibeji]
--- original
+++ canonical
@@ -1,15 +1,16 @@
local orgs = import 'vendor/otterdog-defaults/otterdog-defaults.libsonnet';
+local ibejiBranchProtectionRule(branchName) = orgs.newBranchProtectionRule(branchName) {
+
+ dismisses_stale_reviews: true
+ required_approving_review_count: 1
orgs.newOrg('eclipse-ibeji') {
_repositories+:: [
orgs.newRepo('freyja') {
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('main') {
- dismisses_stale_reviews: true
- required_approving_review_count: 1
- }
+ ibejiBranchProtectionRule('main')
]
delete_branch_on_merge: false
description: "freyja project"
@@ -19,10 +20,7 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('main') {
- dismisses_stale_reviews: true
- required_approving_review_count: 1
- }
+ ibejiBranchProtectionRule('main')
]
delete_branch_on_merge: false
description: "ibeji project"
@@ -32,10 +30,7 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('main') {
- dismisses_stale_reviews: true
- required_approving_review_count: 1
- }
+ ibejiBranchProtectionRule('main')
]
delete_branch_on_merge: false
description: "ibeji project example applications and integrations with other components"
@@ -58,3 +53,4 @@
}
}
}
+}; |
changes have been applied. |
Add branch protection rules to Ibeji repos. These are based on the branch protection rules defined for Chariott