Yicong-Huang opened a new pull request, #5050:
URL: https://github.com/apache/texera/pull/5050
### What changes were proposed in this PR?
This PR is a follow-up to #5036 to make the GitHub ruleset payload accepted
by the repository rulesets API after ASF Infra reported validation errors for
the rules array.
Configuration changes:
- Rename the ruleset from `Merge Queue` to `merge-queue-texera`, matching
the ASF-provided naming style.
- Remove `source_type` and `source` from the raw ruleset payload because
they are response fields and are not needed in the create request body.
- Add `allowed_merge_methods: [squash]` to the `pull_request` rule so the
pull request rule explicitly matches the repository merge policy.
- Remove `do_not_enforce_on_create` from the `required_status_checks` rule
to keep the payload aligned with the asfyaml raw ruleset example.
- Remove `integration_id: -1` from required status checks because direct
GitHub API validation rejected `-1` as an invalid integration id, while
omitting the field is accepted.
Validation notes:
- A temporary disabled ruleset was created successfully on the fork with the
same payload after removing the `merge_queue` rule, confirming the
`pull_request` and `required_status_checks` payloads now pass GitHub API
validation.
- The temporary disabled ruleset was deleted immediately after validation.
- Direct API validation on the fork still rejects the `merge_queue` rule
with `Invalid rule 'merge_queue'`, which may be specific to fork/repository
feature availability. This PR still reduces the payload errors that were
previously reported for `/rules/3` and `/rules/5`.
### Any related issues, documentation, discussions?
Related to #4553 and follow-up to #5036.
### How was this PR tested?
Ran local configuration checks:
```bash
ruby -e 'require "yaml"; cfg=YAML.load_file(".asf.yaml");
rs=cfg.dig("github", "rulesets").find { |r| r["name"] == "merge-queue-texera"
}; abort "missing ruleset" unless rs; abort "unexpected source fields" if
rs.key?("source_type") || rs.key?("source"); pr=rs["rules"].find { |r|
r["type"] == "pull_request" }; abort "missing allowed_merge_methods" unless
pr.dig("parameters", "allowed_merge_methods") == ["squash"];
status=rs["rules"].find { |r| r["type"] == "required_status_checks" }; abort
"unexpected do_not_enforce_on_create" if
status["parameters"].key?("do_not_enforce_on_create"); abort "unexpected
integration_id" if status["parameters"]["required_status_checks"].any? { |c|
c.key?("integration_id") }; puts "ruleset sanity ok"'
git diff --check
```
Also validated the non-merge-queue portion of the payload against the GitHub
repository rulesets API on the fork by creating and deleting a temporary
disabled ruleset.
No automated runtime tests were added because this PR only changes
repository configuration.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex (GPT-5)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]