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

[FEATURE] Fewer comments in the generated CODEOWNERS file #164

Closed
gustavkj opened this issue Jan 19, 2021 · 2 comments · Fixed by #168
Closed

[FEATURE] Fewer comments in the generated CODEOWNERS file #164

gustavkj opened this issue Jan 19, 2021 · 2 comments · Fixed by #168
Assignees
Labels
enhancement New feature or request

Comments

@gustavkj
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Right now, a comment (e.g. # Rule extracted from dir1/CODEOWNERS) is added before every rule in the generated CODEOWNERS file. This is quite noisy.

# Rule extracted from dir1/CODEOWNERS
/dir1/**/README.md @miny
# Rule extracted from dir1/CODEOWNERS
/dir1/README.md @moe
# Rule extracted from dir2/CODEOWNERS
/dir2/**/*.ts @moe
# Rule extracted from dir2/CODEOWNERS
/dir2/dir3/*.ts @miny

Describe the solution you'd like
I suggest having one comment before each collection or rules from each file.

The example above would then be:

# Rule(s) extracted from dir1/CODEOWNERS
/dir1/**/README.md @miny
/dir1/README.md @moe
# Rule(s) extracted from dir2/CODEOWNERS
/dir2/**/*.ts @moe
/dir2/dir3/*.ts @miny

Describe alternatives you've considered
I haven't considered any other solutions for this.

Additional context
I can help fix this. But adding issue for discussion and track keeping.

@gustavkj gustavkj added the enhancement New feature or request label Jan 19, 2021
@gagoar
Copy link
Owner

gagoar commented Jan 19, 2021

good idea @gustavkj we didn't do it because we have very big nested codeowners and ppl was losing track of what was going on. I will consider this added as a feature in the configuration, thoughts?
groupSourceComments: true or something to that effect.

@gustavkj
Copy link
Collaborator Author

A config option sounds good!

@gagoar gagoar self-assigned this Jan 21, 2021
gagoar added a commit that referenced this issue Jan 22, 2021
## Description

This PR addresses the requested feature in (closes #164) by @gustavkj 

the option is `groupSourceComments` or `--group-source-comments` when used in the cli. 

It will avoid adding a comment per rule found and instead will group the comment per source.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants