Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case Insensitive Moniker Parsing #7700

Merged
merged 2 commits into from
Feb 16, 2024

Conversation

JimSuplizio
Copy link
Member

@JimSuplizio JimSuplizio commented Feb 16, 2024

The CodeownersUtils was parsing Monikers case sensitive. The problem here is that any line that starts with # and doesn't match a moniker is treated as just a comment and ignored. CODEOWNERS files have blocks that are Moniker/Comment/MonikerOrSourceLine.

The main reason to make the moniker parsing case insensitive is that it would be more painful to try and plumb a casing error through the utils for just the linter. Parsing in any other context (github-event-processor or pipeline-owners-extractor) doesn't error, it throws out CODEOWNERS entries that are in error or, if the case of a mis cased moniker, would omit that piece of data from the entry. For example, if instead of PRLabel, the moniker in the file was prLabel it would treat that as a comment and ignore it but would still have the source path/owner in the CODEOWNERS entry with no PRLabel associated with it.

Moved the update to METADATA.md to this PR instead of the event processor PR.
The change adds a moniker to two example blocks that should have been there.

@JimSuplizio JimSuplizio added the CODEOWNERS Parser Anything related to the CODEOWNERS parser label Feb 16, 2024
@JimSuplizio JimSuplizio self-assigned this Feb 16, 2024
@JimSuplizio JimSuplizio merged commit d04fad1 into Azure:main Feb 16, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CODEOWNERS Parser Anything related to the CODEOWNERS parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants