Skip to content

feat: add trzsz/trzsz-go#51977

Merged
suzuki-shunsuke merged 4 commits into
aquaproj:mainfrom
ZeroAurora:feat/trzsz/trzsz-go
Apr 13, 2026
Merged

feat: add trzsz/trzsz-go#51977
suzuki-shunsuke merged 4 commits into
aquaproj:mainfrom
ZeroAurora:feat/trzsz/trzsz-go

Conversation

@ZeroAurora

@ZeroAurora ZeroAurora commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

trzsz/trzsz-go - trzsz-go is the go version of trzsz, makes all terminals that support local shell to support trzsz ( trz / tsz )

Check List

Summary by CodeRabbit

Release Notes

  • New Features
    • Added support for the trzsz-go package, making the trzsz, trz, and tsz command-line utilities available
    • Supports multiple versions with optimized handling for different operating systems including Windows, macOS, and Linux
    • Includes configuration for platform-specific binary formats and compatibility across different processor architectures

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This pull request adds package definitions and registry configuration for trzsz-go, a terminal file transfer tool. Three manifest files are introduced: a local package definition file, a version-specific registry configuration file, and a root registry entry with complex version-specific asset handling and OS/architecture overrides.

Changes

Cohort / File(s) Summary
trzsz-go Package Definition
pkgs/trzsz/trzsz-go/pkg.yaml, pkgs/trzsz/trzsz-go/registry.yaml
Defines three versions (v1.2.0, v0.1.8, v0.1.7) of trzsz-go package with version-specific artifact handling: older versions (≤0.1.7) use zip format with explicit bin paths and emulation support; v0.1.8 uses tar.gz with arch/OS name replacements; v1.2.0+ uses tar.gz with checksum verification.
Root Registry Entry
registry.yaml
Registers trzsz-go as a GitHub release package with three executables (trzsz, trz, tsz) and configures version-specific overrides for asset format selection, architecture/OS string replacements (amd64→x86_64, arm64→aarch64, darwin→macos), and platform-specific handling (Windows zip format, Rosetta2 and ARM emulation for older versions).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • aquaproj/aqua-registry#50398: Uses the same version_overrides pattern with version_constraint: "false" and multiple conditional asset format/OS overrides.
  • aquaproj/aqua-registry#50403: Introduces validation policies for pkgs/\/pkg.yaml and pkgs/\/registry.yaml files that this PR's new manifest files must conform to.

Suggested labels

enhancement

Poem

🐰 A transfer tool hops into the registry,
With versions old and new in harmony,
From tar.gz to zip, the assets dance free,
Cross-platform support—aarch64 spree!
Trzsz now travels where rabbits will be. 🌾

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'feat: add trzsz/trzsz-go' directly and clearly describes the main change—adding a new package to the registry.
Description check ✅ Passed The PR description includes the package name and link with a brief explanation, and all checklist items are marked as completed (CONTRIBUTING.md read, force push avoided, argd s used, package tested).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

This comment was marked as resolved.

@ZeroAurora

ZeroAurora commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

I'm editing this from GitHub codespace so I don't have a chance to sign the commits. ok I found the way

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
pkgs/trzsz/trzsz-go/registry.yaml (1)

9-13: Drop unnecessary YAML quotes in path scalars.

These values can be plain scalars; removing quotes keeps this registry file aligned with repo style.

Suggested cleanup
     files:
       - name: trzsz
-        src: "{{.AssetWithoutExt}}/trzsz"
+        src: {{.AssetWithoutExt}}/trzsz
       - name: trz
-        src: "{{.AssetWithoutExt}}/trzsz"
+        src: {{.AssetWithoutExt}}/trzsz
       - name: tsz
-        src: "{{.AssetWithoutExt}}/trzsz"
+        src: {{.AssetWithoutExt}}/trzsz
@@
         files:
           - name: trzsz
-            src: "bin/trzsz"
+            src: bin/trzsz
           - name: trz
-            src: "bin/trz"
+            src: bin/trz
           - name: tsz
-            src: "bin/tsz"
+            src: bin/tsz

As per coding guidelines: "Remove unnecessary quotes from string values in registry.yaml".

