Disable "unable to get git repo" when none exists. (#2495)
* Disable "unable to get git repo" when none exists. * Restore error back so it's included in bug reports Change from Warningf to Debugf. --------- Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
@@ -169,7 +169,10 @@ func (ghc *GithubContext) SetRepositoryAndOwner(ctx context.Context, githubInsta
|
|||||||
if ghc.Repository == "" {
|
if ghc.Repository == "" {
|
||||||
repo, err := git.FindGithubRepo(ctx, repoPath, githubInstance, remoteName)
|
repo, err := git.FindGithubRepo(ctx, repoPath, githubInstance, remoteName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
common.Logger(ctx).Warningf("unable to get git repo (githubInstance: %v; remoteName: %v, repoPath: %v): %v", githubInstance, remoteName, repoPath, err)
|
common.Logger(ctx).Debugf("unable to get git repo (githubInstance: %v; remoteName: %v, repoPath: %v): %v", githubInstance, remoteName, repoPath, err)
|
||||||
|
// nektos/act is used as a default action, so why not a repo?
|
||||||
|
ghc.Repository = "nektos/act"
|
||||||
|
ghc.RepositoryOwner = strings.Split(ghc.Repository, "/")[0]
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ghc.Repository = repo
|
ghc.Repository = repo
|
||||||
|
|||||||
Reference in New Issue
Block a user