Fix generating the md5 hash used for the uid

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2020-06-19 17:09:33 +02:00
parent 3238603eb9
commit 6216256b38

View file

@ -106,13 +106,14 @@ class FlagCIPR(ToddlerBase):
pr_id = str(msg["artifact"]["id"])
commit_hash_text = " for %s" % msg["artifact"]["commit_hash"][:8]
seed = config.get("pagure_token_seed") or ""
data = {
"username": "Fedora CI",
"status": status,
"comment": "Package tests%s: %s" % (commit_hash_text, human_status),
"url": msg["run"]["url"],
"uid": hashlib.md5(pr_id + config.get("pagure_token_seed")).hexdigest(),
"uid": hashlib.md5((pr_id + seed).encode("utf-8")).hexdigest(),
}
pagure_url = config["pagure_url"]