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

Using Gickup as an all-org downloader and updater? #52

Open
colindean opened this issue Dec 19, 2021 · 7 comments
Open

Using Gickup as an all-org downloader and updater? #52

colindean opened this issue Dec 19, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@colindean
Copy link
Contributor

A tool I've written and rewritten at seemingly every company I've been at is a tool that checks out all of the repos for a project. Oftentimes, this means "checkout all of the repos in an org".

I think Gickup could be the replacement for this, which I've usually written as a Ruby script but one time published this bash+jq script that handled the one-time clone operation.

It's pretty clear that a properly-configured Gickup could download all repos in a single org: I've not tested it, but simply set the username option to the org!

Could Gickup also run in the background, on its cron schedule, and fetch updates so that a dev's copy of all of the org's source has the latest commits in the index so they always have the most up to date changes, even if their working directory is dirty? Put more simply, when Gickup updates, does it expect a clean working directory?

This could be a really cool use case for Gickup: keep your local copies up to date and you need only merge or rebase, e.g. git merge origin/master and you've already got the latest commits as of the last time Gickup ran.

@cooperspencer
Copy link
Owner

I just tested your case.
I used the org name as the user and it cloned all the repos from there. Sadly gickup expects a clean working directory, otherwise it deletes the repo and clones it again. I can implement that it wouldn't remove the repo if the pull fails and just fetches the changes from the origin. Would that help you out?

@cooperspencer cooperspencer added the enhancement New feature or request label Dec 19, 2021
@colindean
Copy link
Contributor Author

Yeah, I think a fetch would be appropriate, with a pull if the working copy is clean.

@cooperspencer
Copy link
Owner

just pushed a new branch fetch_working_dir. You can test if that suits your needs.

@colindean
Copy link
Contributor Author

Will do, I'll probably check this out at work this week.

@cooperspencer
Copy link
Owner

does it work for you? I would push the changes into main if it works out for you

@colindean
Copy link
Contributor Author

Sorry, I ended up taking off this week and am trying not to touch my work laptop. I'll try next week.

@cooperspencer
Copy link
Owner

No worries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants