From 66e383c03bfe475f9a70c0fb3ab5c2a8c10fb5b5 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 31 Oct 2023 05:43:36 -0400 Subject: [PATCH 1/3] Replace a use of `withenv` with `setenv` instead --- src/utilities/git.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utilities/git.jl b/src/utilities/git.jl index 7c04ce5f..899533f7 100644 --- a/src/utilities/git.jl +++ b/src/utilities/git.jl @@ -34,11 +34,11 @@ function git_push( ssh = enable_ssh_verbose_b ? "ssh -vvvv" : "ssh" git_ssh_command = isnothing(pkey_filename) ? ssh : "$(ssh) -i $pkey_filename" - withenv("GIT_SSH_COMMAND" => git_ssh_command) do - cmd = `git -c user.name="$name" -c user.email="$email" -c committer.name="$name" -c committer.email="$email" push $force_flag $remote $branch` - @debug "Attempting to run Git push command" cmd - run(cmd) - end + env2 = copy(ENV); + env2["GIT_SSH_COMMAND"] = git_ssh_command + cmd = `git -c user.name="$name" -c user.email="$email" -c committer.name="$name" -c committer.email="$email" push $force_flag $remote $branch` + @debug "Attempting to run Git push command" cmd env2["GIT_SSH_COMMAND"] + run(setenv(cmd, env2)) return nothing end From 8a23c8fb0c03c8d1459f7eebf47b3d23afade628 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 31 Oct 2023 05:49:16 -0400 Subject: [PATCH 2/3] Add some `@debug` statements in the `force_ci_trigger` function --- src/utilities/new_versions.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utilities/new_versions.jl b/src/utilities/new_versions.jl index 1f12fddd..0cdba46d 100644 --- a/src/utilities/new_versions.jl +++ b/src/utilities/new_versions.jl @@ -324,16 +324,19 @@ function force_ci_trigger( # https://github.com/JuliaRegistries/CompatHelper.jl/issues/387 if !isnothing(pkey_filename) # Do a soft reset to the previous commit + @debug "force_ci_trigger: doing a soft reset to the previous commit" git_reset("HEAD~1"; soft=true) # Sleep for 1 second to make sure the timestamp changes sleep(1) # Commit the changes once again to generate a new SHA + @debug "force_ci_trigger: commiting again, in order to generate a new SHA" git_commit(pr_title; env=env) # Force push the changes to trigger the PR api_retry() do + @debug "force_ci_trigger: force-pushing the changes to trigger CI on the PR" @mock git_push("origin", branch_name, pkey_filename; force=true, env=env) end end From d0ac11fa3c3e6acdd4d2ed3e05cbf0abf20edc3f Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Tue, 31 Oct 2023 05:53:40 -0400 Subject: [PATCH 3/3] Bump version from 3.9.0 to 3.10.0 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 7266dc66..9cf2d6a7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "CompatHelper" uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" authors = ["Dilum Aluthge", "Brown Center for Biomedical Informatics", "contributors"] -version = "3.9.0" +version = "3.10.0" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"