Expand PushRulesType to expose all push rule fields
What does this MR do and why?
Contributes to #509936
Problem
The PushRulesType GraphQL type only exposed reject_unsigned_commits,
while the REST API exposes all push rule fields. This limits GraphQL
clients from querying the full push rules configuration.
Solution
Add all push rule fields to PushRulesType to achieve parity with the
REST API. Feature-gated fields (commit_committer_check,
commit_committer_name_check, reject_unsigned_commits,
reject_non_dco_commits) return false when unavailable.
References
- Issue: #509936
- REST API reference:
ee/lib/api/project_push_rule.rb
How to set up and validate locally
- Visit: http://gdk.test:3000/-/graphql-explorer
- Query a project with push rules configured:
query { project(fullPath: "your/project") { pushRules { denyDeleteTag memberCheck preventSecrets commitMessageRegex commitMessageNegativeRegex branchNameRegex authorEmailRegex fileNameRegex maxFileSize commitCommitterCheck commitCommitterNameCheck rejectUnsignedCommits rejectNonDcoCommits } } } - Verify all fields return expected values
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Vasilii Iakliushin