From 6c4650d6beb48854a68314591e3183a9d0282119 Mon Sep 17 00:00:00 2001 From: Vishal Vaibhav Date: Thu, 21 May 2026 14:46:49 +0530 Subject: [PATCH 1/4] chore: add pull covergae step to itself --- .github/workflows/pr-coverage.yml | 70 +++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/pr-coverage.yml diff --git a/.github/workflows/pr-coverage.yml b/.github/workflows/pr-coverage.yml new file mode 100644 index 0000000..b3cbf7e --- /dev/null +++ b/.github/workflows/pr-coverage.yml @@ -0,0 +1,70 @@ +name: pr-code-coverage + +# Dogfoods this plugin on its own PRs: builds the plugin image from the PR +# source, computes coverage for only the lines changed in the PR, and posts a +# summary comment on the PR. + +on: + pull_request: + +permissions: + contents: read + pull-requests: write # required so the plugin can post the coverage comment + +jobs: + coverage: + runs-on: ubuntu-latest + # Fork PRs only get a read-only GITHUB_TOKEN (can't comment) and no secrets, + # so restrict to same-repo PRs to avoid a guaranteed failure on forks. + if: github.event.pull_request.head.repo.full_name == github.repository + steps: + - name: Check out the repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 # need the base branch present to diff against it + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.26.3 + + - name: Generate coverage profile + run: go test -coverpkg=./... -coverprofile=coverage.txt ./... + + - name: Convert coverage to cobertura + # go run leaves no installed binary; boumenot emits as the + # absolute build dir (== github.workspace) and class filenames relative + # to the module root, which is what PARAMETER_SOURCE_DIRS matches against. + run: go run github.com/boumenot/gocover-cobertura@v1.5.0 < coverage.txt > coverage.xml + + - name: Build plugin image + # The published :latest image predates the public-github.com base-URL fix, + # so build from the PR source to test the exact code under review. + run: docker build -t pr-code-coverage:ci . + + - name: Report coverage on changed lines + env: + PARAMETER_COVERAGE_TYPE: cobertura + PARAMETER_COVERAGE_FILE: coverage.xml + # Must equal the cobertura path (the dir go test ran in). + PARAMETER_SOURCE_DIRS: ${{ github.workspace }} + # Omit PARAMETER_GH_API_BASE_URL -> defaults to https://api.github.com. + PARAMETER_GH_API_KEY: ${{ secrets.GITHUB_TOKEN }} + BUILD_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} + REPOSITORY_ORG: ${{ github.repository_owner }} + REPOSITORY_NAME: ${{ github.event.repository.name }} + run: | + git fetch --no-tags origin "${{ github.base_ref }}" + git --no-pager diff --unified=0 "origin/${{ github.base_ref }}" -- '*.go' \ + | docker run --rm -i \ + -e PARAMETER_COVERAGE_TYPE \ + -e PARAMETER_COVERAGE_FILE \ + -e PARAMETER_SOURCE_DIRS \ + -e PARAMETER_GH_API_KEY \ + -e BUILD_PULL_REQUEST_NUMBER \ + -e REPOSITORY_ORG \ + -e REPOSITORY_NAME \ + -v "${{ github.workspace }}:${{ github.workspace }}" \ + -w "${{ github.workspace }}" \ + --entrypoint /plugin \ + pr-code-coverage:ci From d91e05ea51ba4debf0be5df4711821b97a13f292 Mon Sep 17 00:00:00 2001 From: Vishal Vaibhav Date: Thu, 21 May 2026 14:53:44 +0530 Subject: [PATCH 2/4] chore: add startup log line to trigger PR coverage comment Touches an executed line in Run() so the dogfooded pr-code-coverage workflow has a covered Go change to report on. Co-Authored-By: Claude Opus 4.7 --- internal/plugin/runner.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/plugin/runner.go b/internal/plugin/runner.go index 032a99b..e963230 100644 --- a/internal/plugin/runner.go +++ b/internal/plugin/runner.go @@ -28,6 +28,8 @@ func NewRunner() *DefaultRunner { // nolint: gocyclo func (*DefaultRunner) Run(propertyGetter func(string) (string, bool), changedSourceLinesSource io.Reader, reportDefaultOut io.Writer) error { + logrus.Info("starting pull-request-code-coverage run") + rawSourceDirs, found := propertyGetter("PARAMETER_SOURCE_DIRS") if !found { return errors.New("Missing property PARAMETER_SOURCE_DIRS") From 800a9f4f58dfbf01b9301086d2bb3d05f5636104 Mon Sep 17 00:00:00 2001 From: Vishal Vaibhav Date: Thu, 21 May 2026 15:09:35 +0530 Subject: [PATCH 3/4] feat: richer GitHub PR coverage comment Refactor the PR comment into friendlier GitHub markdown: an H2 heading, a status emoji driven by covered %, a table mapping each metric to a plain-language explanation, and a collapsible missed-instructions block. Console (Simple) reporter output is unchanged. Co-Authored-By: Claude Opus 4.7 --- internal/plugin/reporter/github_pr.go | 92 +++++++++++----- internal/plugin/runner_test.go | 152 ++++++++++++++++++-------- 2 files changed, 168 insertions(+), 76 deletions(-) diff --git a/internal/plugin/reporter/github_pr.go b/internal/plugin/reporter/github_pr.go index addaaee..03ae14d 100644 --- a/internal/plugin/reporter/github_pr.go +++ b/internal/plugin/reporter/github_pr.go @@ -89,47 +89,44 @@ func (s *GithubPullRequest) createCommentBody(changedLinesWithCoverage domain.So modules := collectModules(changedLinesWithCoverage) - summaryLines := []string{} - - if len(modules) > 0 { - summaryLines = append(summaryLines, fmt.Sprintf("*Modules: %v*\n\n", strings.Join(modules, ", "))) + bodyLines := []string{ + "## 📊 Code Coverage — Changed Lines\n", + "\n", + "> Coverage is measured **only for the lines this PR changes**, not the whole file or repo.\n", + "\n", } - var missedInstructions string - for _, r := range changedLinesWithCoverage { - if r.MissedInstructionCount > 0 { - missedInstructions += fmt.Sprintf("--- %v\n", lineDescription(r.SourceLine)) - missedInstructions += fmt.Sprintf("%v\n", r.LineValue) - } + if len(modules) > 0 { + bodyLines = append(bodyLines, fmt.Sprintf("*Modules: %v*\n\n", strings.Join(modules, ", "))) } - summaryLines = append(summaryLines, generateSummaryLines(changedLinesWithCoverage, func(linesWithDataCount int, linesWithoutDataCount int, covered int, missed int) []string { + bodyLines = append(bodyLines, generateSummaryLines(changedLinesWithCoverage, func(linesWithDataCount int, linesWithoutDataCount int, covered int, missed int) []string { totalLines := linesWithDataCount + linesWithoutDataCount totalInstructions := covered + missed - result := make([]string, 5) - - result[0] = "Code Coverage Summary:\n\n" - result[1] = fmt.Sprintf("Lines Without Coverage Data -> %.f%% (%d)\n", toPercent(safeDiv(float32(linesWithoutDataCount), float32(totalLines), 0)), linesWithoutDataCount) - result[2] = fmt.Sprintf("Lines With Coverage Data -> %.f%% (%d)\n", toPercent(safeDiv(float32(linesWithDataCount), float32(totalLines), 1)), linesWithDataCount) - result[3] = fmt.Sprintf("Covered Instructions -> **%.f%%** (%d)\n", toPercent(safeDiv(float32(covered), float32(totalInstructions), 1)), covered) - result[4] = fmt.Sprintf("Missed Instructions -> %.f%% (%d)\n", toPercent(safeDiv(float32(missed), float32(totalInstructions), 0)), missed) - - return result + coveredPct := toPercent(safeDiv(float32(covered), float32(totalInstructions), 1)) + missedPct := toPercent(safeDiv(float32(missed), float32(totalInstructions), 0)) + withDataPct := toPercent(safeDiv(float32(linesWithDataCount), float32(totalLines), 1)) + withoutDataPct := toPercent(safeDiv(float32(linesWithoutDataCount), float32(totalLines), 0)) + + return []string{ + fmt.Sprintf("### %v Covered Instructions: %.f%% (%d)\n", coverageStatusEmoji(coveredPct), coveredPct, covered), + "\n", + "| Metric | Result | What it means |\n", + "| :-- | :-: | :-- |\n", + fmt.Sprintf("| 🟢 **Covered Instructions** | **%.f%%** (%d) | Changed code your tests executed. Higher is better. |\n", coveredPct, covered), + fmt.Sprintf("| 🔴 **Missed Instructions** | %.f%% (%d) | Changed code your tests never ran. Lower is better. |\n", missedPct, missed), + fmt.Sprintf("| 📈 Lines With Coverage Data | %.f%% (%d) | Changed lines the coverage tool could track. |\n", withDataPct, linesWithDataCount), + fmt.Sprintf("| ⚪ Lines Without Coverage Data | %.f%% (%d) | Changed lines with no data: comments, blanks, declarations. |\n", withoutDataPct, linesWithoutDataCount), + } })...) - var summary string - if missedInstructions == "" { - summary = strings.Join(summaryLines, "") - } else { - - summaryWithoutInstructions := strings.Join(summaryLines, "") - summary = summaryWithoutInstructions + "\n
Missed Instructions summary\n\n" + "```\n" + missedInstructions + "```" + - "\n
" - } + body := strings.Join(bodyLines, "") + body += missedInstructionsSection(changedLinesWithCoverage) + body += "\n🤖 Generated by pull-request-code-coverage — coverage for changed lines only.\n" data := map[string]string{ - "body": summary, + "body": body, } dataBytes, marshalErr := s.jsonClient.Marshal(data) @@ -141,6 +138,41 @@ func (s *GithubPullRequest) createCommentBody(changedLinesWithCoverage domain.So return bytes.NewBuffer(dataBytes), nil } +// missedInstructionsSection renders a collapsible block listing each changed +// line that was not executed by tests. Returns "" when nothing was missed. +func missedInstructionsSection(changedLinesWithCoverage domain.SourceLineCoverageReport) string { + var missedInstructions string + missedLineCount := 0 + + for _, r := range changedLinesWithCoverage { + if r.MissedInstructionCount > 0 { + missedLineCount++ + missedInstructions += fmt.Sprintf("--- %v\n", lineDescription(r.SourceLine)) + missedInstructions += fmt.Sprintf("%v\n", r.LineValue) + } + } + + if missedInstructions == "" { + return "" + } + + return fmt.Sprintf("\n
🔍 Missed instructions (%d)\n\n", missedLineCount) + + "```\n" + missedInstructions + "```" + "\n
\n" +} + +// coverageStatusEmoji maps a covered-instruction percentage to a traffic-light +// status icon, so the headline reads at a glance. +func coverageStatusEmoji(coveredPct float32) string { + switch { + case coveredPct >= 80: + return "🟢" + case coveredPct >= 50: + return "🟡" + default: + return "🔴" + } +} + func collectModules(changedLinesWithCoverage domain.SourceLineCoverageReport) []string { collector := map[string]bool{} diff --git a/internal/plugin/runner_test.go b/internal/plugin/runner_test.go index 7529ed6..bba4a0a 100644 --- a/internal/plugin/runner_test.go +++ b/internal/plugin/runner_test.go @@ -108,14 +108,20 @@ Missed Instructions -> 3% (5) `, buf.String()) requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ - "body": `Code Coverage Summary: + "body": `## 📊 Code Coverage — Changed Lines -Lines Without Coverage Data -> 92% (2216) -Lines With Coverage Data -> 8% (182) -Covered Instructions -> **97%** (177) -Missed Instructions -> 3% (5) +> Coverage is measured **only for the lines this PR changes**, not the whole file or repo. -
Missed Instructions summary +### 🟢 Covered Instructions: 97% (177) + +| Metric | Result | What it means | +| :-- | :-: | :-- | +| 🟢 **Covered Instructions** | **97%** (177) | Changed code your tests executed. Higher is better. | +| 🔴 **Missed Instructions** | 3% (5) | Changed code your tests never ran. Lower is better. | +| 📈 Lines With Coverage Data | 8% (182) | Changed lines the coverage tool could track. | +| ⚪ Lines Without Coverage Data | 92% (2216) | Changed lines with no data: comments, blanks, declarations. | + +
🔍 Missed instructions (5) ` + "```" + ` --- internal/plugin/runner.go:72 @@ -129,7 +135,11 @@ func GetCoverageReportLoader(coverageType string, sourceDir string) coverage.Loa --- main.go:17 os.Exit(1) ` + - "```\n
", + "```" + ` +
+ +🤖 Generated by pull-request-code-coverage — coverage for changed lines only. +`, }) propGetter.AssertExpectations(t) @@ -179,14 +189,20 @@ Missed Instructions -> 3% (5) `, buf.String()) requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ - "body": `Code Coverage Summary: + "body": `## 📊 Code Coverage — Changed Lines -Lines Without Coverage Data -> 92% (2216) -Lines With Coverage Data -> 8% (182) -Covered Instructions -> **97%** (177) -Missed Instructions -> 3% (5) +> Coverage is measured **only for the lines this PR changes**, not the whole file or repo. + +### 🟢 Covered Instructions: 97% (177) + +| Metric | Result | What it means | +| :-- | :-: | :-- | +| 🟢 **Covered Instructions** | **97%** (177) | Changed code your tests executed. Higher is better. | +| 🔴 **Missed Instructions** | 3% (5) | Changed code your tests never ran. Lower is better. | +| 📈 Lines With Coverage Data | 8% (182) | Changed lines the coverage tool could track. | +| ⚪ Lines Without Coverage Data | 92% (2216) | Changed lines with no data: comments, blanks, declarations. | -
Missed Instructions summary +
🔍 Missed instructions (5) ` + "```" + ` --- internal/plugin/runner.go:72 @@ -200,7 +216,11 @@ func GetCoverageReportLoader(coverageType string, sourceDir string) coverage.Loa --- main.go:17 os.Exit(1) ` + - "```\n
", + "```" + ` +
+ +🤖 Generated by pull-request-code-coverage — coverage for changed lines only. +`, }) propGetter.AssertExpectations(t) @@ -240,22 +260,32 @@ Missed Instructions -> 27% (3) `, buf.String()) requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ - "body": `*Modules: category-search* + "body": `## 📊 Code Coverage — Changed Lines -Code Coverage Summary: +> Coverage is measured **only for the lines this PR changes**, not the whole file or repo. -Lines Without Coverage Data -> 78% (7) -Lines With Coverage Data -> 22% (2) -Covered Instructions -> **73%** (8) -Missed Instructions -> 27% (3) +*Modules: category-search* -
Missed Instructions summary +### 🟡 Covered Instructions: 73% (8) + +| Metric | Result | What it means | +| :-- | :-: | :-- | +| 🟢 **Covered Instructions** | **73%** (8) | Changed code your tests executed. Higher is better. | +| 🔴 **Missed Instructions** | 27% (3) | Changed code your tests never ran. Lower is better. | +| 📈 Lines With Coverage Data | 22% (2) | Changed lines the coverage tool could track. | +| ⚪ Lines Without Coverage Data | 78% (7) | Changed lines with no data: comments, blanks, declarations. | + +
🔍 Missed instructions (1) ` + "```" + ` --- category-search/src/main/java/com/tgt/CategorySearchApplication.java:52 System.out.print("Something"); ` + - "```\n
", + "```" + ` +
+ +🤖 Generated by pull-request-code-coverage — coverage for changed lines only. +`, }) propGetter.AssertExpectations(t) @@ -296,22 +326,32 @@ Missed Instructions -> 27% (3) `, buf.String()) requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ - "body": `*Modules: category-search* + "body": `## 📊 Code Coverage — Changed Lines -Code Coverage Summary: +> Coverage is measured **only for the lines this PR changes**, not the whole file or repo. -Lines Without Coverage Data -> 78% (7) -Lines With Coverage Data -> 22% (2) -Covered Instructions -> **73%** (8) -Missed Instructions -> 27% (3) +*Modules: category-search* + +### 🟡 Covered Instructions: 73% (8) -
Missed Instructions summary +| Metric | Result | What it means | +| :-- | :-: | :-- | +| 🟢 **Covered Instructions** | **73%** (8) | Changed code your tests executed. Higher is better. | +| 🔴 **Missed Instructions** | 27% (3) | Changed code your tests never ran. Lower is better. | +| 📈 Lines With Coverage Data | 22% (2) | Changed lines the coverage tool could track. | +| ⚪ Lines Without Coverage Data | 78% (7) | Changed lines with no data: comments, blanks, declarations. | + +
🔍 Missed instructions (1) ` + "```" + ` --- category-search/src/main/java/com/tgt/CategorySearchApplication.java:52 System.out.print("Something"); ` + - "```\n
", + "```" + ` +
+ +🤖 Generated by pull-request-code-coverage — coverage for changed lines only. +`, }) propGetter.AssertExpectations(t) @@ -354,23 +394,33 @@ Missed Instructions -> 12% (6) `, buf.String()) requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ - "body": `*Modules: category-search* + "body": `## 📊 Code Coverage — Changed Lines -Code Coverage Summary: +> Coverage is measured **only for the lines this PR changes**, not the whole file or repo. -Lines Without Coverage Data -> 47% (7) -Lines With Coverage Data -> 53% (8) -Covered Instructions -> **88%** (42) -Missed Instructions -> 12% (6) +*Modules: category-search* + +### 🟢 Covered Instructions: 88% (42) -
Missed Instructions summary +| Metric | Result | What it means | +| :-- | :-: | :-- | +| 🟢 **Covered Instructions** | **88%** (42) | Changed code your tests executed. Higher is better. | +| 🔴 **Missed Instructions** | 12% (6) | Changed code your tests never ran. Lower is better. | +| 📈 Lines With Coverage Data | 53% (8) | Changed lines the coverage tool could track. | +| ⚪ Lines Without Coverage Data | 47% (7) | Changed lines with no data: comments, blanks, declarations. | + +
🔍 Missed instructions (2) ` + "```" + ` --- category-search/src/main/java/com/tgt/CategorySearchApplication.java:52 System.out.print("Something"); --- category-search/src/main/kotlin/com/tgt/SomeOtherClass.kt:12 System.out.print("Something2"); -` + "```\n
", +` + "```" + ` +
+ +🤖 Generated by pull-request-code-coverage — coverage for changed lines only. +`, }) propGetter.AssertExpectations(t) @@ -414,16 +464,22 @@ Missed Instructions -> 12% (6) `, buf.String()) requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ - "body": `*Modules: category-search* + "body": `## 📊 Code Coverage — Changed Lines -Code Coverage Summary: +> Coverage is measured **only for the lines this PR changes**, not the whole file or repo. -Lines Without Coverage Data -> 47% (7) -Lines With Coverage Data -> 53% (8) -Covered Instructions -> **88%** (42) -Missed Instructions -> 12% (6) +*Modules: category-search* + +### 🟢 Covered Instructions: 88% (42) -
Missed Instructions summary +| Metric | Result | What it means | +| :-- | :-: | :-- | +| 🟢 **Covered Instructions** | **88%** (42) | Changed code your tests executed. Higher is better. | +| 🔴 **Missed Instructions** | 12% (6) | Changed code your tests never ran. Lower is better. | +| 📈 Lines With Coverage Data | 53% (8) | Changed lines the coverage tool could track. | +| ⚪ Lines Without Coverage Data | 47% (7) | Changed lines with no data: comments, blanks, declarations. | + +
🔍 Missed instructions (2) ` + "```" + ` --- category-search/src/main/java/com/tgt/CategorySearchApplication.java:52 @@ -431,7 +487,11 @@ Missed Instructions -> 12% (6) --- category-search/src/main/kotlin/com/tgt/SomeOtherClass.kt:12 System.out.print("Something2"); ` + - "```\n
", + "```" + ` +
+ +🤖 Generated by pull-request-code-coverage — coverage for changed lines only. +`, }) propGetter.AssertExpectations(t) From f25dc6ab28717724a90d2352b642c14c663ac6f4 Mon Sep 17 00:00:00 2001 From: Vishal Vaibhav Date: Thu, 21 May 2026 15:24:07 +0530 Subject: [PATCH 4/4] fix: align PR comment test URLs with /repos endpoint after master merge The master merge kept the old /api/v3/repos assertions while the merged github_pr.go posts to /repos; update the six body-test URLs to match. Co-Authored-By: Claude Opus 4.7 --- internal/plugin/runner_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/plugin/runner_test.go b/internal/plugin/runner_test.go index bba4a0a..e1f64f0 100644 --- a/internal/plugin/runner_test.go +++ b/internal/plugin/runner_test.go @@ -107,7 +107,7 @@ Covered Instructions -> 97% (177) Missed Instructions -> 3% (5) `, buf.String()) - requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ + requestAsserter.AssertRequestWasMade(t, "/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ "body": `## 📊 Code Coverage — Changed Lines > Coverage is measured **only for the lines this PR changes**, not the whole file or repo. @@ -188,7 +188,7 @@ Covered Instructions -> 97% (177) Missed Instructions -> 3% (5) `, buf.String()) - requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ + requestAsserter.AssertRequestWasMade(t, "/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ "body": `## 📊 Code Coverage — Changed Lines > Coverage is measured **only for the lines this PR changes**, not the whole file or repo. @@ -259,7 +259,7 @@ Covered Instructions -> 73% (8) Missed Instructions -> 27% (3) `, buf.String()) - requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ + requestAsserter.AssertRequestWasMade(t, "/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ "body": `## 📊 Code Coverage — Changed Lines > Coverage is measured **only for the lines this PR changes**, not the whole file or repo. @@ -325,7 +325,7 @@ Covered Instructions -> 73% (8) Missed Instructions -> 27% (3) `, buf.String()) - requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ + requestAsserter.AssertRequestWasMade(t, "/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ "body": `## 📊 Code Coverage — Changed Lines > Coverage is measured **only for the lines this PR changes**, not the whole file or repo. @@ -393,7 +393,7 @@ Covered Instructions -> 88% (42) Missed Instructions -> 12% (6) `, buf.String()) - requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ + requestAsserter.AssertRequestWasMade(t, "/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ "body": `## 📊 Code Coverage — Changed Lines > Coverage is measured **only for the lines this PR changes**, not the whole file or repo. @@ -463,7 +463,7 @@ Covered Instructions -> 88% (42) Missed Instructions -> 12% (6) `, buf.String()) - requestAsserter.AssertRequestWasMade(t, "/api/v3/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ + requestAsserter.AssertRequestWasMade(t, "/repos/some_org/some_repo/issues/123/comments", "SOME_API_KEY", map[string]interface{}{ "body": `## 📊 Code Coverage — Changed Lines > Coverage is measured **only for the lines this PR changes**, not the whole file or repo.