only do forgejo stuff when in action
All checks were successful
Gosec Check / Gosec Check (push) Successful in 53s
All checks were successful
Gosec Check / Gosec Check (push) Successful in 53s
This commit is contained in:
parent
dd7f28e061
commit
fe02c430ad
1 changed files with 32 additions and 40 deletions
10
cmd/root.go
10
cmd/root.go
|
@ -178,7 +178,6 @@ var rootCmd = &cobra.Command{
|
||||||
|
|
||||||
if isAction {
|
if isAction {
|
||||||
action.AddStepSummary(markdownOutputStr)
|
action.AddStepSummary(markdownOutputStr)
|
||||||
}
|
|
||||||
|
|
||||||
actionCtx, err := action.Context()
|
actionCtx, err := action.Context()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -199,14 +198,6 @@ var rootCmd = &cobra.Command{
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will trigger gosec
|
|
||||||
file, err := os.OpenFile("testing.txt", os.O_APPEND|os.O_CREATE|os.O_WRONLY, os.ModePerm)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalln(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
if len(issues) == 0 {
|
if len(issues) == 0 {
|
||||||
if _, _, err := forgeClient.CreateIssue(repoOwner, repoName, forgejo.CreateIssueOption{
|
if _, _, err := forgeClient.CreateIssue(repoOwner, repoName, forgejo.CreateIssueOption{
|
||||||
Title: "GoSec Report",
|
Title: "GoSec Report",
|
||||||
|
@ -225,6 +216,7 @@ var rootCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue