Skip to content

Commit

Permalink
add instructions to fix header issues in markdown comment
Browse files Browse the repository at this point in the history
  • Loading branch information
gdams committed Mar 28, 2024
1 parent e6d1ce4 commit ede60f0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg/review/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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),
Expand Down

0 comments on commit ede60f0

Please sign in to comment.