From efafdc287617fe8778c63ebf117a7b2584798b3b Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Sat, 19 Oct 2024 19:21:00 -0400 Subject: [PATCH 1/2] Disable "unable to get git repo" when none exists. --- pkg/model/github_context.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/model/github_context.go b/pkg/model/github_context.go index 168447b2aa4..b7542c9c3da 100644 --- a/pkg/model/github_context.go +++ b/pkg/model/github_context.go @@ -169,7 +169,9 @@ 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) + // 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 From 006b08b473d49de36421a8aafc63277422f89258 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Sun, 20 Oct 2024 06:11:01 -0400 Subject: [PATCH 2/2] Restore error back so it's included in bug reports Change from Warningf to Debugf. --- pkg/model/github_context.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/model/github_context.go b/pkg/model/github_context.go index b7542c9c3da..4cda2bfb1af 100644 --- a/pkg/model/github_context.go +++ b/pkg/model/github_context.go @@ -169,6 +169,7 @@ 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).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]