Skip to content

Add GitLab CODEOWNERS section support - #53

Open
enginmanapbk wants to merge 1 commit into
hmarr:mainfrom
bookingcom:main
Open

Add GitLab CODEOWNERS section support#53
enginmanapbk wants to merge 1 commit into
hmarr:mainfrom
bookingcom:main

Conversation

@enginmanapbk

Copy link
Copy Markdown

Parse section headers ([Name], [Name][N], ^[Name], ^[Name][N]) and attach section metadata (name, min-approvals threshold, optional flag) to each Rule via a new Section *Section field. Rules that appear before any section header have Section == nil, preserving existing behaviour.

Introduces:

  • Section type in codeowners.go
  • parseSectionHeader helper + currentSection tracking in ParseFile
  • TestParseSectionHeader (unit) and TestParseFile section cases
  • ExampleParseFile_sections runnable example

Parse section headers ([Name], [Name][N], ^[Name], ^[Name][N]) and
attach section metadata (name, min-approvals threshold, optional flag)
to each Rule via a new Section *Section field. Rules that appear before
any section header have Section == nil, preserving existing behaviour.

Introduces:
- Section type in codeowners.go
- parseSectionHeader helper + currentSection tracking in ParseFile
- TestParseSectionHeader (unit) and TestParseFile section cases
- ExampleParseFile_sections runnable example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant