commit c3fca338a2c63241497b64a9f997c28f17ef1b6a Author: teor teor@torproject.org Date: Tue Jul 31 12:14:40 2018 +1000
Appveyor CI: always use HEAD for the short commit
Part of 26979. --- scripts/test/appveyor-irc-notify.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/scripts/test/appveyor-irc-notify.py b/scripts/test/appveyor-irc-notify.py index 639acc6ce..cfe0afe7a 100644 --- a/scripts/test/appveyor-irc-notify.py +++ b/scripts/test/appveyor-irc-notify.py @@ -118,10 +118,6 @@ def appveyor_vars(): ] ])
- vars.update( - short_commit=vars["repo_commit"][:10], - ) - BUILD_FMT = u'{url}/project/{account_name}/{project_name}/build/{build_version}'
if vars["repo_tag_name"]: @@ -129,15 +125,20 @@ def appveyor_vars(): else: BRANCH_FMT = u'{repo_name} {repo_branch} {short_commit}'
+ vars.update(head_commit=vars["repo_commit"]) + if vars["repo_provider"].lower().startswith('github'): COMMIT_FMT = u'https://github.com/%7Brepo_name%7D/commit/%7Brepo_commit%7D' if vars["pull_request_number"]: + vars.update(head_commit=vars["pull_request_head_commit"]) BRANCH_FMT = u'{repo_name} {repo_branch} pull {pull_request_head_repo_name} {pull_request_head_repo_branch} {short_commit}' COMMIT_FMT = u'https://github.com/%7Bpull_request_head_repo_name%7D/commit/%7Bpull_request_...' PULL_FMT = u'https://github.com/%7Brepo_name%7D/pull/%7Bpull_request_number%7D' vars.update(pull_url=PULL_FMT.format(**vars)) vars.update(commit_url=COMMIT_FMT.format(**vars))
+ vars.update(short_commit=vars["head_commit"][:10]) + vars.update( build_url=BUILD_FMT.format(**vars), branch_detail=BRANCH_FMT.format(**vars),
tor-commits@lists.torproject.org