[go: up one dir, main page]

Add documentation for merge request title validation feature

Summary

Create user-facing documentation for the merge request title validation feature. The backend exists but is undocumented, making it invisible to users.

Problem to Solve

Users cannot discover or learn how to use MR title validation because:

  • No documentation exists in user guides
  • Feature is only mentioned in API/GraphQL reference
  • No examples or best practices available

Proposal

Add documentation to: doc/user/project/merge_requests/

Content Needed

1. Feature Overview Page

  • What is MR title validation
  • Why use it (use cases: Jira integration, conventional commits, governance)
  • How it works (blocks merge if title doesn't match regex)

2. Configuration Guide

  • How to enable in project settings
  • How to write regex patterns
  • How to set helpful description text

3. Common Patterns & Examples

  • Jira ticket enforcement: ^[A-Z]+-\d+ .+
  • Conventional commits: ^(feat|fix|docs|chore|refactor|test|style)(\(.+\))?: .+
  • Custom prefixes: ^(FEATURE|BUGFIX|HOTFIX): .+

4. Troubleshooting

  • What users see when validation fails
  • How to fix validation errors
  • How to test regex patterns
  • Draft MR handling

5. API Documentation

  • Link to GraphQL fields
  • Example API calls to configure programmatically

Documentation Updates

Create new page: doc/user/project/merge_requests/title_validation.md

Update existing pages:

  • doc/user/project/settings/merge_requests.md - add settings reference
  • doc/api/merge_requests.md - clarify title_regex status
  • doc/api/graphql/reference/index.md - add usage examples

Acceptance Criteria

  • New documentation page created
  • At least 3 real-world regex examples provided
  • Screenshots of settings UI included
  • Screenshots of error states included
  • API usage examples included
  • Linked from relevant existing pages
  • Reviewed by technical writer
  • Parent: gitlab-org#20108 (Epic)
  • Related: #25689 (original feature request)
  • Depends on: (UI issue - to get screenshots)
Edited by 🤖 GitLab Bot 🤖