generated from EclipseFdn/.eclipsefdn-template
-
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
Create / update consistent bpr for all repos #6
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
Signed-off-by: Thomas Neidhart <[email protected]>
This comment has been minimized.
This comment has been minimized.
jonahgraham
approved these changes
Sep 19, 2023
Signed-off-by: Thomas Neidhart <[email protected]>
Diff for 26f5c76: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-cdt[id=eclipse-cdt]
there have been 2 validation infos, enable verbose output with '-v' to to display them.
+ add branch_protection_rule[pattern="main", repository=".github"] {
+ 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"
+ push_restrictions = []
+ require_last_push_approval = false
+ required_approving_review_count = "0"
+ 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
+ }
- remove branch_protection_rule[pattern="*", repository="cdt"] {
- allows_deletions = false
- allows_force_pushes = false
- blocks_creations = false
- bypass_force_push_allowances = []
- bypass_pull_request_allowances = [
- "@jonahgraham"
- ],
- dismisses_stale_reviews = false
- is_admin_enforced = false
- lock_allows_fetch_and_merge = false
- lock_branch = false
- pattern = "*"
- push_restrictions = []
- 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 = false
- requires_pull_request = true
- requires_status_checks = false
- restricts_pushes = false
- restricts_review_dismissals = false
- }
+ add branch_protection_rule[pattern="main", repository="cdt"] {
+ 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"
+ push_restrictions = []
+ require_last_push_approval = false
+ required_approving_review_count = "0"
+ 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
+ }
+ add branch_protection_rule[pattern="cdt_*", repository="cdt"] {
+ 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 = "cdt_*"
+ push_restrictions = []
+ require_last_push_approval = false
+ required_approving_review_count = "0"
+ 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
+ }
+ add branch_protection_rule[pattern="master", repository="cdt-lsp"] {
+ 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 = "master"
+ push_restrictions = []
+ require_last_push_approval = false
+ required_approving_review_count = "0"
+ 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: 4 to add, 0 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-cdt[id=eclipse-cdt]
--- original
+++ canonical
@@ -1,13 +1,16 @@
local orgs = import 'vendor/otterdog-defaults/otterdog-defaults.libsonnet';
+local custom_branch_protection_rule(pattern) =
+ orgs.newBranchProtectionRule(pattern) {
+
+ required_approving_review_count: 0
+ };
orgs.newOrg('eclipse-cdt') {
_repositories+:: [
orgs.newRepo('.github') {
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('main') {
- required_approving_review_count: 0
- }
+ custom_branch_protection_rule('main')
]
dependabot_alerts_enabled: false
description: "Eclipse CDT™ C/C++ Development Tools"
@@ -21,12 +24,8 @@
allow_merge_commit: false
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('cdt_*') {
- required_approving_review_count: 0
- }
- orgs.newBranchProtectionRule('main') {
- required_approving_review_count: 0
- }
+ custom_branch_protection_rule('cdt_*')
+ custom_branch_protection_rule('main')
]
dependabot_security_updates_enabled: true
description: "Eclipse CDT™ C/C++ Development Tools"
@@ -38,9 +37,7 @@
orgs.newRepo('cdt-infra') {
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: 0
- }
+ custom_branch_protection_rule('master')
]
default_branch: "master"
dependabot_security_updates_enabled: true
@@ -51,9 +48,7 @@
allow_merge_commit: false
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: 0
- }
+ custom_branch_protection_rule('master')
]
default_branch: "master"
description: "Eclipse CDT™ LSP Extensions for CDT"
@@ -63,9 +58,7 @@
orgs.newRepo('cdt-new-managedbuild-prototype') {
archived: true
branch_protection_rules: [
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: 0
- }
+ custom_branch_protection_rule('master')
]
default_branch: "master"
description: "Prototype of new Managed Build system for Eclipse CDT"
@@ -74,9 +67,7 @@
orgs.newRepo('cdt-vscode') {
archived: true
branch_protection_rules: [
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: 0
- }
+ custom_branch_protection_rule('master')
]
default_branch: "master"
description: "C/C++ Development Tooling (CDT) Visual Studio Code extension" |
For eclipse-cdt org repos you can make it for all branches as the flow recommends not to push private branches to the repo. |
so the pattern should be changed to * for all repos? |
Yes please. |
eclipse-cdt-bot
added a commit
that referenced
this pull request
Sep 19, 2023
pushed commit to apply bpr to all branches in 91611eb |
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 fixes also #4 .
For the cdt repo, I changed the pattern from * to the main branch only but the cdt_* branches could also be included?