1
0
Fork
You've already forked yojo
0
forked from emersion/yojo
A CI bridge from Forgejo/Gitea to SourceHut
  • Go 87.6%
  • HTML 8.5%
  • CSS 3.9%
Find a file
chenghui-lee 885a9575a0 Use SSH URL for sourcehut build source instead of HTTP
When using HTTP, the ssh key is being ignored when running private
forgejo instance for some reasons. Probably because of non standard
SSH port.
2025年12月25日 15:01:37 +08:00
buildssrht Add support for secrets 2024年10月10日 23:13:36 +02:00
static Add checkbox to enable secrets 2024年10月10日 23:55:19 +02:00
templates repository list 2025年08月28日 10:15:12 +02:00
.build.yml ci: add .build.yml 2024年10月10日 23:12:23 +02:00
.gitignore Initial commit 2023年04月11日 14:32:38 +02:00
config.go Switch to new go-scfg and go-oauth2 upstream repositories 2025年11月13日 15:23:38 +01:00
db.go Switch to new go-scfg and go-oauth2 upstream repositories 2025年11月13日 15:23:38 +01:00
gitea.go Use SSH URL for sourcehut build source instead of HTTP 2025年12月25日 15:01:37 +08:00
go.mod Switch to new go-scfg and go-oauth2 upstream repositories 2025年11月13日 15:23:38 +01:00
go.sum Switch to new go-scfg and go-oauth2 upstream repositories 2025年11月13日 15:23:38 +01:00
go.work.sum Upgrade dependencies 2025年11月13日 15:17:58 +01:00
job.go Use SSH URL for sourcehut build source instead of HTTP 2025年12月25日 15:01:37 +08:00
LICENSE Initial commit 2023年04月11日 14:32:38 +02:00
main.go Switch to new go-scfg and go-oauth2 upstream repositories 2025年11月13日 15:23:38 +01:00
README.md readme: add section for local development 2023年12月19日 12:41:47 +01:00
schema.sql schema: fix dropped username columns 2024年10月23日 09:07:19 +02:00
session.go Add checkbox to enable secrets 2024年10月10日 23:55:19 +02:00

yojo

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