Go to file
Robin Jarry be5d50d8d8 webhooks: update todo tickets with git commits
Allow referencing tracker tickets in git commit messages via specific
trailer words:

  Fixes: <ticket url>
  Implements: <ticket url>
  References: <ticket url>

These must follow standard git trailer syntax. The trailers are
extracted from commit messages with the function added in previous
commit. The ticket url must point to a valid ticket.

A comment will be inserted in the ticket with a back reference to the
git commit and its original author. The comment will be made by the user
who pushed the commit. E.g.:

  ~arkanoid REPORTED -> FIXED                          9 seconds ago

  John Doe referenced this ticket in commit b4dc4c40.

Open tickets referenced by a Fixes trailer will be resolved with the
FIXED resolution.

Open tickets referenced by an Implements trailer will be resolved with
the IMPLEMENTED resolution.

Caveats:

* Only the 25 most recent commit messages will be considered when
  pushing long series. This should be a fairly sane limitation.

* If the user pushing commits does not have triage/comment permissions
  on the bug tracker, nothing will happen.

* Invalid/non-existent ticket urls are ignored.

* When a git repository is part of more than one project, the webhook
  will run once per project and update the same ticket(s) once per
  project as well.

* If an already resolved ticket is referenced by a Fixes or Implements
  trailer, only a comment will be added.

Link: https://git-scm.com/docs/git-interpret-trailers
Implements: https://todo.sr.ht/~sircmpwn/hub.sr.ht/55
Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-11-29 10:52:32 +01:00
.builds .builds/alpine.yml: upgrade to 3.14 2021-08-04 08:26:30 +02:00
hubsrht webhooks: update todo tickets with git commits 2021-11-29 10:52:32 +01:00
scss Improve btn-white on dark mode 2020-12-16 10:18:15 -05:00
.gitignore Initial commit 2020-03-24 10:26:15 -04:00
LICENSE Initial commit 2020-03-24 10:26:15 -04:00
Makefile Initial commit 2020-03-24 10:26:15 -04:00
README.md Initial commit 2020-03-24 10:26:15 -04:00
config.example.ini Add config.example.ini 2020-05-04 10:55:26 -04:00
hubsrht-initdb add database stamp for core.sr.ht 2020-08-11 10:48:01 -04:00
hubsrht-migrate hubsrht-migrate: remove (broken) core.sr.ht call 2020-07-14 09:32:19 -04:00
run.py Initial commit 2020-03-24 10:26:15 -04:00
setup.py Add pyyaml dependency 2021-04-02 13:56:19 -04:00
static Initial commit 2020-03-24 10:26:15 -04:00

README.md

This repository contains the code for the sr.ht project hub. For instructions on deploying or contributing to this project, visit the manual here:

https://man.sr.ht/hub.sr.ht/installation.md