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

Preserve block position #347

Merged
merged 7 commits into from
Mar 22, 2023
Merged

Preserve block position #347

merged 7 commits into from
Mar 22, 2023

Conversation

gagoar
Copy link
Owner

@gagoar gagoar commented Mar 19, 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:

  • CLI option
  • Documentation
  • 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

@gagoar gagoar requested a review from gustavkj March 19, 2023 22:24
@coveralls
Copy link
Collaborator

coveralls commented Mar 19, 2023

Pull Request Test Coverage Report for Build 4464484702

  • 33 of 33 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 4463753938: 0.0%
Covered Lines: 262
Relevant Lines: 262

💛 - Coveralls

@codecov
Copy link

codecov bot commented Mar 19, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (4bc8d89) 100.00% compared to head (99e19a0) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #347   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        11    +1     
  Lines          262       277   +15     
  Branches        57        60    +3     
=========================================
+ Hits           262       277   +15     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/utils/constants.ts 100.00% <ø> (ø)
src/commands/generate.ts 100.00% <100.00%> (ø)
src/utils/codeowners.ts 100.00% <100.00%> (ø)
src/utils/getCustomConfiguration.ts 100.00% <100.00%> (ø)
src/utils/templates.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gagoar gagoar force-pushed the gg/preserve-block-position branch 5 times, most recently from 48cfe90 to 5e785c9 Compare March 19, 2023 23:37
@gagoar gagoar force-pushed the gg/preserve-block-position branch from 5e785c9 to 0e96095 Compare March 19, 2023 23:51
@gagoar gagoar force-pushed the gg/preserve-block-position branch from b898295 to f8d048b Compare March 20, 2023 02:48
Copy link
Collaborator

@gustavkj gustavkj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 But I think it might be hard to keep only parts of a repos ownership with this tool, but if this help then that's a plus 🙂

@gagoar
Copy link
Owner Author

gagoar commented Mar 21, 2023

Looks good 👍 But I think it might be hard to keep only parts of a repos ownership with this tool, but if this help then that's a plus 🙂

Yea, I think it is logical to want to keep some pieces at the top. and some others govern by the tool. It is a balancing act as well.

I will prefer ppl just using codeowners-generator and forget about this file altogether. I do recognize an in-between state tho.

@gagoar gagoar merged commit 932c34b into master Mar 22, 2023
@gagoar gagoar deleted the gg/preserve-block-position branch March 22, 2023 03:22
@gagoar gagoar mentioned this pull request Mar 22, 2023
gagoar added a commit that referenced this pull request 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Allow generated output to be placed relative to other rules
3 participants