1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-16 18:01:34 +00:00

chore: "unable to get git repo" is a debug message, not a warning (#822)

Refs https://github.com/nektos/act/pull/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)

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/822): <!--number 822 --><!--line 0 --><!--description Y2hvcmU6ICJ1bmFibGUgdG8gZ2V0IGdpdCByZXBvIiBpcyBhIGRlYnVnIG1lc3NhZ2UsIG5vdCBhIHdhcm5pbmcgW3NraXAgY2FzY2FkZV0=-->chore: "unable to get git repo" is a debug message, not a warning [skip cascade]<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Steven Edwards <cureadvocate@gmail.com>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/822
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
Earl Warren 2025-08-10 16:24:49 +00:00 committed by earl-warren
parent b236cb64f9
commit 4e5a3025d7
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201

View file

@ -171,7 +171,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).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)
return
}
ghc.Repository = repo