generated from EclipseFdn/.eclipsefdn-template
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Create default branch protection and start using it #7
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
LGTM, ty for picking this up and your rationale wrt stable repos is absolutely reasonable. |
Only applies it to "stable" repos
SebastianSchildt
approved these changes
Oct 25, 2023
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.
lgtm
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Thomas Neidhart <thomas.neidhart@eclipse-foundation.org>
Diff for f8ea7f1: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-kuksa[id=eclipse-kuksa]
+ add branch_protection_rule[pattern="main", repository="kuksa-actions"] {
+ 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 = true
+ 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 = true
+ restricts_pushes = false
+ restricts_review_dismissals = false
+ }
! branch_protection_rule[pattern="main", repository="kuksa-hardware"] {
! dismisses_stale_reviews = false -> true
! require_last_push_approval = false -> true
! required_approving_review_count = "0" -> "1"
! requires_linear_history = true -> false
! requires_status_checks = false -> true
! }
+ add branch_protection_rule[pattern="main", repository="kuksa-viss"] {
+ 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 = true
+ 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 = true
+ restricts_pushes = false
+ restricts_review_dismissals = false
+ }
- remove branch_protection_rule[pattern="main", repository="kuksa-website"] {
- allows_deletions = false
- allows_force_pushes = false
- blocks_creations = false
- bypass_force_push_allowances = []
- bypass_pull_request_allowances = []
- dismisses_stale_reviews = false
- is_admin_enforced = false
- lock_allows_fetch_and_merge = false
- lock_branch = false
- pattern = "main"
- require_last_push_approval = false
- required_approving_review_count = "0"
- requires_code_owner_reviews = false
- requires_commit_signatures = false
- requires_conversation_resolution = false
- requires_deployments = false
- requires_linear_history = true
- requires_pull_request = true
- requires_status_checks = false
- restricts_pushes = false
- restricts_review_dismissals = false
- }
! branch_protection_rule[pattern="master", repository="kuksa-website"] {
! dismisses_stale_reviews = false -> true
! require_last_push_approval = false -> true
! required_approving_review_count = "0" -> "1"
! requires_linear_history = true -> false
! requires_status_checks = false -> true
! }
Plan: 2 to add, 10 to change, 1 to delete. Showing diff to a canonical version of the configuration at '/home/runner/work/.eclipsefdn/.eclipsefdn/otterdog-configs/otterdog.json'
Organization eclipse-kuksa[id=eclipse-kuksa]
--- original
+++ canonical
@@ -1,17 +1,22 @@
local orgs = import 'vendor/otterdog-defaults/otterdog-defaults.libsonnet';
+
+local kuksa_default_branch_protection_rule(pattern) =
+ orgs.newBranchProtectionRule(pattern) {
+
+
+ dismisses_stale_reviews: true
+ require_last_push_approval: true
+ required_approving_review_count: 1
+ requires_strict_status_checks: true
+ };
orgs.newOrg('eclipse-kuksa') {
_repositories+:: [
orgs.newRepo('kuksa-actions') {
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('main') {
- dismisses_stale_reviews: true
- require_last_push_approval: true
- required_approving_review_count: 1
- requires_strict_status_checks: true
- }
+ kuksa_default_branch_protection_rule('main')
]
delete_branch_on_merge: false
dependabot_security_updates_enabled: true
@@ -26,12 +31,7 @@
allow_squash_merge: false
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('main') {
- dismisses_stale_reviews: true
- require_last_push_approval: true
- required_approving_review_count: 1
- requires_strict_status_checks: true
- }
+ kuksa_default_branch_protection_rule('main')
]
dependabot_security_updates_enabled: true
web_commit_signoff_required: false
@@ -53,12 +53,7 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('main') {
- dismisses_stale_reviews: true
- require_last_push_approval: true
- required_approving_review_count: 1
- requires_strict_status_checks: true
- }
+ kuksa_default_branch_protection_rule('main')
]
delete_branch_on_merge: false
dependabot_alerts_enabled: false
@@ -73,12 +68,7 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('main') {
- dismisses_stale_reviews: true
- require_last_push_approval: true
- required_approving_review_count: 1
- requires_strict_status_checks: true
- }
+ kuksa_default_branch_protection_rule('main')
]
delete_branch_on_merge: false
dependabot_security_updates_enabled: true
@@ -91,12 +81,7 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('master') {
- dismisses_stale_reviews: true
- require_last_push_approval: true
- required_approving_review_count: 1
- requires_strict_status_checks: true
- }
+ kuksa_default_branch_protection_rule('master')
]
default_branch: "master"
delete_branch_on_merge: false |
netomi
approved these changes
Oct 25, 2023
changes are live. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR intends to align KUKSA branch protection, following the same principles that have been discussed in the team:
Fixes #4
Not to be merged until approved by either @SebastianSchildt or @lukasmittag