From be08de67a0b21e800cc263e319aa4f17034bae53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Wed, 9 Oct 2019 09:46:57 +0200 Subject: [PATCH] Remove extra double quotes in manifest_build.py (#19560) There's no shell escaping at this layer, so these quotes were treated as literal and included in the release body. This also simplies the code by using --format=%B. --- tools/ci/manifest_build.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tools/ci/manifest_build.py b/tools/ci/manifest_build.py index 08c2b5fe6458aa..3159dc8f16dd64 100644 --- a/tools/ci/manifest_build.py +++ b/tools/ci/manifest_build.py @@ -118,12 +118,7 @@ def tag(owner, repo, sha, tag): return True -def create_release(manifest_path, owner, repo, sha, tag, summary, body): - if body: - body = "%s\n%s" % (summary, body) - else: - body = summary - +def create_release(manifest_path, owner, repo, sha, tag, body): create_url = "https://api.github.com/repos/%s/%s/releases" % (owner, repo) create_data = {"tag_name": tag, "name": tag, @@ -185,8 +180,7 @@ def main(): git = get_git_cmd(wpt_root) head_rev = git("rev-parse", "HEAD") - summary = git("show", "--no-patch", '--format="%s"', "HEAD") - body = git("show", "--no-patch", '--format="%b"', "HEAD") + body = git("show", "--no-patch", "--format=%B", "HEAD") if dry_run: return Status.SUCCESS @@ -200,7 +194,7 @@ def main(): if not tagged: return Status.FAIL - if not create_release(manifest_path, owner, repo, head_rev, tag_name, summary, body): + if not create_release(manifest_path, owner, repo, head_rev, tag_name, body): return Status.FAIL return Status.SUCCESS