From 271cb0e5662d1f1d965b0f840813c19cd93e900f Mon Sep 17 00:00:00 2001 From: mtfishman Date: Thu, 19 Feb 2026 00:00:56 -0500 Subject: [PATCH] Fix ITensorRegistry PR title and body for RegistryCI --- .github/workflows/Registrator.yml | 40 ++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Registrator.yml b/.github/workflows/Registrator.yml index 36d9bf1..46ea8d1 100644 --- a/.github/workflows/Registrator.yml +++ b/.github/workflows/Registrator.yml @@ -70,9 +70,11 @@ jobs: let new = TOML.parsefile("package/Project.toml") + name = get(new, "name", "") uuid = get(new, "uuid", "") newv_str = get(new, "version", "") + isempty(name) && error("Project.toml is missing name") isempty(uuid) && error("Project.toml is missing uuid") isempty(newv_str) && error("Project.toml is missing version") @@ -145,6 +147,8 @@ jobs: open(ENV["GITHUB_OUTPUT"], "a") do io println(io, "route=$route") + println(io, "pkg_name=$name") + println(io, "uuid=$uuid") println(io, "new_version=$newv_str") println(io, "is_breaking=$is_breaking") println(io, "subject=$subject") @@ -224,6 +228,39 @@ jobs: path: registry token: "${{ secrets.REGISTRATOR_KEY }}" + - name: Compose PR metadata (local registry) + if: steps.meta.outputs.route == 'local' + id: local_pr + env: + PKG_NAME: ${{ steps.meta.outputs.pkg_name }} + PKG_UUID: ${{ steps.meta.outputs.uuid }} + PKG_VERSION: ${{ steps.meta.outputs.new_version }} + IS_BREAKING: ${{ steps.meta.outputs.is_breaking }} + SUBJECT: ${{ steps.meta.outputs.subject }} + shell: julia --color=yes {0} + run: | + using TOML + + reg = TOML.parsefile("registry/Registry.toml") + pkgs = get(reg, "packages", Dict{String,Any}()) + is_new_pkg = !haskey(pkgs, ENV["PKG_UUID"]) + + kind = is_new_pkg ? "New package" : "New version" + title = "$kind: $(ENV["PKG_NAME"]) v$(ENV["PKG_VERSION"])" + + body = "Commit: $(ENV["GITHUB_SHA"])" + if ENV["IS_BREAKING"] == "true" + body *= "\n\nRelease notes:\n- breaking: $(ENV["SUBJECT"]) (v$(ENV["PKG_VERSION"]))" + end + + open(ENV["GITHUB_OUTPUT"], "a") do io + println(io, "title=$title") + println(io, "body<