From bd24875c465e83d27e260a8374e46f3ff9484bf2 Mon Sep 17 00:00:00 2001 From: Simon Byrne Date: Sun, 31 Dec 2023 13:21:15 -0800 Subject: [PATCH] add commit hash information to registry --- src/Registrator.jl | 6 ++++-- src/commentbot/CommentBot.jl | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Registrator.jl b/src/Registrator.jl index 1c98787c2e..a1c190208e 100644 --- a/src/Registrator.jl +++ b/src/Registrator.jl @@ -15,6 +15,7 @@ struct RegisterParams package_repo::String pkg::RegistryTools.Project tree_sha::String + commit_sha::Union{String, Nothing} registry::String registry_fork::String registry_deps::Vector{<:String} @@ -28,10 +29,11 @@ struct RegisterParams registry::AbstractString=DEFAULT_REGISTRY_URL, registry_fork::AbstractString=registry, registry_deps::Vector{<:AbstractString}=[], + commit_sha::Union{AbstractString, Nothing}=nothing, subdir::AbstractString="", push::Bool=false, gitconfig::Dict=Dict(),) - new(package_repo, pkg, tree_sha, registry, registry_fork, + new(package_repo, pkg, tree_sha, commit_sha, registry, registry_fork, registry_deps, subdir, push, gitconfig,) end end @@ -39,7 +41,7 @@ end RegistryTools.register(regp::RegisterParams) = RegistryTools.register(regp.package_repo, regp.pkg, regp.tree_sha; registry=regp.registry, registry_fork=regp.registry_fork, registry_deps=regp.registry_deps, - subdir=regp.subdir, push=regp.push, gitconfig=regp.gitconfig,) + commit_hash=regp.commit_sha, subdir=regp.subdir, push=regp.push, gitconfig=regp.gitconfig) include("slack.jl") include("pull_request.jl") diff --git a/src/commentbot/CommentBot.jl b/src/commentbot/CommentBot.jl index ee2bdfe21c..31c3934c21 100644 --- a/src/commentbot/CommentBot.jl +++ b/src/commentbot/CommentBot.jl @@ -67,6 +67,7 @@ function make_pull_request(pp::ProcessedParams, rp::RequestParams, rbrn::RegBran "pkg_repo_name"=> rp.reponame, "trigger_id"=> trigger_id, "tree_sha"=> pp.tree_sha, + "commit_sha"=> pp.sha, "version"=> string(ver), "subdir"=> subdir)) key = CONFIG["enc_key"] @@ -179,6 +180,7 @@ function action(rp::RequestParams{T}, zsock::RequestSocket) where T <: RegisterT pp.cloneurl, pp.project, pp.tree_sha; + commit_sha=pp.sha, subdir=rp.subdir, registry=target_registry["repo"], registry_fork=get(target_registry, "fork_repo", target_registry["repo"]),