We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4a2ff30 + f93261a commit 1f97a9aCopy full SHA for 1f97a9a
1 file changed
context/context.go
@@ -240,10 +240,22 @@ func (c *fsContext) Remotes() (Remotes, error) {
240
}
241
242
sshTranslate := git.ParseSSHConfig().Translator()
243
- c.remotes = translateRemotes(gitRemotes, sshTranslate)
+ resolvedRemotes := translateRemotes(gitRemotes, sshTranslate)
244
+
245
+ // ignore non-github.com remotes
246
+ // TODO: GHE compatibility
247
+ filteredRemotes := Remotes{}
248
+ for _, r := range resolvedRemotes {
249
+ if r.RepoHost() != defaultHostname {
250
+ continue
251
+ }
252
+ filteredRemotes = append(filteredRemotes, r)
253
254
+ c.remotes = filteredRemotes
255
256
257
if len(c.remotes) == 0 {
258
259
return nil, errors.New("no git remote found for a github.com repository")
260
261
return c.remotes, nil
0 commit comments