Also applies to: 30-34

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkgs/trzsz/trzsz-go/registry.yaml` around lines 9 - 13, Remove unnecessary
YAML quotes from the path scalar values in registry.yaml: replace quoted scalars
like src: "{{.AssetWithoutExt}}/trzsz" and name: "trz" / "tsz" with unquoted
plain scalars (e.g., src: {{.AssetWithoutExt}}/trzsz and name: trz) so the file
follows the repo style; apply the same change to the other occurrences
referenced in the comment (the similar block later in the file).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@registry.yaml`:
- Around line 88938-88944: The mappings for the three binaries are incorrect:
update the file entries so each name points to its own executable instead of all
pointing to "{{.AssetWithoutExt}}/trzsz"; change the trz entry src to
"{{.AssetWithoutExt}}/trz" and the tsz entry src to "{{.AssetWithoutExt}}/tsz"
while leaving trzsz as "{{.AssetWithoutExt}}/trzsz" so installs of trz, trzsz,
and tsz resolve to their correct binaries.

---

Nitpick comments:
In `@pkgs/trzsz/trzsz-go/registry.yaml`:
- Around line 9-13: Remove unnecessary YAML quotes from the path scalar values
in registry.yaml: replace quoted scalars like src: "{{.AssetWithoutExt}}/trzsz"
and name: "trz" / "tsz" with unquoted plain scalars (e.g., src:
{{.AssetWithoutExt}}/trzsz and name: trz) so the file follows the repo style;
apply the same change to the other occurrences referenced in the comment (the
similar block later in the file).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f1f92b70-001d-46c3-b9dd-37711677ddfe

📥 Commits

Reviewing files that changed from the base of the PR and between 96768e3 and ef462b9.

📒 Files selected for processing (3)
  • pkgs/trzsz/trzsz-go/pkg.yaml
  • pkgs/trzsz/trzsz-go/registry.yaml
  • registry.yaml

Comment thread registry.yaml Outdated
@ZeroAurora

ZeroAurora commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

I'm force pushing to refresh GPG signing status (no commit squashing)

@ZeroAurora ZeroAurora force-pushed the feat/trzsz/trzsz-go branch from ef462b9 to 8e36f43 Compare April 13, 2026 17:42
@ZeroAurora ZeroAurora changed the title add trzsz/trzsz-go feat: add trzsz/trzsz-go Apr 13, 2026
@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Apr 13, 2026
@suzuki-shunsuke

Copy link
Copy Markdown
Member

Thank you!

@suzuki-shunsuke suzuki-shunsuke added this to the v4.492.1 milestone Apr 13, 2026
@suzuki-shunsuke suzuki-shunsuke merged commit 76e3e28 into aquaproj:main Apr 13, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this to Done in main Apr 13, 2026
@suzuki-shunsuke

