Skip to content

Commit ab38200

Browse files
authored
Merge pull request #3327 from carapace-sh/fix-repo-search
gh: fix repo search (revert implicit owner/repo)
2 parents 67a2fc4 + f0b4e1c commit ab38200

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

completers/common/wt_completer/cmd/switch.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ func init() {
5555
default:
5656
switch c.Parts[0] {
5757
case "pr":
58-
return gh.ActionPullRequests(gh.PullRequestOpts{}.Default())
58+
return gh.ActionPullRequests(gh.PullRequestOpts{
59+
Owner: "{owner}",
60+
Name: "{repo}",
61+
}.Default())
5962
// TODO case "mr":
6063
default:
6164
return carapace.ActionValues()

pkg/actions/tools/gh/graphql.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ func graphQlAction(opts RepoOpts, query string, v any, transform func() carapace
3131
opts.Owner = conf.User
3232
}
3333

34-
if opts.Owner == "" {
35-
opts.Owner = "{owner}"
36-
}
37-
if opts.Name == "" {
38-
opts.Name = "{repo}"
39-
}
40-
4134
args := []string{"api", "graphql",
4235
"--header", "Accept: application/vnd.github.merge-info-preview+json",
4336
"-F", "owner=" + opts.Owner,

0 commit comments

Comments
 (0)