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

Order of projects in Git and GitHub modules not consistant #551

Closed
yelvert opened this issue Aug 28, 2019 · 6 comments
Closed

Order of projects in Git and GitHub modules not consistant #551

yelvert opened this issue Aug 28, 2019 · 6 comments
Labels
💪 improvement "Where we're going, we don't need roads."

Comments

@yelvert
Copy link

yelvert commented Aug 28, 2019

What's broken?

The order of the repos/projects in both the Git and GitHub modules changes every time wtfutil is restarted or the config file is reloaded.

For Git, I would expect the order of the repos to match the order of the array in the config file.
For GitHub, maybe the list of repos in the config file should be changed to an array, then display them in the module in that order.

@senorprogrammer senorprogrammer added the 💪 improvement "Where we're going, we don't need roads." label Aug 29, 2019
@Seanstoppable
Copy link
Collaborator

@yelvert Are you using the map version of the config, or the list version for github? Maps in go do not guarantee order. I haven't seen this behavior using the list version.

For git, it looks like we are deliberately sorting alphabetically for some reason. I've opened a PR to review that behavior

@yelvert
Copy link
Author

yelvert commented Sep 5, 2019 via email

@Seanstoppable
Copy link
Collaborator

I'd switch to list for github. With a map there is no way to guarantee the order in the config will be the same as the order we end up with.

@yelvert
Copy link
Author

yelvert commented Sep 5, 2019 via email

@Seanstoppable
Copy link
Collaborator

Sounds good. If you have problems lemme know and we'll figure that part out too.

@senorprogrammer
Copy link
Collaborator

I've fixed the GitHub documentation to show the list ordering https://wtfutil.com/modules/github/

Between using a list for github, and PR #608 for git, repository ordering should now obey the configuration list order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 improvement "Where we're going, we don't need roads."
Development

No branches or pull requests

3 participants