Skip to content

feat(action): built-in remote Action opens the git remote on ctrl+g (#65) - #80

Merged
hammadmajid merged 5 commits into
mainfrom
feat/65-remote
Oct 1, 2026
Merged

hammadmajid merged 5 commits into
mainfrom
feat/65-remote

Conversation

@hammadmajid

Copy link
Copy Markdown
Contributor

What changed

  • git.WebURL rewrites a remote URL to the repo's https home page (scp-style, ssh:// with/without port, git://, https with/without .git, GitLab subgroups, credentials stripped; local paths are an error).
  • git.RemoteURL(ctx, dir) picks origin, else the first remote, and returns git.ErrNotRepo / git.ErrNoRemote.
  • Go-side Action seam: {remote} in an Action's Run expands (shell-quoted) to that URL. action.Command now returns (*exec.Cmd, error) and fails when {remote} can't be resolved, so Start/Run return the error and the Picker shows remote: no git remote on its footer and stays open. Nothing is looked up when Run has no {remote}.
  • Built-in remote Action: ctrl+g, <opener> {remote}, detached. [actions.remote] key and run override it as for any built-in.
  • README documents the Action and {remote}.

Verification

gofmt clean, go vet, golangci-lint run ./... (0 issues), go test ./... (only the known local fish TestScriptExecution failures), binary builds, no file over 300 lines. Table tests for the URL rewrites; real-repo tests for origin/first-remote/no-remote/not-a-repo; Picker footer test.

Closes #65

@hammadmajid
hammadmajid merged commit 7d90705 into main Oct 1, 2026
3 checks passed
@hammadmajid
hammadmajid deleted the feat/65-remote branch October 1, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: built-in remote Action opens the git remote (ctrl+g)

1 participant