-
Notifications
You must be signed in to change notification settings - Fork 10
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] Allow generated output to be placed relative to other rules #343
Labels
enhancement
New feature or request
Comments
thank you @alexlo03 for your request! Sounds very doable actually. To summarize: That's something we can do. I will have to add an option like |
gagoar
added a commit
that referenced
this issue
Mar 22, 2023
## Description This PR adds a new option to preserve the position of the generated block if the user so desires. this is helpful when there's certain strict order the developer wants to keep. Normally because there are manual entries. This closes #343 Missing: - [x] CLI option - [x] Documentation - [x] Logic Refactor (because it looks ugly what I did) Extra: So I was playing with ChatGPT, and I decided to ask for rewrites on my code the changes are not that bad. So I left them in
Merged
gagoar
added a commit
that referenced
this issue
Mar 23, 2023
Bumping version 2.2.0 That comes with: - Preserve block position [`#347`](#347) - ChatGPT rewrote it [`#349`](#349) - Using swc instead of ts-jest [`#348`](#348) - Update Node.js to v16.19.1 [`#341`](#341) - Update dependency husky to v8.0.3 [`#339`](#339) - adding composite action to use codeowners-generator in a workflow [`#337`](#337) - 2.1.5 [`#346`](#346) - Preserve block position (#347) [`#343`](#343) - adding composite action to use codeowners-generator in a workflow (#337) [`#335`](#335)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I am unable to get the CODEOWNERS output to be ordered. Since order determines rule precedence, it is something I need in order to use this solution. For example I may have a super rule that is like **/special.yaml is only editable by maintainers no matter where it is in the repo. I can do this by putting it at the bottom of the CODEOWNERS file.
Describe the solution you'd like
Presently the codeowners-generator wants to put its output at the BOTTOM of the CODEOWNERS file. I would like it to look for "# GENERATE_CODEOWNERS_HERE" and place the block there if it exists.
I would place that token in the middle of my existing CODEOWNERS file, because the bottom rules are important and need to take precedence.
Describe alternatives you've considered
I may be able to do this with the "run after" script, but it seems possible to do this as a first class feature.
Additional context
Maybe I missed a better way to do this? If so, apologies!
The text was updated successfully, but these errors were encountered: