~emersion/yojo

A CI bridge from Forgejo/Gitea to SourceHut
Move to Codeberg
templates/index: drop link to Codeberg docs
Add support for user hooks

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~emersion/yojo
read/write
git@git.sr.ht:~emersion/yojo

You can also use your local clone with git send-email.

#yojo

Warning: this project has moved to Codeberg.

A CI bridge from Forgejo/Gitea to SourceHut.

A public instance is available.

#Configuration

yojo can be configured via an scfg file by running yojo -config <path>.

Only the OAuth client ID and secrets are required.

# HTTP server listen address
listen localhost:8080
# SQLite database path
db yojo.db

# SourceHut configuration
srht {
	# OAuth client ID and secret
	client-id "..."
	client-secret "..."

	# Endpoint URLs for builds.sr.ht and meta.sr.ht
	builds-endpoint "https://builds.sr.ht"
	meta-endpoint "https://meta.sr.ht"
}

# Gitea/Forgejo configuration
gitea {
	# OAuth client ID and secret
	client-id "..."
	client-secret "..."

	# Endpoint URL
	endpoint "https://codeberg.org"
}

#Local development

For local development, smee.io can be used to forward Web hooks. Install go-smee (or their offical client), then run:

smee -target "http://localhost:8080/webhook"

Grab the channel URL and start yojo like so:

yojo -config <config> -webhook-endpoint "https://smee.io/<token>"

To restart the smee client with the same channel, -proxy can be used:

smee -target "http://localhost:8080/webhook" -proxy "https://smee.io/<token>"

#License

AGPLv3, see LICENSE.

Copyright (C) 2023 Simon Ser