message = " " + "\n ".join(lines)
return (title, message)
-def make_release_notes(gh, repo, ref, plaintext, verbose, strict, use_tags):
+def make_release_notes(gh, repo, ref, plaintext, html, verbose, strict, use_tags):
issue2prs = {}
pr2issues = {}
if pr in pr2issues:
if plaintext:
issues = map(lambda issue: '#' + str(issue), pr2issues[pr])
+ elif html:
+ issues = map(lambda issue: (
+ '<a href="http://tracker.ceph.com/issues/{issue}">issue#{issue}</a>'
+ ).format(issue=issue), pr2issues[pr]
+ )
else:
issues = map(lambda issue: (
'`issue#{issue} <http://tracker.ceph.com/issues/{issue}>`_'
author=author.encode("utf-8")
)
)
+ elif html:
+ print (
+ (
+ "<li><p>{title} ({issues}<a href=\""
+ "https://github.com/ceph/ceph/pull/{pr}\""
+ ">pr#{pr}</a>, {author})</p></li>"
+ ).format(
+ title=title.encode("utf-8"),
+ issues=issues,
+ author=author.encode("utf-8"), pr=pr
+ )
+ )
else:
print (
(
parser.add_argument("--text", "-t",
action='store_true', default=None,
help="output plain text only, no links")
+ parser.add_argument("--html",
+ action='store_true', default=None,
+ help="output html format for website blog")
parser.add_argument("--verbose", "-v",
action='store_true', default=None,
help="verbose")
Repo(args.repo),
args.rev,
args.text,
+ args.html,
args.verbose,
args.strict,
args.use_tags