From 2077cca215f22c6f457f84180421399616484bb3 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Sat, 19 Oct 2019 14:57:56 -0400 Subject: [PATCH] Correctly create statuses on the pull request (#36) --- src/AutoMerge/new-package.jl | 8 ++++---- src/AutoMerge/new-version.jl | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/AutoMerge/new-package.jl b/src/AutoMerge/new-package.jl index 6d2bc91b..489020dd 100644 --- a/src/AutoMerge/new-package.jl +++ b/src/AutoMerge/new-package.jl @@ -26,7 +26,7 @@ function travis_pull_request_build(::NewPackage, if is_open(pr) if pr_author_login in authorized_authors my_retry(() -> delete_all_of_my_reviews!(registry, pr; auth = auth, whoami = whoami)) - my_retry(() -> GitHub.create_status(repo, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "pending", "context" => "automerge/new-package"))) + my_retry(() -> GitHub.create_status(registry, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "pending", "context" => "automerge/new-package"))) g0, m0 = pr_only_changes_allowed_files(NewPackage(), registry, pr, pkg; auth = auth) newp_g1, newp_m1 = meets_normal_capitalization(pkg) newp_g2, newp_m2 = meets_name_length(pkg) @@ -54,7 +54,7 @@ function travis_pull_request_build(::NewPackage, version) my_retry(() -> delete_all_of_my_reviews!(registry, pr; auth = auth, whoami = whoami)) my_retry(() -> approve!(registry, pr, current_pr_head_commit_sha; auth = auth)) - my_retry(() -> GitHub.create_status(repo, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "success", "context" => "automerge/new-package"))) + my_retry(() -> GitHub.create_status(registry, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "success", "context" => "automerge/new-package"))) my_retry(() -> post_comment!(registry, pr, newp_commenttextpass; auth = auth)) return nothing else @@ -63,7 +63,7 @@ function travis_pull_request_build(::NewPackage, suggest_onepointzero, version) my_retry(() -> post_comment!(registry, pr, newp_commenttext6and7; auth = auth)) - my_retry(() -> GitHub.create_status(repo, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "failure", "context" => "automerge/new-package"))) + my_retry(() -> GitHub.create_status(registry, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "failure", "context" => "automerge/new-package"))) return nothing end else @@ -74,7 +74,7 @@ function travis_pull_request_build(::NewPackage, suggest_onepointzero, version) my_retry(() -> post_comment!(registry, pr, newp_commenttext0through5; auth = auth)) - my_retry(() -> GitHub.create_status(repo, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "failure", "context" => "automerge/new-package"))) + my_retry(() -> GitHub.create_status(registry, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "failure", "context" => "automerge/new-package"))) return nothing end else diff --git a/src/AutoMerge/new-version.jl b/src/AutoMerge/new-version.jl index 6a24a611..d6d5ca38 100644 --- a/src/AutoMerge/new-version.jl +++ b/src/AutoMerge/new-version.jl @@ -10,7 +10,7 @@ function travis_pull_request_build(::NewVersion, whoami::String) # first check if authorized author - if not, then quit # then check rules 1-3. if fail, post comment. - # then check rules 4-5. if fail, post commnet. + # then check rules 4-5. if fail, post comment. # if everything passed, merge the pull request now # 1. Sequential version number - if the last version was 1.2.3 then the next can be 1.2.4, 1.3.0 or 2.0.0 # 2. Compat for all dependencies - all [deps] should also have [compat] entries (and Julia itself) - [compat] entries should have upper bounds @@ -23,7 +23,7 @@ function travis_pull_request_build(::NewVersion, if is_open(pr) if pr_author_login in authorized_authors my_retry(() -> delete_all_of_my_reviews!(registry, pr; auth = auth, whoami = whoami)) - my_retry(() -> GitHub.create_status(repo, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "pending", "context" => "automerge/new-version"))) + my_retry(() -> GitHub.create_status(registry, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "pending", "context" => "automerge/new-version"))) g0, m0 = pr_only_changes_allowed_files(NewVersion(), registry, pr, pkg; auth = auth) newv_g1, newv_m1, release_type = meets_sequential_version_number(pkg, version; @@ -57,7 +57,7 @@ function travis_pull_request_build(::NewVersion, version) my_retry(() -> delete_all_of_my_reviews!(registry, pr; auth = auth, whoami = whoami)) my_retry(() -> approve!(registry, pr, current_pr_head_commit_sha; auth = auth)) - my_retry(() -> GitHub.create_status(repo, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "success", "context" => "automerge/new-version"))) + my_retry(() -> GitHub.create_status(registry, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "success", "context" => "automerge/new-version"))) my_retry(() -> post_comment!(registry, pr, newv_commenttextpass; auth = auth)) return nothing else @@ -66,7 +66,7 @@ function travis_pull_request_build(::NewVersion, suggest_onepointzero, version) my_retry(() -> post_comment!(registry, pr, newv_commenttext4and5; auth = auth)) - my_retry(() -> GitHub.create_status(repo, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "failure", "context" => "automerge/new-version"))) + my_retry(() -> GitHub.create_status(registry, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "failure", "context" => "automerge/new-version"))) return nothing end else @@ -77,7 +77,7 @@ function travis_pull_request_build(::NewVersion, suggest_onepointzero, version) my_retry(() -> post_comment!(registry, pr, newv_commenttext1through3; auth = auth)) - my_retry(() -> GitHub.create_status(repo, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "failure", "context" => "automerge/new-version"))) + my_retry(() -> GitHub.create_status(registry, current_pr_head_commit_sha; auth=auth, params=Dict("state" => "failure", "context" => "automerge/new-version"))) return nothing end else