fix: RepoPath resolution for issue and PR keybinding commands#825
Merged
dlvhdr merged 3 commits intodlvhdr:mainfrom Apr 5, 2026
Merged
fix: RepoPath resolution for issue and PR keybinding commands#825dlvhdr merged 3 commits intodlvhdr:mainfrom
dlvhdr merged 3 commits intodlvhdr:mainfrom
Conversation
RepoPath resolution for keybinding commands is only possible through repoPaths config. Fixing the missing fallback to the current working directory requires the resolution logic to be testable independently of the full UI model. No behavior change.
97220f3 to
82b368f
Compare
Contributor
Author
|
Had to apply some reformatting to make the linter happy. Could you please reapprove? |
dlvhdr
previously approved these changes
Apr 5, 2026
Keybinding commands using {{.RepoPath}} now resolve the path
from the current working directory when repoPaths config has no
match. This aligns issue and PR commands with the existing
behavior of branch and universal commands.
82b368f to
d8fdb9c
Compare
Contributor
Author
|
Sorry for the hassle, I again made a mistake in pre-linting. That I can see the shortcomings of my work only after your approval because of Github constraints is new to me and Go is not my natural ecosystem (yet). |
Owner
|
Yea sorry about that, it's only for first time contributors |
dlvhdr
approved these changes
Apr 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #496
Custom keybinding commands using
{{.RepoPath}}fail for issues and PRswhen
repoPathsis empty, even when running gh-dash from inside a repo.Branch and universal commands don't have this problem because they read
ctx.RepoPathdirectly.The root cause is in
runCustomCommand: it only resolvesRepoPathviaGetRepoLocalPath(which checks therepoPathsconfig), with no fallbackto the current repo.
The first commit extracts the resolution logic for testability, the second
adds the fallback and tests. Config matches still take priority.
How Did You Test this Change?
eon an issue with emptyrepoPaths, gh-dash startedfrom inside a repo
AI-assisted with Claude Code, reviewed and tested manually.