1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-11 17:50:58 +00:00

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>
(cherry picked from commit e42a534b2e65d28b41532f9a44d18c0354aecfc2)
This commit is contained in:
Steven Edwards 2025-02-25 01:00:38 -05:00 committed by Earl Warren
parent e049c82d9c
commit b92d5cb3be
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -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