generated from EclipseFdn/.eclipsefdn-template
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use branch protection template function everywhere #9
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]>
Diff for 11a9535: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-vertx[id=eclipse-vertx]
there have been 34 validation infos, enable verbose output with '-v' to to display them.
Plan: 0 to add, 0 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-vertx[id=eclipse-vertx]
--- original
+++ canonical
@@ -1,7 +1,38 @@
local orgs = import 'vendor/otterdog-defaults/otterdog-defaults.libsonnet';
+local vertxBranchProtectionRule(branchName) = orgs.newBranchProtectionRule(branchName) {
+
+ required_approving_review_count: null
+ requires_pull_request: false
+ requires_status_checks: false
+ requires_strict_status_checks: true
+};
+local newVertxRepo(repoName, default_branch = 'main') = orgs.newRepo(repoName) {
+
+ allow_merge_commit: true
+ allow_update_branch: false
+ branch_protection_rules: [
+ vertxBranchProtectionRule($.default_branch) {}
+ ]
+ default_branch: default_branch
+ delete_branch_on_merge: false
+ homepage: "http://vertx.io"
+ web_commit_signoff_required: false
orgs.newOrg('eclipse-vertx') {
_repositories+:: [
+ newVertxRepo('vertx-service-resolver', 'main') {
+ description: "Vert.x Service Resolver"
+ homepage: ""
+ topics+: [
+ "java"
+ "jvm"
+ "kubernetes"
+ "loadbalancing"
+ "microservices"
+ "servicediscovery"
+ "vertx"
+ ]
+ }
orgs.newRepo('.github') {
allow_merge_commit: true
allow_update_branch: false
@@ -23,24 +54,9 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('3.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('3.*')
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('master')
]
default_branch: "master"
delete_branch_on_merge: false
@@ -72,24 +88,9 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('3.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('3.*')
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('master')
]
default_branch: "master"
delete_branch_on_merge: false
@@ -111,24 +112,9 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('3.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('3.*')
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('master')
]
default_branch: "master"
delete_branch_on_merge: false
@@ -148,18 +134,8 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('main') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('main')
]
delete_branch_on_merge: false
dependabot_alerts_enabled: false
@@ -170,18 +146,8 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('main') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('main')
]
delete_branch_on_merge: false
dependabot_alerts_enabled: false
@@ -192,18 +158,8 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('master')
]
default_branch: "master"
delete_branch_on_merge: false
@@ -222,18 +178,8 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('master')
]
default_branch: "master"
delete_branch_on_merge: false
@@ -264,18 +210,8 @@
orgs.newRepo('vertx-openapi') {
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('main') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('main')
]
delete_branch_on_merge: false
dependabot_alerts_enabled: false
@@ -286,70 +222,20 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('main') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('main')
]
delete_branch_on_merge: false
dependabot_alerts_enabled: false
web_commit_signoff_required: false
}
- orgs.newRepo('vertx-service-resolver') {
- allow_merge_commit: true
- allow_update_branch: false
- branch_protection_rules: [
- orgs.newBranchProtectionRule('main') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- ]
- delete_branch_on_merge: false
- description: "Vert.x Service Resolver"
- homepage: ""
- topics+: [
- "java"
- "jvm"
- "kubernetes"
- "loadbalancing"
- "microservices"
- "servicediscovery"
- "vertx"
- ]
- web_commit_signoff_required: false
- }
orgs.newRepo('vertx-sql-client') {
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('3.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('_old/*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('3.*')
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('_old/*')
+ vertxBranchProtectionRule('master')
]
default_branch: "master"
delete_branch_on_merge: false
@@ -380,18 +266,8 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('master') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('master')
]
default_branch: "master"
delete_branch_on_merge: false
@@ -412,18 +288,8 @@
allow_merge_commit: true
allow_update_branch: false
branch_protection_rules: [
- orgs.newBranchProtectionRule('4.*') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
- orgs.newBranchProtectionRule('main') {
- required_approving_review_count: null
- requires_pull_request: false
- requires_status_checks: false
- requires_strict_status_checks: true
- }
+ vertxBranchProtectionRule('4.*')
+ vertxBranchProtectionRule('main')
]
delete_branch_on_merge: false
dependabot_alerts_enabled: false
@@ -469,3 +335,4 @@
}
}
}
+}; |
vietj
approved these changes
Oct 16, 2023
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.
As discussed in #8 .
Fyi: for another project we started to use now repository rulesets which are cleaner designed branch protection rules that also have additional features (able to define them on organization level and change between auditing and enforcing mode).
This is currently not supported by the self-service but we will make this a priority to support them, to give you a heads up in case you are wondering or are interested in using them.
Link to the ticket to also explain some use-case that can not be modelled with existing branch protection rules: https://gitlab.eclipse.org/eclipsefdn/security/otterdog/-/issues/53