Skip to content

fix: name the repository for gh repo view when a read has no checkout - #2012

Merged
yansfil merged 1 commit into
mainfrom
fix/gh-repo-view-named
Nov 2, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/gh-repo-view-named

Conversation

@yansfil

@yansfil yansfil commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Related: #2008

Summary

#2008 이후 mini 같은 SSH 장치 프로젝트의 PR 목록은 읽히는데, 같은 읽기 안의 gh repo view가 실패해서 읽기 전체가 실패로 남았습니다.
gh repo view는 GH_REPO를 무시하고 현재 폴더의 git remote를 읽기 때문입니다(gh 2.76). 장치 체크아웃은 이 Mac에 폴더가 없으니 not a git repository로 끝납니다.
이제 gh 실행기가 저장소 이름이 있는 호출에서는 repo view에 그 이름을 인자로 붙입니다.

pull_requests.failed project=/Users/grab/projects/modakbul pull_requests=75
message="failed to run git: fatal: not a git repository (or any of the parent directories): .git"

Review

  • 조심해서 볼 파일: hide-host/src/gh.rs - 허용 목록 검사는 원래 인자로 하고, 실행할 때만 저장소 이름을 넣습니다.

Evidence

  • 확인한 것: 설치한 1.1.1-main.73732d2f에서 core 로그에 mini 프로젝트 3개의 읽기가 위 메시지로 실패하는 것을 봤습니다.
  • 확인한 것: cd / && GH_REPO=with-hide/hide gh repo view --json nameWithOwner는 같은 메시지로 실패하고, issue list와 pr list는 성공합니다.
  • 확인한 것: 새 테스트 a_repository_view_named_by_its_repository_needs_no_checkout는 고치기 전에는 실패하고 고친 뒤에는 통과합니다. hide-host 275개 통과, clippy 깨끗.
  • 확인하지 못한 것: 고친 빌드로 mini 읽기가 성공하는지는 아직 보지 못했습니다. 머지 후 재설치해서 확인합니다.

@yansfil
yansfil merged commit 880bcf2 into main Nov 2, 2026
36 checks passed
@yansfil
yansfil deleted the fix/gh-repo-view-named branch November 2, 2026 08:29
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.

1 participant