Copy link
Copy Markdown
Member

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Apr 15, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [aquaproj/aqua-registry](https://github.com/aquaproj/aqua-registry) | minor | `v4.492.0` → `v4.493.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>aquaproj/aqua-registry (aquaproj/aqua-registry)</summary>

### [`v4.493.0`](https://github.com/aquaproj/aqua-registry/releases/tag/v4.493.0)

[Compare Source](aquaproj/aqua-registry@v4.492.0...v4.493.0)

[Issues](https://github.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.493.0) | [Merge Requests](https://github.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.493.0) | <aquaproj/aqua-registry@v4.492.0...v4.493.0>

#### 🎉 New Packages

[#&#8203;51977](aquaproj/aqua-registry#51977) [trzsz/trzsz-go](https://github.com/trzsz/trzsz-go) - trzsz-go is the go version of trzsz, makes all terminals that support local shell to support trzsz ( trz / tsz ) [@&#8203;ZeroAurora](https://github.com/ZeroAurora)
[#&#8203;51929](aquaproj/aqua-registry#51929) [micelio.dev/hif](https://micelio.dev/micelio/micelio/tree/hif) - The hif CLI - a forge-first version control system for the agent era [@&#8203;pepicrft](https://github.com/pepicrft)
[#&#8203;51717](aquaproj/aqua-registry#51717) [IBM-Cloud/ibm-cloud-cli-release](https://github.com/IBM-Cloud/ibm-cloud-cli-release) - Command line interface for IBM Cloud [@&#8203;dnwe](https://github.com/dnwe)
[#&#8203;51715](aquaproj/aqua-registry#51715) [pgplex/pgschema](https://github.com/pgplex/pgschema) - Terraform-style, declarative schema migration CLI for Postgres. Agent friendly [@&#8203;kaz](https://github.com/kaz)

#### Fixes

[#&#8203;51964](aquaproj/aqua-registry#51964) mvdan/sh: Support Windows [@&#8203;zeitlinger](https://github.com/zeitlinger)
[#&#8203;51905](aquaproj/aqua-registry#51905) temporalio/temporal: refresh server bundle binaries [@&#8203;chaptersix](https://github.com/chaptersix)

#### Security

[#&#8203;51716](aquaproj/aqua-registry#51716) gleam-lang/gleam: GitHub artifact attestations config [@&#8203;scop](https://github.com/scop)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMTMuMCIsInVwZGF0ZWRJblZlciI6IjQzLjExMy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6bWlub3IiXX0=-->
suzuki-shunsuke added a commit to suzuki-shunsuke/go-pr-diff that referenced this pull request Apr 15, 2026
* TestClient_GetDiff_aquaRegistryPR fetches the diff for
  aquaproj/aqua-registry#51977 via the GitHub API. Honors GITHUB_TOKEN
  to avoid rate limits.
* TestClient_gitFallback_mkghtagPR exercises the git shell-out path
  against suzuki-shunsuke/mkghtag#607 (chosen for its tiny repo size to
  keep the dangling-objects pollution of the local .git negligible).
* Both tests skip in -short mode and when git is not on PATH.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
suzuki-shunsuke added a commit to suzuki-shunsuke/go-pr-diff that referenced this pull request Apr 15, 2026
* feat: add prdiff package

* feat: implement GetDiff with GitHub API and git fallback

GetDiff now fetches the PR diff via the GitHub API (PullRequestsService.GetRaw),
and falls back to local git commands when the API call fails. The fallback
resolves base/head/merge-base via the API, runs shallow fetches, and runs
`git diff base...head`, creating a temporary git repo if the cwd is not one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: add unit tests for Client.GetDiff

Covers the GitHub API success path and the API-failure + git-fallback-failure
path using fakes injected via the existing prsService / reposService
interfaces. Adds go-cmp as a test dependency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: simplify gitFallback for shallow fetches and head-fork deletion

* Drop the explicit base SHA fetch; the diff GitHub shows for a PR is
  merge_base..head, so only those two commits need to be fetched.
* Switch from `git diff base...head` (3-dot) to `git diff <merge_base>
  <head>` (2-dot). The 3-dot form invokes `git merge-base`, which fails
  with "no merge base" against the shallow fetches we make.
* Always fetch through the base repo URL. GitHub's fork network keeps
  the head SHA reachable from the base repo, so the fallback still
  works after the head fork is deleted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: add integration tests for GetDiff and gitFallback

* TestClient_GetDiff_aquaRegistryPR fetches the diff for
  aquaproj/aqua-registry#51977 via the GitHub API. Honors GITHUB_TOKEN
  to avoid rate limits.
* TestClient_gitFallback_mkghtagPR exercises the git shell-out path
  against suzuki-shunsuke/mkghtag#607 (chosen for its tiny repo size to
  keep the dangling-objects pollution of the local .git negligible).
* Both tests skip in -short mode and when git is not on PATH.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: assert full diff against fixture files for mkghtag PR

* TestClient_GetDiff_mkghtagPR (renamed from _aquaRegistryPR) now uses
  the same PR (suzuki-shunsuke/mkghtag#607) as the gitFallback test.
* Both integration tests load a fixture from testdata/ and compare the
  full diff with cmp.Diff instead of substring matching.
* Two fixtures are kept because the GitHub API and local `git diff`
  produce different abbreviation lengths in `index <hash>..<hash>`
  lines (GitHub uses the upstream repo's auto-abbrev; local git uses
  the host repo's). Diff bodies are otherwise identical.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add ExampleClient_GetDiff

Demonstrates Client.GetDiff usage in godoc by fetching the diff for
suzuki-shunsuke/mkghtag#1080 (a tiny one-line dependency-bump PR chosen
so the full diff fits cleanly in the example output for byte-exact
verification).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: write GoDoc

* chore: configure AI Agents

* chore: configure golangci-lint

* docs: update README

* ci: set up

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants