From 16215a8f774e1ce4ea7c88dda5277c44712ddd51 Mon Sep 17 00:00:00 2001 From: Cezar Craciunoiu Date: Tue, 12 Dec 2023 15:43:11 +0200 Subject: [PATCH] feat(cmd): Add file and lines in message for verbosity Signed-off-by: Cezar Craciunoiu --- cmd/governctl/pr/check/patch.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/governctl/pr/check/patch.go b/cmd/governctl/pr/check/patch.go index e9b12db..663c1ee 100644 --- a/cmd/governctl/pr/check/patch.go +++ b/cmd/governctl/pr/check/patch.go @@ -174,7 +174,13 @@ func (opts *Patch) Run(cmd *cobra.Command, args []string) error { // Set an annotations on the PR if run in a GitHub Actions context. // See: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message if os.Getenv("GITHUB_ACTIONS") == "true" && len(note.File) > 0 && note.Line > 0 { - fmt.Printf("::%s file=%s,line=%d,title=%s::%s\n", note.Level, note.File, note.Line, note.Type, note.Message) + fmt.Printf("::%s file=%s,line=%d,title=%s::%s\n", + note.Level, + note.File, + note.Line, + note.Type, + fmt.Sprintf("%s:%d-%d: %s", note.File, note.Line, note.Line, note.Message), + ) } } }