Skip to content

Commit

Permalink
fix: message format (#373)
Browse files Browse the repository at this point in the history
* fix: message format

Signed-off-by: Alex <[email protected]>

* set to single line

Signed-off-by: Alex <[email protected]>

---------

Signed-off-by: Alex <[email protected]>
  • Loading branch information
alex-souslik-hs authored Mar 2, 2025
1 parent ed4056c commit 61456e6
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions pkg/events/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,7 @@ func (ce *CheckEvent) Process(ctx context.Context) error {

if len(ce.affectedItems.Applications) <= 0 && len(ce.affectedItems.ApplicationSets) <= 0 {
ce.logger.Info().Msg("No affected apps or appsets, skipping")
if _, err := ce.ctr.VcsClient.PostMessage(ctx, ce.pullRequest, fmt.Sprintf(`
## Kubechecks %s Report
No changes
`, ce.ctr.Config.Identifier)); err != nil {
if _, err := ce.ctr.VcsClient.PostMessage(ctx, ce.pullRequest, fmt.Sprintf("## Kubechecks %s Report\nNo changes", ce.ctr.Config.Identifier)); err != nil {
return errors.Wrap(err, "failed to post changes")
}
return nil
Expand Down Expand Up @@ -390,7 +387,7 @@ func (ce *CheckEvent) CommitStatus(ctx context.Context, status pkg.CommitState)

const (
errorCommentFormat = `
:warning: **Error while %s** :warning:
:warning: **Error while %s** :warning:
` + "```" + `
%v
` + "```" + `
Expand All @@ -406,7 +403,5 @@ func (ce *CheckEvent) createNote(ctx context.Context) (*msg.Message, error) {

ce.logger.Info().Msgf("Creating note")

return ce.ctr.VcsClient.PostMessage(ctx, ce.pullRequest, fmt.Sprintf(`
## Kubechecks %s Report
:hourglass: kubechecks running ... `, ce.ctr.Config.Identifier))
return ce.ctr.VcsClient.PostMessage(ctx, ce.pullRequest, fmt.Sprintf("## Kubechecks %s Report\n:hourglass: kubechecks running...", ce.ctr.Config.Identifier))
}

0 comments on commit 61456e6

Please sign in to comment.