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

Branch list tidy up #322

Merged
merged 4 commits into from
Oct 16, 2023
Merged

Branch list tidy up #322

merged 4 commits into from
Oct 16, 2023

Conversation

qtzar
Copy link
Contributor

@qtzar qtzar commented Oct 13, 2023

Sorts the list of branches in a multi-branch site and moves the default branch to the top of the list.

Copy link
Contributor

@jp7677 jp7677 left a comment

Choose a reason for hiding this comment

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

See comments.

@qtzar
Copy link
Contributor Author

qtzar commented Oct 16, 2023

@jp7677 It feels weird having the branch comparator function sitting outside the class. Probably because I'm just not that used to Kotlin :)

@jp7677 jp7677 merged commit 90e9c57 into avisi-cloud:main Oct 16, 2023
2 checks passed
@jp7677
Copy link
Contributor

jp7677 commented Oct 16, 2023

@jp7677 It feels weird having the branch comparator function sitting outside the class. Probably because I'm just not that used to Kotlin :)

I guess both, outside the class or as companion object within the class, would be fine as long as writing tests is still easy. I opted for outside since you could say that sorting with that order is a kind-of general thing. I guess linters would suggest to put it into a separate file with the name BranchComparator.kt.

@qtzar qtzar deleted the BranchListTidyUp branch October 16, 2023 15:20
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.

2 participants