Skip to content

Commit

Permalink
fix: remove setting of github status
Browse files Browse the repository at this point in the history
  • Loading branch information
cybersiddhu committed May 5, 2021
1 parent 9473262 commit c4b3541
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions internal/app/comment/ontology.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ func OntoReportOnPullComment(c *cli.Context) error {
if err != nil {
return cli.NewExitError(err.Error(), 2)
}
return reportStatusError(rs)
}

func reportStatusError(rs map[string][]*reportContent) error {
if _, ok := rs["fail"]; ok {
return cli.NewExitError(
fmt.Sprintf("failed report count %d", len(rs["fail"])),
2,
)
}
return nil
}

Expand All @@ -129,14 +139,7 @@ func createCommentFromReport(args *reportParams) error {
if err != nil {
return fmt.Errorf("error in creating pull request comment %s", err)
}
return manageCheckStatus(&checkStatusParams{
owner: args.owner,
repository: args.repository,
ref: args.ref,
data: args.data,
client: gclient,
report: "report",
})
return nil
}

func mkdownOutput(data interface{}) (*bytes.Buffer, error) {
Expand Down

0 comments on commit c4b3541

Please sign in to comment.