(baseRepoFunc func() (ghrepo.Interface, error), override string)
| 58 | } |
| 59 | |
| 60 | func OverrideBaseRepoFunc(baseRepoFunc func() (ghrepo.Interface, error), override string) func() (ghrepo.Interface, error) { |
| 61 | if override == "" { |
| 62 | override = os.Getenv("GH_REPO") |
| 63 | } |
| 64 | if override != "" { |
| 65 | return func() (ghrepo.Interface, error) { |
| 66 | return ghrepo.FromFullName(override) |
| 67 | } |
| 68 | } |
| 69 | return baseRepoFunc |
| 70 | } |