commit | b651151c05fb95e24f13b17864624676cfbccbac | [log] [tgz] |
---|---|---|
author | Philip Jägenstedt <philip@foolip.org> | Fri Apr 27 15:46:26 2018 |
committer | GitHub <noreply@github.com> | Fri Apr 27 15:46:26 2018 |
tree | 29861e39f9e5dfa62fd55ffc899a3d965576d2e0 | |
parent | 69ab442726d0f4e435aaddeb8e6fd5b5c5d4f983 [diff] |
Use sha:<SHA> in tag_master.py instead of just <SHA> (#10687) This is to avoid finding PRs where commit SHAs have been mentioned, for example reverts, or just in PR comments. Example of search which had 2 results before and 1 after: https://api.github.com/search/issues?q=type:pr+is:merged+repo:w3c/web-platform-tests+280005efe04503f14891d73c6ceab1077a59a735 https://api.github.com/search/issues?q=type:pr+is:merged+repo:w3c/web-platform-tests+sha:280005efe04503f14891d73c6ceab1077a59a735 Kudos to @lukebjerring for pointing out the problem/solution.
diff --git a/tools/ci/tag_master.py b/tools/ci/tag_master.py index 21be21c..f049671 100644 --- a/tools/ci/tag_master.py +++ b/tools/ci/tag_master.py
@@ -18,7 +18,7 @@ def get_pr(repo, owner, sha): - url = ("https://api.github.com/search/issues?q=type:pr+is:merged+repo:%s/%s+%s" % + url = ("https://api.github.com/search/issues?q=type:pr+is:merged+repo:%s/%s+sha:%s" % (repo, owner, sha)) try: resp = urllib2.urlopen(url)