Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: increase log level for getMeta related functions #1197

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/report/output/saas/saas.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func getSha(target string) (*string, error) {
}
bytes, err := exec.Command("git", "-C", target, "rev-parse", "HEAD").Output()
if err != nil {
log.Debug().Msg("Couldn't extract git info for commit sha please set 'SHA' environment variable.")
log.Error().Msg("Couldn't extract git info for commit sha please set 'SHA' environment variable.")
return nil, err
}
return pointer.String(strings.TrimSuffix(string(bytes), "\n")), nil
Expand All @@ -207,7 +207,7 @@ func getCurrentBranch(target string) (*string, error) {
}
bytes, err := exec.Command("git", "-C", target, "rev-parse", "--abbrev-ref", "HEAD").Output()
if err != nil {
log.Debug().Msg("Couldn't extract git info for current branch please set 'CURRENT_BRANCH' environment variable.")
log.Error().Msg("Couldn't extract git info for current branch please set 'CURRENT_BRANCH' environment variable.")
return nil, err
}
return pointer.String(strings.TrimSuffix(string(bytes), "\n")), nil
Expand All @@ -220,7 +220,7 @@ func getDefaultBranch(target string) (*string, error) {
}
bytes, err := exec.Command("git", "-C", target, "rev-parse", "--abbrev-ref", "origin/HEAD").Output()
if err != nil {
log.Debug().Msg("Couldn't extract the default branch of this repository please set 'DEFAULT_BRANCH' environment variable.")
log.Error().Msg("Couldn't extract the default branch of this repository. Please set 'DEFAULT_BRANCH' environment variable.")
return nil, err
}
return pointer.String(strings.TrimPrefix(strings.TrimSuffix(string(bytes), "\n"), "origin/")), nil
Expand All @@ -233,7 +233,7 @@ func getRemote(target string) (*string, error) {
}
bytes, err := exec.Command("git", "-C", target, "remote", "get-url", "origin").Output()
if err != nil {
log.Debug().Msg("Couldn't extract git info for origin url please set 'ORIGIN_URL' environment variable.")
log.Error().Msg("Couldn't extract git info for origin url please set 'ORIGIN_URL' environment variable.")
return nil, err
}
return pointer.String(strings.TrimSuffix(string(bytes), "\n")), nil
Expand Down
Loading