From bfa0ca87e437e4e6f768f6a266e5a9a45c4a5858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 22 Oct 2019 09:25:58 +0000 Subject: [PATCH] Bug 1586943 [wpt PR 19560] - Remove extra double quotes in manifest_build.py, a=testonly Automatic update from web-platform-tests 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. -- wpt-commits: be08de67a0b21e800cc263e319aa4f17034bae53 wpt-pr: 19560 --- .../web-platform/tests/tools/ci/manifest_build.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/testing/web-platform/tests/tools/ci/manifest_build.py b/testing/web-platform/tests/tools/ci/manifest_build.py index 08c2b5fe6458..3159dc8f16dd 100644 --- a/testing/web-platform/tests/tools/ci/manifest_build.py +++ b/testing/web-platform/tests/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