diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 925b01b4..4269f39d 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.3 + go-version: 1.20.5 cache: true - name: Test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 918ddb8a..9a3ce0d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.3 + go-version: 1.20.5 cache: true - name: Compile pint diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index b720fcce..c0073573 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.3 + go-version: 1.20.5 cache: true - name: Set up QEMU diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index f98e5bb3..030465a0 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.3 + go-version: 1.20.5 cache: true - name: Build binary diff --git a/.github/workflows/go-mod-tidy.yml b/.github/workflows/go-mod-tidy.yml index 25a94f55..27d1d214 100644 --- a/.github/workflows/go-mod-tidy.yml +++ b/.github/workflows/go-mod-tidy.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.3 + go-version: 1.20.5 - name: Run go mod tidy run: go mod tidy diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6a294cb8..72ee3746 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.3 + go-version: 1.20.5 cache: true cache-dependency-path: tools/golangci-lint/go.sum @@ -34,7 +34,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.3 + go-version: 1.20.5 cache: true cache-dependency-path: tools/gofumpt/go.sum diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc0531fa..bcf5ac97 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20.3 + go-version: 1.20.5 cache: true - name: Test diff --git a/docs/changelog.md b/docs/changelog.md index 5ca660e7..3d79e9d0 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -9,6 +9,8 @@ This allows to only show estimated alerts count only if there would be high enough (`>= minCount`) number of alerts. Setting `severity` as well allows to block rules that would create too many alerts. +- GitHub reporter will now included folded list of all problems in the summary + comment - #608. ### Fixed diff --git a/internal/reporter/github.go b/internal/reporter/github.go index 97aad131..913a5851 100644 --- a/internal/reporter/github.go +++ b/internal/reporter/github.go @@ -1,6 +1,7 @@ package reporter import ( + "bytes" "context" "fmt" "strconv" @@ -251,6 +252,23 @@ func formatGHReviewBody(version string, summary Summary) string { b.WriteString("\n

\n\n\n") + b.WriteString("
Problems\n

\n\n") + if summary.Entries > 0 { + buf := bytes.NewBuffer(nil) + cr := NewConsoleReporter(buf, checks.Information) + err := cr.Submit(summary) + if err != nil { + b.WriteString(fmt.Sprintf("Failed to generate list of problems: %s", err)) + } else { + b.WriteString("```\n") + b.WriteString(buf.String()) + b.WriteString("```\n") + } + } else { + b.WriteString("No problems reported") + } + b.WriteString("\n

\n
\n\n") + return b.String() }