152 Commits
Author SHA1 Message Date
Andreas Wachter fa2dfd4434 Sourcehut (#123)
* added createorg to gogs

* added sourcehut capabilities

* fix variable names

* added sourcehut to readme
v0.10.7
2022-11-16 08:09:33 +01:00
Andreas Wachter 8a84f57965 create orgs for gitea with 'createorg: true' 2022-10-30 22:42:23 +01:00
Andreas Wachter 0967462c1a added token to gitea client 2022-10-30 22:19:23 +01:00
Andreas Wachter 527e740ed7 check if config is nil (#118) v0.10.6 2022-10-18 10:34:11 +02:00
Andreas Wachter 5dbb12fb8a added onedev to source count 2022-10-18 09:53:00 +02:00
Andreas Wachter a24234ac1f added just file 2022-10-17 12:08:04 +02:00
Andreas Wachter 6373ddf5a1 remove print of includeOrgs in Onedev 2022-10-12 07:18:07 +02:00
Andreas Wachter 9f18ce034c upgraded CodeQL to v2 2022-10-11 12:23:13 +02:00
Andreas Wachter 99ad5cc1b6 added option to mirror to specific org or user in gitea and gogs v0.10.5 2022-10-11 08:45:05 +02:00
Andreas Wachter 041a5a88b7 handle multiple configs (#114)
* handle multiple configs

* upgrade golangci_lint_version

* SnakeCase and replaces ioutil with os
v0.10.4
2022-10-03 19:20:19 +02:00
Andreas Wachter 81136acfbe should fix #112 v0.10.3 2022-09-24 18:14:07 +02:00
Andreas Wachter 6461754630 added onedev functionality (#111)
* added onedev functionality

* go mod tidy
2022-08-11 21:31:03 +02:00
Andreas Wachter 3ae5a3a463 backup any repo (#110)
* added any module

* update dependencies

* clone local repos too

* fixed the separator and adjusted example config and README.md

* go mod tidy

* ran gofumpt and goimports

* cleaned up a bit and implemented timeformat as environment variable
2022-07-18 13:59:20 +02:00
510e234e52 feat: Support multiple heartbeat URLs (#109)
* feat: add heartbeat metrics

* feat: Support multiple heartbeat URLs

#100 introduced heartbeat support but only supported one URL. This PR was closed, however I've re-introduced this feature and added support for multiple heartbeat URLs as discussed in the #100 discussion.

This also resolves #108 which is a feature request for the heartbeat feature.

* fix: When sending the heartbeat fails, log an error but don't crash the program

This prevents problems with external services from causing the program to quit.

Co-authored-by: Matthew Toohey <contact@mtoohey.com>
Co-authored-by: Jordan Crawford <>
2022-05-17 13:12:07 +02:00
Andreas Wachter 96419e641e Update Dockerfile (#102)
* Update Dockerfile

add git to builder stage

* added `go mod tidy`

* fix build version of golang

* added copy of `go.mod` and `go.sum`
2022-03-20 13:05:10 +01:00
Tom Moulard 646b792ac1 chore: add linting (#101)
* chore: adding makefile

* chore: adding lint

* chore: update package name

* lint: run with fix

* chore: update main.go

* chore: update main_test.go

* chore: update types.go

* chore: update logger.go

* chore: update types_test.go

* chore: update prometheus.go

* chore: update local.go

* chore: update gitlab.go

* chore: update gogs.go

* chore: update bitbucket.go

* chore: update gitea.go

* chore: update github.go

* chore: update main*.go

* chore: go mod tidy

* chore: update action to have a correct working-directory
2022-03-20 11:25:11 +01:00
Andreas Wachter 2a069398ad removed git ls-remote from local 2022-03-02 22:28:58 +01:00
Matthew Toohey 545c9e3f73 fix: stat github wiki remotes to verify their existence (#98)
* fix: stat github wiki remotes to verify their existence

* fix: also check gitea wiki remotes
2022-03-02 22:21:23 +01:00
Matthew Toohey 8b0f820ec8 fix: use gitlab namespace path instead of owner (#99) 2022-02-26 08:08:31 +01:00
Andreas Wachter 4c98576c17 Update README.md 2022-02-25 09:51:50 +01:00
Andreas Wachter 5060718f9d Update README.md 2022-02-25 09:32:40 +01:00
Andreas Wachter dd1418347d #95 set user to username in bitbucket if empty v0.10.2 2022-02-25 09:16:15 +01:00
Andreas Wachter 9e4e9e1d6a #94 remove new lines in token files. 2022-02-24 21:22:10 +01:00
Andreas Wachter bee477bf65 addresses #92. ls-remote before pulling or cloning (#93) v0.10.1 2022-02-24 13:00:17 +01:00
Drew Moseley d96310d74a Add excludeorgs for gitlab. (#91)
* Add excludeorgs for gitlab.

Gitlab does not explicitly have orgs but they do have Namespaces which
are roughly equivalent.

Signed-off-by: Drew Moseley <drew@moseleynet.net>

* Add includeorgs for gitlab.

Signed-off-by: Drew Moseley <drew@moseleynet.net>
2022-02-24 07:47:06 +01:00
Andreas Wachter 70ddbc829c updated dependencies v0.10.0 2022-02-22 08:15:54 +01:00
Andreas Wachter 3dabd67810 gitea got the repositories twice 2022-02-22 07:47:32 +01:00
Matthew Toohey b0cd28c761 feat: backup starred repos (#89)
* feat: github starred support

* feat: gitea starred support

* fix: increment gitlab request pages properly

* feat: gitlab starred support
2022-02-22 07:42:05 +01:00
Adam Hintz 025b354278 Documentation: add information about cron / timezone and saving to Docker volume locally (#88) 2022-02-07 08:18:36 +01:00
Andreas Wachter dae3869f7d added includeorgs to the example config v0.9.9-2 2022-01-29 15:44:42 +01:00
Andreas Wachter 85ebb1bad0 Merge remote-tracking branch 'origin/main' 2022-01-27 18:37:18 +01:00
Andreas Wachter df6767fc53 implemented includeorgs parameter 2022-01-27 18:36:41 +01:00
Phil af10e4690d CMD to ENTRYPOINT in docker (#85)
Fix for the Dockerfile using CMD. ENTRYPOINT is nicer.

Signed-off-by: Phil <phil@ucode.space>
2022-01-13 10:34:14 +01:00
Andreas Wachter d52d7cc8be fixed the prometheus dependency for cron v0.9.9-1 2022-01-03 07:07:10 +01:00
Jonathan Buchholz 79136ae86b Fix typo and grammatical errors in README.md (#80)
* Fix typo

* Fix grammatical errors
2022-01-01 21:28:02 +01:00
Andreas Wachter eb3704b272 adds wiki logic to github and gitlab 2021-12-31 09:25:47 +01:00
Andreas Wachter 8ec9f04715 add repo to warn-message for local clone #79 2021-12-30 19:24:46 +01:00
Andreas Wachter 9e175cf41b duration as string 2021-12-30 16:00:19 +01:00
Andreas Wachter 1d4693003a added wiki support to all cvs (except bitbucket) (#76)
* added wiki support to all cvs (except bitbucket)

* added wiki parameter to the example config
v0.9.9
2021-12-29 18:27:19 +01:00
Andreas Wachter 9f8d5a9e14 set listen_addr to correct value in example config 2021-12-29 08:42:42 +01:00
Colin DeanandAndreas Wachter ebce0def10 Allows reading a token from a file (#73)
Fixes #69

Co-authored-by: Andreas Wachter <buddyspencer@protonmail.com>
2021-12-29 07:49:02 +01:00
Colin Dean d98ccdb454 Adds Prometheus metrics when in scheduled mode (#62)
* WIP: Adds InfluxDB2 metrics

* Adds basic Prometheus metrics

It's much easier to implement so I'm switching to focusing on it for
now.

* Add some more counters and gauges

Use some labeled counters for backup destinations

* Extract methods for local repo clone and update

It was a little difficult to understand what was going where, esp. with
Go's verbose logging, so I extracted methods where appropriate. This
should also ease some testing concerns down the road.

* Fixes missing y in yaml

* Refactor next run logging

* Add run start and end log messaging

* Adds prom histogram for job duration

* Adds a prom gauge for number of repos discovered

* Switch prom job duration to a summary

I'm really not sure if it should be a summary or a histogram, but
reading about both, it seems like it would be more valuable with
quantiles and not buckets, so summary it is.

* Drop InfluxDB integration for now

We can revert this if we decide to implement InfluxDB after all.
@cooperspencer prefers Prometheus and frankly it's a lot easier to set
up so I'll use it, too, since I already have it running in my
environment anyways!
2021-12-29 07:31:19 +01:00
Colin Dean b471943f19 Set log level based on --quiet and --silent (#72)
* Adjusts --quiet to output only warn+ log messages

Fixes #51

* Adds a --silent option to suppress all log output
2021-12-29 07:29:30 +01:00
Andreas Wachter 529f172dd3 set token at init of client 2021-12-27 09:15:36 +01:00
Andreas Wachter 19306748ac implemented quiet into main 2021-12-25 16:37:33 +01:00
Andreas Wachter 3f235a8d14 Bitbucket nil (#68)
* set user to repo user

* fix second user
2021-12-23 18:54:22 +01:00
Andreas Wachter ba45da76b9 push docker only on tag 2021-12-22 17:11:04 +01:00
Andreas Wachter c4dac3e3a9 Merge pull request #64 from MichaelCade/main
update conf example yaml link
2021-12-22 12:06:57 +01:00
michaelcade 093809ba50 update conf example yaml 2021-12-22 10:58:46 +00:00
Andreas Wachter c49d20f428 Merge pull request #63 from colindean/refactor-local
Extract methods for local repo clone and update
2021-12-22 09:14:14 +01:00