Closed thehedgefrog closed 1 year ago
Could you give an example for each option?
Of course.
Make the same include/exclude options on source
available on destination
:
source:
github:
- token: some-token
username: thehedgefrog
wiki: true
starred: true
destination:
local:
- path: /backups/gickup
structured: true
gitea:
- token: some-token
url: https://gitea.mydomain.com
includeorgs:
- thehedgefrog
Allow for more than one source/destination pair in the config file:
source:
github:
- token: some-token
username: thehedgefrog
wiki: true
starred: true
destination:
local:
- path: /backups/gickup
structured: true
source2:
github:
- token: some-token
username: thehedgefrog
wiki: true
includeorgs:
- thehedgefrog
destination2:
gitea:
- token: some-token
url: https://gitea.mydomain.com
That might introduce some breaking changes to configuration file. It is possible to define more than one yaml structure in the same file:
source:
github:
- token: some-token
username: thehedgefrog
wiki: true
starred: true
destination:
local:
- path: /backups/gickup
structured: true
---
source:
github:
- token: some-token
username: thehedgefrog
wiki: true
includeorgs:
- thehedgefrog
destination:
gitea:
- token: some-token
url: https://gitea.mydomain.com
This would enable a lot of flexibility. And I could implement to load more than one config file.
It is possible to define more than one yaml structure in the same file
I think this would work well - and so would more than one config file!
There is a branch called multiple_configs
. can you compile that and tell me if it works for you as expected?
I explained some changes in the example configuration.
Basically, if there is no cron enabled in the first config, then no cron will run at all, doesn't matter if it is configured anywhere else.
If cron is enabled in the first config, but a later config doesn't have a cron parameter, it will just use the one from the first config.
It is also possible to load more configuration files.
I compiled the binary and tested it, it works perfectly.
I also tested multiple config files and that also works.
Awesome
Just add it at the end.
./gickup conf.yml conf2.yml
I made a typo the first time, tested it and it also works perfectly.
Great, then that's a wrap. I will merge it into the main branch and create a new release.
I use Gickup to make a local backup of a lot of repos, including everything I have starred. I would like to copy some of those to my local Gitea, but there isn't a need for me to copy all of them to Gitea for various reasons, one of which being disk space usage.
I would like there to be an option to accomodate this workflow rather than running multiple instances of Gickup, I thought of two approaches:
source
available ondestination
;source
/destination
pair in the config file.I feel like both of those could bring significant improvements to Gickup, but I think the second one could bring more flexibility.