~edwargix/git.sr.ht

3c682f6f5049f9e6ca1c7dc7642c48d6209f2db1 — Drew DeVault 8 years ago e0bba89
Change how commit messages are given to builds
1 files changed, 3 insertions(+), 2 deletions(-)

M gitsrht/worker.py
M gitsrht/worker.py => gitsrht/worker.py +3 -2
@@ 8,6 8,7 @@ if not hasattr(db, "session"):
    db.init()

import requests
import html
from celery import Celery
from pygit2 import Commit
from srht.oauth import OAuthScope


@@ 60,15 61,15 @@ def do_post_update(repo, git_repo, ref):
                    "manifest": manifest,
                    # TODO: orgs
                    "tags": [repo.name],
                    "note": "[{}]({}) — {} — [{}](mailto:{})".format(
                    "note": "{}\n\n[{}]({}) — [{}](mailto:{})".format(
                        # TODO: cgit replacement
                        html.escape(first_line(commit.message)),
                        str(commit.id)[:7],
                        "{}/{}/{}/commit?id={}".format(
                            git_sr_ht,
                            "~" + repo.owner.username,
                            repo.name,
                            str(commit.id)),
                        first_line(commit.message),
                        commit.author.name,
                        commit.author.email,
                    )