Skip to content

Commit 640564b

Browse files
authored
Configure merge buttons to attempt fix to .asf.yaml (apache#1304)
The .asf.yaml file is failing with an obscure error message: > An error occurred while processing the github feature in .asf.yaml: > > Validation failed while creating ruleset 'Branch Protection': Invalid request. > > Invalid property /rules/3: data matches no possible input. See `documentation_url`. It appears this error comes from the GitHub API, and basically means that one of the rule configurations is invalid. The ASF YAML docs say that to use require linear history, the squash option must be enabled. I assumed it was by default (because we've been using it exclusively), but this is a shot in the dark to be explicit about it. This will also disable the merge and rebase types which we discourage use of in practice. Additionally, I'm adding the `bypass_teams` that was added automatically by Infra's bot to our other repos, the only other significant difference I could detect. If this doesn't work, we might need to try removing the `required_` rules and see if that works. Otherwise, I'll reach out to Infra for help.
1 parent ff37ad2 commit 640564b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.asf.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ github:
3535
# Enable discussions
3636
discussions: true
3737

38+
enabled_merge_buttons:
39+
squash: true
40+
# default commit message when merging with a squash commit
41+
# can either be: DEFAULT | PR_TITLE | PR_TITLE_AND_COMMIT_DETAILS | PR_TITLE_AND_DESC
42+
squash_commit_message: PR_TITLE
43+
merge: false
44+
rebase: false
45+
3846
rulesets:
3947
- name: "Branch Protection"
4048
type: branch
@@ -44,6 +52,8 @@ github:
4452
- "release/*"
4553
- "docs/*"
4654
excludes: []
55+
bypass_teams:
56+
- root
4757
restrict_deletion: true
4858
restrict_force_push: true
4959
required_linear_history: true

0 commit comments

Comments
 (0)