Bug 1539610 [wpt PR 16076] - Log GH event when tagging master, a=testonly
authorjgraham <james@hoppipolla.co.uk>
Thu, 18 Apr 2019 11:55:29 +0000
changeset 529920 8879e7c9fbd007093cae6d7c4d9014760648ab40
parent 529919 d613fd2b3b309bcbb974e66c43a8ee464c566f0f
child 529921 6ca0a07819aec89c6c7b5bee689fc559ff504b8d
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1539610, 16076
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1539610 [wpt PR 16076] - Log GH event when tagging master, a=testonly Automatic update from web-platform-tests Log GH event when tagging master (#16076) -- wpt-commits: a960bbaf56c87d3239ec2d6476282110584079da wpt-pr: 16076
testing/web-platform/tests/tools/ci/tag_master.py
--- a/testing/web-platform/tests/tools/ci/tag_master.py
+++ b/testing/web-platform/tests/tools/ci/tag_master.py
@@ -124,32 +124,31 @@ def create_release(owner, repo, sha, tag
         return False
 
     return True
 
 
 def should_run_action():
     with open(os.environ["GITHUB_EVENT_PATH"]) as f:
         event = json.load(f)
+        logger.info(json.dumps(event, indent=2))
 
     if "pull_request" in event:
         logger.info("Not tagging for PR")
         return False
     if event.get("ref") != "refs/heads/master":
-        logger.info("Not tagging for non-master branch")
+        logger.info("Not tagging for ref %s" % event.get("ref"))
         return False
     return True
 
 
 def main():
     repo_key = "GITHUB_REPOSITORY"
-    should_run = should_run_action()
 
-    if not should_run:
-        logger.info("Not tagging master for this push")
+    if not should_run_action():
         return
 
     owner, repo = os.environ[repo_key].split("/", 1)
 
     git = get_git_cmd(wpt_root)
     head_rev = git("rev-parse", "HEAD")
 
     pr = get_pr(owner, repo, head_rev)