From 97538682f556b56cc7422ece660d8d7e6c4fb013 Mon Sep 17 00:00:00 2001 From: George Adams <georgeadams1995@gmail.com> Date: Thu, 28 Mar 2024 15:01:31 +0000 Subject: [PATCH] add instructions to fix header issues in markdown comment (#179) --- pkg/review/header.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkg/review/header.go b/pkg/review/header.go index 55d6b5d..d0c4862 100644 --- a/pkg/review/header.go +++ b/pkg/review/header.go @@ -257,11 +257,10 @@ func IsPR() bool { return os.Getenv("GITHUB_EVENT_NAME") == "pull_request" } -// TODO add fixing guide func Markdown(result *header2.Result) string { return fmt.Sprintf(` <!-- %s --> -[license-eye](https://github.com/apache/skywalking-eyes/tree/main/cmd/license-eye) has totally checked %d files. +[license-eye](https://github.com/apache/skywalking-eyes/tree/main/cmd/license-eye) has checked %d files. | Valid | Invalid | Ignored | Fixed | | --- | --- | --- | --- | | %d | %d | %d | %d | @@ -270,6 +269,15 @@ func Markdown(result *header2.Result) string { %v </details> + +<details> + <summary>Use this command to fix any missing license headers</summary> + + `+"```bash\n"+ + "docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix\n"+ + "```"+ + ` +</details> `, Identification, len(result.Success)+len(result.Failure)+len(result.Ignored),