seachicken / gh-poi

✨ Safely clean up your local branches
https://dev.to/seachicken/safely-clean-up-your-local-branches-9i3
MIT License
682 stars 19 forks source link

Support ssh URL #113

Closed shogo82148 closed 1 year ago

shogo82148 commented 1 year ago

gh-poi doesn't work on the repository that is cloned by https://github.com/x-motemen/ghq:

% gh poi
✕ Fetching pull requests...
failed to run external command: gh, args: [repo view ssh///git@github.com/shogo82148/gh-poi --json owner,name,parent,defaultBranchRef]
 exit status 1

the result of git remote -v is:

% git remote -v
origin  ssh://git@github.com/shogo82148/gh-poi.git (fetch)
origin  ssh://git@github.com/shogo82148/gh-poi.git (push)
upstream    git@github.com:seachicken/gh-poi.git (fetch)
upstream    git@github.com:seachicken/gh-poi.git (push)

It looks that gh-poi doesn't support ssh-url. This pull request fixes it.

codecov[bot] commented 1 year ago

Codecov Report

Merging #113 (f938003) into main (da77b46) will decrease coverage by 0.20%. The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
- Coverage   81.88%   81.69%   -0.20%     
==========================================
  Files           5        5              
  Lines         762      781      +19     
==========================================
+ Hits          624      638      +14     
- Misses        114      117       +3     
- Partials       24       26       +2     
Files Coverage Δ
shared/remote.go 77.77% <75.00%> (-9.73%) :arrow_down:
seachicken commented 1 year ago

Wonderful! I also wanted to know which formats require support, so this was helpful. http://git-scm.com/docs/git-fetch#_git_urls