~sircmpwn/dispatch.sr.ht

.builds/alpine.yml: increase specificity of sed
builds: shuffle list of manifests before limiting to first 4
builds: refuse to submit >4 builds at once
add database stamp for core.sr.ht
Alpine: upgrade to 3.12
github: Add GITHUB_PR_BODY env variable

The body of a GitHub PR commit message is provided via the API v3 called
`body`[0]. This body can may contain information to incluence the CI
build.

An example, OpenWrt supports 80 different hardware architectures,
building all of them takes about 80 hours. Changing something for target
x86/64 should only trigger that specific target to be build. A PR commit
message could now contain a line like `CI: build x86/64` which is read
by the CI via a command like the following:

TARGET=$(echo $GITHUB_PR_BODY | grep "CI: build" | cut -d ' ' -f 3)"

[0]: https://developer.github.com/v3/pulls/

Signed-off-by: Paul Spooren <mail@aparcar.org>
setup.py: use importlib.resources from python 3.7 to find core.sr.ht Makefile

importlib.resources will guarantee to find any importable module, and
check that the resource ('Makefile') can be found within it.

This lets us get rid of the current getsitepackages() hack and
environment variable fallback, which is both verbose and badly handles
some edge cases when installing modules, and instead use the recommended
way to find data files shipped with a python module.
Indicate a successful 'Save' in github_commit_to_build

Previously there was no sign of the 'Save changes' button doing
anything. Now it displays the 'Changes saved.' message already present
on other pages, such as github_pr_to_build.
github, gitlab: add additional build tag

Fixes #276
Don't 500 on missing commits from gitlab
Add dispatchsrht-initdb
Use only necessary scopes for github tasks

Previously, dispatch.sr.ht required full access for the repo,
which raised questions in some projects and prevented them
to evaluate the service. This commit lowers permissions and now
service requires:

'write:repo_hook' - create a webhook
'repo:status' - commit statuses

It also adds the following scopes for the future:

'user:email' - send email
'repo_deployment' - deployment statuses
'read:org' - read-only access to organization's data
GitLab: fix check for existing repo ID
Tasks: use builds hostname in context
Upgrade to Alpine 3.11
Improve config.example.ini
Fix missing import from previous change
Use internal authorization for builds.sr.ht submit
Updates for single-sign-on support
Handle case where GitHub repo has been deleted
Update config.example.ini with GitLab details
Next