#!/usr/bin/env python | |
# Proof of Concept for expanding aliases in annotations. | |
# | |
# See https://bug.tasktools.org/browse/TW-77 | |
import json | |
import re | |
import sys | |
old = json.loads(sys.stdin.readline()) | |
new = json.loads(sys.stdin.readline()) | |
if "annotations" in new: | |
for anno in new["annotations"]: | |
anno["description"] = re.sub(r"dbugs:([^ ]+)", r"http://bugs.debian.org/\1", anno["description"]) | |
print(json.dumps(new)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment