- Hunk extension that exposes GitHub workflows under
hunk gh. hunk gh prandhunk gh commitfetch diffs directly from GitHub and delegate to Hunk's built-inpatchcommand.- The extension ships as TypeScript source with no runtime dependencies.
index.tsis the folder-extension entry point and public re-export surface; keep it tiny.src/parsing.tsvalidates PR, commit, repository, and delegated patch arguments.src/repository.tsparses and resolves GitHub origins without invoking a shell.src/github.tsowns authenticated, bounded, redirect-safe GitHub diff requests.src/temporaryPatch.tsowns restrictive temporary patch creation and cleanup.src/extension.tsdispatches commands and delegates fetched diffs to Hunk.- Tests stay colocated with each module under
src/.
- Preserve the fixed
api.github.comcredential boundary and manual redirect policy. - Never include response bodies or tokens in user-facing errors.
- Keep temporary patch permissions and shutdown cleanup behavior covered by tests.
- Add short JSDoc comments to functions and helpers.
- Validate with
bun run check.
- Record user-visible changes in
CHANGELOG.mdunderUnreleased. - Use Conventional Commit titles:
<type>[scope]: <description>. - Tag releases as
v<version>after updating the package version and changelog.