dispatch.sr.ht supports various integrations with GitHub. Some tips are provided here.

Build environment

dispatch.sr.ht will check out the specific commit you pushed when submitting builds, and will rewrite the upstream clone URL to the fork when building pull requests.

Configuring your sources list

Do not include .git at the end of your git clone URLs.

Environment variables

The following environment variables are set when building commits:

The following environment variables are set when building pull requests:

Configuring branch protection rules on GitHub

If you choose the auto-merge setting, builds.sr.ht will attempt to merge the pull request once the build completes successfully. You will likely want to add branch protection rules on GitHub to prevent this from happening before the pull request is reviewed.

To edit your branch protection rules, start by visiting Branches in your repository's settings.

Screenshot of the "branches" page

Select Add rule.

Screenshot of "add rule"

Specify the branches you want the rule to apply to (e.g. master) and configure the criteria which must be met for the pull request to be mergeable. For example, to require the code to be reviewed before merge:

Screenshot of code review settings

Important: if your account is an administrator on this GitHub repository, attempts to merge will succeed even if the branch protection rules are unmet. You must enable the Include administrators option to prevent this.

Screenshot of "Include administrators" option

About this wiki

commit 102d3cc62224b241e2f78fcea35e429a60408447
Author: Drew DeVault <sir@cmpwn.com>
Date:   2020-01-23T17:27:17-05:00

Drop ubuntu/disco; EoL'd upstream
Clone this wiki
https://git.sr.ht/~sircmpwn/sr.ht-docs (read-only)
git@git.sr.ht:~sircmpwn/sr.ht-docs (read/write)