From b92d5cb3bee13e22e5b19042bc82875d3500e853 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Tue, 25 Feb 2025 01:00:38 -0500 Subject: [PATCH] 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 (cherry picked from commit e42a534b2e65d28b41532f9a44d18c0354aecfc2) --- act/model/github_context.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/act/model/github_context.go b/act/model/github_context.go index 02d4f779..debc584e 100644 --- a/act/model/github_context.go +++ b/act/model/github_context.go @@ -171,7 +171,10 @@ func (ghc *GithubContext) SetRepositoryAndOwner(ctx context.Context, githubInsta if ghc.Repository == "" { repo, err := git.FindGithubRepo(ctx, repoPath, githubInstance, remoteName) 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 } ghc.Repository = repo