Problem
action.yml (root) and .github/actions/install-fullsend-cli/action.yml duplicate several blocks of install logic verbatim:
- OS/arch normalization (runner values to Go release conventions) -- identical 11-line block in both files
- SHA-to-tag resolution -- same goal, different implementations (
curl + manual pagination vs gh api --paginate)
retry_curl -- defined twice within action.yml itself (detect step and download step)
- Source-build clone -- nearly identical shallow-fetch-with-full-clone-fallback pattern
This duplication has already caused the same bug to be patched in both places independently (the jq-injection fix in the SHA-to-tag resolution was one bug fixed twice in a prior review round of #5357).
Proposal
Create .github/scripts/fullsend-install-lib.sh exporting shared functions:
retry_curl -- retry wrapper with exponential backoff
resolve_runner_platform -- normalize RUNNER_OS/RUNNER_ARCH to Go conventions
resolve_sha_to_tag -- look up a 40-char SHA in repo tags, return matching release tag
clone_at_ref -- shallow-clone with full-clone fallback for bare SHAs
Both action files source the library instead of inlining the logic.
Blocked by
Problem
action.yml(root) and.github/actions/install-fullsend-cli/action.ymlduplicate several blocks of install logic verbatim:curl+ manual pagination vsgh api --paginate)retry_curl-- defined twice withinaction.ymlitself (detect step and download step)This duplication has already caused the same bug to be patched in both places independently (the jq-injection fix in the SHA-to-tag resolution was one bug fixed twice in a prior review round of #5357).
Proposal
Create
.github/scripts/fullsend-install-lib.shexporting shared functions:retry_curl-- retry wrapper with exponential backoffresolve_runner_platform-- normalizeRUNNER_OS/RUNNER_ARCHto Go conventionsresolve_sha_to_tag-- look up a 40-char SHA in repo tags, return matching release tagclone_at_ref-- shallow-clone with full-clone fallback for bare SHAsBoth action files source the library instead of inlining the logic.
Blocked by
continue-on-error+ source-build fallback to rootaction.yml, which changes the download step. This refactor should land after that PR to avoid merge conflicts.