# Integrations and Build Submission Builds.sr.ht is a job runner. Multiple things can submit jobs to it: git.sr.ht on push, the project hub on patch email, the web form, `hut`, the GraphQL API. This file covers how each works. ## git.sr.ht auto-submission When you push to a git.sr.ht repo, the post-update hook walks the new refs in the push, parses any matching manifests out of each new commit's tree, and fires a GraphQL `submit` mutation against builds.sr.ht for each. The default discovery glob is comma-separated and covers both extensions: ``` .build.yml,.builds/*.yml,.build.yaml,.builds/*.yaml ``` - A single `.build.yml`/`.yaml` at the repo root is the common case. - `.builds/*.yml` (or `.yaml`) supports multiple manifests. Each becomes an independent job. - The hook caps total submissions at **4 per push, summed across every ref in the push**. So a push that touches three branches each carrying two manifests still gets at most 4 jobs total; the rest are silently dropped. When more than 4 are present in a single ref's manifest set, the hook reads them into a Go map and iterates — so "chosen randomly" is the practical effect. - Override the discovery pattern per-push with `git push -o submit=".sourcehut/*.yml"` (fnmatch syntax, comma-separated). Before submission, the hook rewrites the manifest: 1. **`sources:` injection.** For each entry whose basename equals the pushed repo's name, the URL is replaced with the canonical clone URL plus `#` of the pushed commit. If no entry matches, the clone URL is *appended* to `sources:`. Private repos get the SSH form (`git+ssh://git@/~/`); public repos get HTTPS. The commit-sha pin guarantees the build runs against exactly what you pushed. 2. **`environment:` augmentation.** `BUILD_SUBMITTER=git.sr.ht` and `GIT_REF=` are added (and overwrite any same-named keys you set in the manifest). 3. **`shell: true` is stripped**, with a `Notice: removing 'shell: true' from build manifest` line in the log. Use `shell: true` only for manual submissions, never for auto-submitted manifests. The note attached to each build (used as the email/IRC subject line by post-build triggers) is generated from the commit. It looks like: ``` [abc1234][0] — [Author Name][1] First line of the commit message [0]: https:///~//commit/ [1]: mailto:author@example.com ``` so the dashboard always tells you which commit and who made it, even before you click through. ### Push options `git push -o