Skip to content

Commit

Permalink
Collapsed error details in patch comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mzampetakis committed Apr 22, 2024
1 parent a546e29 commit 40d2881
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/github-actions-adapter/serve/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (gas *GitHubActionsServer) Serve(ctx context.Context) error {
//In case of an error append to the comment patch
if brokerRequestMessage.PatchEvent != nil {
commentMessage := "### Could bot check GitHub Action Workflows."
commentMessage += "\n Error: " + err.Error()
commentMessage += "\n <details><summary>Error Details</summary>" + err.Error() + "</details>"
_ = gas.commentOnPatch(ctx, brokerRequestMessage, commentMessage, true)
}
return err
Expand Down
2 changes: 0 additions & 2 deletions cmd/github-actions-adapter/serve/serve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package serve
import (
"context"
"errors"
"fmt"
"log/slog"
"os"
"radicle-github-actions-adapter/app"
Expand Down Expand Up @@ -208,7 +207,6 @@ func (p *MockRadiclePatch) Comment(ctx context.Context, repoID, patchID, revisio
p.t.Error("too much comments requested in total")
return errors.New("too much comments requested in total")
}
fmt.Println(p.TotalComments)
return nil
}

Expand Down

0 comments on commit 40d2881

Please sign in to comment.