Skip to content

Commit

Permalink
chore: setup declarative configuration for branch protection and rele…
Browse files Browse the repository at this point in the history
…ase-please (#3091)

fixes #3085

This change should migrate all required tests from "settings" tab to
`.github/sync-repo-settings.yaml`. Also setting up release-please
branches for lts.

Sync-repo-settings.yaml is updated referencing [this
guide](https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings),
and settings in google-cloud-java
[here](https://github.com/googleapis/google-cloud-java/blob/main/.github/sync-repo-settings.yaml).

Release-please.yaml is updated referencing
[this](https://github.com/googleapis/repo-automation-bots/tree/main/packages/release-please#configuration)
and google-cloud-java settings
[here](https://github.com/googleapis/google-cloud-java/blob/main/.github/release-please.yml).


**Questions to reviewers:**
- Is permission rules with "yoshi-" teams still accurate? Do we prefer
java specific teams as admin/push?
- This update will override configurations in “Settings” for protected
branches, I do not have access to this tab. Can you please double check
I am not missing anything AND/OR give me access to it?
  • Loading branch information
zhumin8 authored Jan 15, 2025
1 parent 1c6ebae commit b404431
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 34 deletions.
11 changes: 10 additions & 1 deletion .github/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@ bumpMinorPreMajor: true
handleGHRelease: true
primaryBranch: main
manifest: true
extraFiles: ["WORKSPACE", ".cloudbuild/graalvm/cloudbuild.yaml", ".cloudbuild/graalvm/cloudbuild-test-a.yaml", ".cloudbuild/graalvm/cloudbuild-test-b.yaml"]
extraFiles: ["WORKSPACE", ".cloudbuild/graalvm/cloudbuild.yaml", ".cloudbuild/graalvm/cloudbuild-test-a.yaml", ".cloudbuild/graalvm/cloudbuild-test-b.yaml", ".cloudbuild/library_generation/cloudbuild-library-generation-release.yaml", "generation_config.yaml"]
branches:
- branch: 2.23.x
releaseType: java-backport
manifest: true
handleGHRelease: true
- branch: 2.40.x
releaseType: java-backport
manifest: true
handleGHRelease: true
108 changes: 75 additions & 33 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,79 @@ rebaseMergeAllowed: true
squashMergeAllowed: true
mergeCommitAllowed: false
branchProtectionRules:
- pattern: main
isAdminEnforced: true
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- build(8) except for gapic-generator-java
- build(8) for gapic-generator-java
- build (11)
- build (17)
- cla/google
- compatibility
- graalvm-presubmit-sdk-platform-java-a (java-graalvm-ci-prod)
- graalvm-presubmit-sdk-platform-java-b (java-graalvm-ci-prod)
- graalvm-presubmit-sdk-platform-java-a-downstream-kms (java-graalvm-ci-prod)
- graalvm-presubmit-sdk-platform-java-b-downstream-kms (java-graalvm-ci-prod)
- graalvm-presubmit-sdk-platform-java-a-downstream-kmsinventory (java-graalvm-ci-prod)
- graalvm-presubmit-sdk-platform-java-b-downstream-kmsinventory (java-graalvm-ci-prod)
- library_generation
- library-generation-integration-test (java-hermetic-build-prod)
- library-generation-lint-python
- library-generation-lint-shell
- library-generation-unit-tests
- lint
- should-run-library-generation-tests
- showcase (11)
- showcase (17)
- pattern: main
isAdminEnforced: true
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- build(8) except for gapic-generator-java
- build(8) for gapic-generator-java
- build (11)
- build (17)
- cla/google
- compatibility
- graalvm-presubmit-sdk-platform-java-a (java-graalvm-ci-prod)
- graalvm-presubmit-sdk-platform-java-b (java-graalvm-ci-prod)
- graalvm-presubmit-sdk-platform-java-a-downstream-kms (java-graalvm-ci-prod)
- graalvm-presubmit-sdk-platform-java-b-downstream-kms (java-graalvm-ci-prod)
- graalvm-presubmit-sdk-platform-java-a-downstream-kmsinventory (java-graalvm-ci-prod)
- graalvm-presubmit-sdk-platform-java-b-downstream-kmsinventory (java-graalvm-ci-prod)
- library_generation
- library-generation-integration-test (java-hermetic-build-prod)
- library-generation-lint-python
- library-generation-lint-shell
- library-generation-unit-tests
- lint
- should-run-library-generation-tests
- showcase (11)
- showcase (17)
- pattern: 2.23.x
isAdminEnforced: true
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- build (8) except for gapic-generator-java
- build (8) for gapic-generator-java
- build (11)
- build (17)
- showcase (11)
- showcase (17)
- compatibility
- cla/google
- lint
- graalvm-presubmit-sdk-platform-java-a (cloud-devrel-kokoro-resources)
- graalvm-presubmit-sdk-platform-java-b (cloud-devrel-kokoro-resources)
- library-generation-integration-tests
- library-generation-lint-shell
- library-generation-lint-python
- should-run-library-generation-tests
- pattern: 2.40.x
isAdminEnforced: true
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- build (8) except for gapic-generator-java
- build (8) for gapic-generator-java
- build (11)
- build (17)
- build(21) except self-service clients
- showcase (11)
- showcase (17)
- showcase-native
- compatibility
- cla/google
- lint
- graalvm-presubmit-sdk-platform-java-a (cloud-devrel-kokoro-resources)
- graalvm-presubmit-sdk-platform-java-b (cloud-devrel-kokoro-resources)
- library-generation-integration-tests
- library-generation-lint-shell
- library-generation-lint-python
- should-run-library-generation-tests
permissionRules:
- team: yoshi-admins
permission: admin
- team: yoshi-java-admins
permission: admin
- team: yoshi-java
permission: push
- team: cloud-java-team-teamsync
permission: admin
- team: cloud-java-bot
permission: write

0 comments on commit b404431

Please sign in to comment.