From 68eee2b196270e6c67eb10992e565a0f10a21b71 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 12 Oct 2021 12:56:59 -0500 Subject: [PATCH 1/5] chore: disable required linear history on v3 branch This should prevent conflicts when we sync v3 with main. --- .github/sync-repo-settings.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 6572e5982..ab83ebfdb 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -5,6 +5,7 @@ branchProtectionRules: # Defaults to `main` - pattern: main requiresCodeOwnerReviews: true + requiredLinearHistory: true requiresStrictStatusChecks: true requiredStatusCheckContexts: - 'Kokoro' @@ -16,6 +17,7 @@ branchProtectionRules: - 'Samples - Python 3.8' - pattern: v3 requiresCodeOwnerReviews: true + requiredLinearHistory: false requiresStrictStatusChecks: true requiredStatusCheckContexts: - 'Kokoro' From 3b651943d221865b54b30edcb24f99658933e20b Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 12 Oct 2021 14:49:09 -0500 Subject: [PATCH 2/5] try per-branch merge commits --- .github/sync-repo-settings.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index ab83ebfdb..fe9bb556f 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -4,8 +4,8 @@ branchProtectionRules: # Identifies the protection rule pattern. Name of the branch to be protected. # Defaults to `main` - pattern: main + mergeCommitAllowed: false requiresCodeOwnerReviews: true - requiredLinearHistory: true requiresStrictStatusChecks: true requiredStatusCheckContexts: - 'Kokoro' @@ -16,6 +16,7 @@ branchProtectionRules: - 'Samples - Python 3.7' - 'Samples - Python 3.8' - pattern: v3 + mergeCommitAllowed: true requiresCodeOwnerReviews: true requiredLinearHistory: false requiresStrictStatusChecks: true From 8abcbff4e1b3fdaf74a558596f709a5379464027 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 12 Oct 2021 14:49:38 -0500 Subject: [PATCH 3/5] remove unused requireLinearHistory --- .github/sync-repo-settings.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index fe9bb556f..4782855e1 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -18,7 +18,6 @@ branchProtectionRules: - pattern: v3 mergeCommitAllowed: true requiresCodeOwnerReviews: true - requiredLinearHistory: false requiresStrictStatusChecks: true requiredStatusCheckContexts: - 'Kokoro' From a81d4870dfcc3236acc408165d94504d63b30193 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 12 Oct 2021 14:52:20 -0500 Subject: [PATCH 4/5] try requiresLinearHistory --- .github/sync-repo-settings.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 4782855e1..62943298d 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -4,7 +4,7 @@ branchProtectionRules: # Identifies the protection rule pattern. Name of the branch to be protected. # Defaults to `main` - pattern: main - mergeCommitAllowed: false + requiresLinearHistory: true requiresCodeOwnerReviews: true requiresStrictStatusChecks: true requiredStatusCheckContexts: @@ -16,7 +16,7 @@ branchProtectionRules: - 'Samples - Python 3.7' - 'Samples - Python 3.8' - pattern: v3 - mergeCommitAllowed: true + requiresLinearHistory: false requiresCodeOwnerReviews: true requiresStrictStatusChecks: true requiredStatusCheckContexts: From 6850c7f74cc1052835a6f29cd460c6e1ace9d8c0 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 12 Oct 2021 14:55:26 -0500 Subject: [PATCH 5/5] add merge commits back --- .github/sync-repo-settings.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 62943298d..01affbae5 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -1,4 +1,6 @@ # https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings +# Allow merge commits to sync main and v3 with fewer conflicts. +mergeCommitAllowed: true # Rules for main branch protection branchProtectionRules: # Identifies the protection rule pattern. Name of the branch to be protected.