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

Optimize branch protection rule loading #32280

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

6543
Copy link
Member

@6543 6543 commented Oct 16, 2024

currently we only sort branch protection rules by creation time and type.

this change the order for non glob names as it make no difference to be alphabetical.


Sponsored by Kithara Software GmbH

@6543 6543 added the type/enhancement An improvement of existing functionality label Oct 16, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 16, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 16, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Oct 16, 2024
@6543
Copy link
Member Author

6543 commented Oct 16, 2024

the followup work will make glob rules order by user define priority ... so you dont have to delete and recreate rules just to have the correct order ...

@confusedsushi
Copy link
Contributor

I suggest to not handle the non-glob rules differently. I can imagine a order of rules where a non-glob rule might should kick in between two glob rules. Also from a user perspective it is probably confusing why the one rule is added "in the middle" while the other is added to the end.

If you handle both type the same the user interface becomes easier understandable.

@6543 6543 changed the title Order branch protection rule that are not globs by name Optimize branch protection rule loading Oct 17, 2024
@6543 6543 added type/refactoring Existing code has been cleaned up. There should be no new functionality. and removed type/enhancement An improvement of existing functionality labels Oct 17, 2024
@6543 6543 requested a review from lunny October 17, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/go Pull requests that update Go code size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants