Skip to content
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

chore: enable branch protection rule and other configurations on digital-product-pass main branch #86

Merged

Conversation

saudkhan116
Copy link
Contributor

Description

FYI @stephanbcbauer

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

@saudkhan116 saudkhan116 requested a review from a team as a code owner June 28, 2024 13:27
Copy link

This is your friendly self-service bot.

Thank you for raising a pull request to update the configuration of your GitHub organization.
You can manually add reviewers to this PR to eventually enable auto-merging.

The following conditions need to fulfilled for auto-merging to be available:

  • valid configuration
  • approved by a project lead
  • does not require any secrets
  • does not update settings only accessible via the GitHub Web UI
  • does not remove any resource
Otterdog commands and options

You can trigger otterdog actions by commenting on this PR:

  • /otterdog team-info checks the team / org membership for the PR author
  • /otterdog validate validates the configuration change
  • /otterdog validate info validates the configuration change, printing also validation infos
  • /otterdog check-sync checks if the base ref is in sync with live settings
  • /otterdog merge merges and applies the changes if the PR is eligible for auto-merging (only accessible for the author)
  • /otterdog done notifies the self-service bot that a required manual apply operation has been performed (only accessible for members of the admin team)
  • /otterdog apply re-apply a previously failed attempt (only accessible for members of the admin team)

Copy link

This is your friendly self-service bot.

The author (saudkhan116) of this PR is associated with this organization in the role of MEMBER.

Additionally, saudkhan116 is a member of the following teams:

This comment has been minimized.

This comment has been minimized.

@saudkhan116 saudkhan116 force-pushed the chore/add-branch-protection-dpp branch from b25ec19 to 1b726ab Compare June 28, 2024 13:30

This comment has been minimized.

This comment has been minimized.

@saudkhan116 saudkhan116 requested a review from a team June 28, 2024 13:36
@netomi netomi force-pushed the chore/add-branch-protection-dpp branch from 1b726ab to 23d63a9 Compare June 28, 2024 13:45

This comment has been minimized.

This comment has been minimized.

Signed-off-by: Thomas Neidhart <[email protected]>
Copy link

This is your friendly self-service bot.
Please find below the validation of the requested configuration changes:

Diff for 3c7096a
Organization automotive.tractusx[id=eclipse-tractusx]
  there have been 65 validation infos, enable verbose output with '-v' to to display them.

  
!   repository[name="digital-product-pass"] {
!     dependabot_security_updates_enabled = false -> true
!     gh_pages_build_type               = "disabled" -> "legacy"
!     gh_pages_source_branch            = null -> "gh-pages"
!     gh_pages_source_path              = "/" -> "/"
!     has_discussions                   = false -> true
!     homepage                          = null -> "https://github.com/eclipse-tractusx/digital-product-pass"
!   }

+  add environment[name="github-pages", repository="digital-product-pass"] {
+    branch_policies                   = [
+      "gh-pages"
+    ],
+    deployment_branch_policy          = "selected"
+    name                              = "github-pages"
+    reviewers                         = []
+    wait_timer                        = "0"
+  }

+  add branch_protection_rule[pattern="main", repository="digital-product-pass"] {
+    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   = "1"
+    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
+  }
  
  Plan: 2 to add, 6 to change, 0 to delete.

@netomi
Copy link
Contributor

netomi commented Jun 28, 2024

LGTM, once approved by a PL you can merge yourself, follow the instructions that will be added as comment.

Copy link

This is your friendly self-service bot. The current configuration is in-sync with the live settings. 🚀

Copy link
Contributor

@matbmoser matbmoser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved from my side, understood that is important to have rules in our repository that can preserve the security. At least one commiter review is required for every pull request to be merged to main. We also want to enabled discussions and the webpage for the documentation to be available.

@netomi netomi merged commit ac57a1f into eclipse-tractusx:main Jul 1, 2024
4 checks passed
Copy link

This is your friendly self-service bot.

The following changes have been successfully applied:

Organization automotive.tractusx[id=eclipse-tractusx]
  there have been 65 validation infos, enable verbose output with '-v' to to display them.

  
!   repository[name="digital-product-pass"] {
!     dependabot_security_updates_enabled = false -> true
!     gh_pages_build_type               = "disabled" -> "legacy"
!     gh_pages_source_branch            = null -> "gh-pages"
!     gh_pages_source_path              = "/" -> "/"
!     has_discussions                   = false -> true
!     homepage                          = null -> "https://github.com/eclipse-tractusx/digital-product-pass"
!   }

+  add environment[name="github-pages", repository="digital-product-pass"] {
+    branch_policies                   = [
+      "gh-pages"
+    ],
+    deployment_branch_policy          = "selected"
+    name                              = "github-pages"
+    reviewers                         = []
+    wait_timer                        = "0"
+  }

+  add branch_protection_rule[pattern="main", repository="digital-product-pass"] {
+    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   = "1"
+    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
+  }

  
  Applying changes:


  Done.
  
  Executed plan: 2 added, 6 changed, 0 deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants