print()
-
def json_milestones(budget_graph: BudgetGraph, add_comments: bool,
output_dir: Path):
"""reports milestones as json format
intro = []
comment = "%s\n " % child.bug_url
if add_comments:
+ comment += "\n"
comments = bug_comments_map[str(child.bug.id)]['comments']
- comment += "\n%s" % comments[0]['text']
+ lines = comments[0]['text'].splitlines()
+ for i, line in enumerate(lines):
+ # look for a line with only 4 or more `-` and blank lines
+ # before and after, like so:
+ # ```
+ #
+ # -----
+ #
+ # ```
+ if len(line) >= 4 and line == "-" * len(line) \
+ and i >= 1 and lines[i - 1] == "" and (
+ i > len(lines) or lines[i + 1] == ""):
+ lines[i:] = []
+ break
+ if line == "<From here down doesn't go in MOU>":
+ lines[i:] = []
+ break
+ comment += "\n".join(lines)
intro.append(comment)
# print (description, intro)
# sys.stdout.flush()