Skip to content

[dead-code] chore: remove dead functions — 2 functions removed - #54023

Merged
pelikhan merged 1 commit into
mainfrom
chore/remove-dead-code-32263130905-ad696f46615dceba
Aug 19, 2026
Merged

[dead-code] chore: remove dead functions — 2 functions removed#54023
pelikhan merged 1 commit into
mainfrom
chore/remove-dead-code-32263130905-ad696f46615dceba

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

test> Generated by PR Description Updater for #54023 · auto · 32 AIC · ⌖ 4.22 AIC · ⊞ 7.6K ·

Remove 2 unreachable functions identified by deadcode analyzer:
- FormatLogEntry (pkg/cli/log_entry.go)
- IsKnownGitHubWebhookEvent (pkg/workflow/github_app_requirements.go)
Also removes their exclusive test-only callers.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review August 19, 2026 22:50
CopilotAI balanced review requested due to automatic review settings August 19, 2026 22:50
@pelikhan
pelikhan merged commit bcfa1ac into mainAug 19, 2026
@pelikhan
pelikhan deleted the chore/remove-dead-code-32263130905-ad696f46615dceba branch August 19, 2026 22:50
@github-actions

github-actionsBot commented Aug 19, 2026

Copy link
Copy Markdown
ContributorAuthor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actionsBot commented Aug 19, 2026

Copy link
Copy Markdown
ContributorAuthor

Ponytail Reviewer completed successfully!

Lean already. Ship.

Generated by Ponytail Reviewer for #54023

@github-actions

github-actionsBot commented Aug 19, 2026

Copy link
Copy Markdown
ContributorAuthor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR does not have the 'implementation' label and has 0 new lines of code in business logic directories (threshold: 100).

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actionsBot commented Aug 19, 2026

Copy link
Copy Markdown
ContributorAuthor

PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actionsBot commented Aug 19, 2026

Copy link
Copy Markdown
ContributorAuthor

Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff

🧪 Test quality analysis by Test Quality Sentinel

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean removal of two unused exported functions (FormatLogEntry and IsKnownGitHubWebhookEvent) along with their tests and the now-unused fmt import. No issues found.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 15.1 AIC · ⌖ 8.75 AIC · ⊞ 5.7K

@github-actions

Copy link
Copy Markdown
ContributorAuthor

Comment Memory

reviewed_at: 2026-08-19T22:56:00Z
review_event: COMMENT
top_themes:
- dead-code removal only; no changed-line correctness issues found
- no duplicate actionable review comments warranted
files_reviewed:
- pkg/cli/log_entry.go
- pkg/cli/log_entry_test.go
- pkg/workflow/github_app_requirements.go
- pkg/workflow/github_app_requirements_test.go
comment_count: 0

Note

This comment is managed by comment memory.

It stores persistent context for this thread in the code block at the top of this comment.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · gpt54 · 4.2 AIC · ⌖ 6.86 AIC · ⊞ 7K ·
Comment /review to run again

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /codebase-design — this is a clean dead-code removal. No issues found; approving.

📋 Review Summary

What was removed

  • FormatLogEntry (pkg/cli/log_entry.go) — exported wrapper with no callers; its test TestFormatLogEntryIsGenericAcrossSources exercised the wrapper's formatting behaviour (which is fully covered by the underlying LogEntry interface accessor tests that remain).
  • IsKnownGitHubWebhookEvent (pkg/workflow/github_app_requirements.go) — thin exported shim over the unexported isKnownGitHubEvent; removing the public surface is the right call since no callers existed.

Positive Highlights

  • ✅ Both removals are verified dead (no references anywhere in the codebase)
  • ✅ Unused "fmt" import correctly cleaned up alongside the function removal
  • ✅ PR description documents skipped candidates with clear rationale — good discipline
  • ✅ Verification checklist (build, vet, fmt, tests) is thorough and honest about pre-existing failures

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 17 AIC · ⌖ 9.85 AIC · ⊞ 7.8K
Comment /matt to run again

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues in the changed lines. This PR only removes two apparently unused wrappers and their direct tests, and I did not find a correctness, performance, or maintainability regression introduced by the deletion set.

Review notes
  • FormatLogEntry removal is consistent with the remaining code in pkg/cli/log_entry.go; the interface and per-type accessors still compile as the only generic surface left in this diff.
  • IsKnownGitHubWebhookEvent removal also looks safe within the changed lines because NormalizeGitHubAppWebhookEvents already calls the unexported helper directly and there are no in-repo call sites to the exported wrapper in this branch.
  • I did not see a changed-line gap that merits a blocking comment.

🔎 Code quality review by PR Code Quality Reviewer · gpt54 · 4.2 AIC · ⌖ 6.86 AIC · ⊞ 7K
Comment /review to run again

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes two unused helper functions and their dedicated tests.

Changes:

  • Removes FormatLogEntry and its test.
  • Removes IsKnownGitHubWebhookEvent and its test.
Show a summary per file
FileDescription
pkg/cli/log_entry.goRemoves generic log formatter.
pkg/cli/log_entry_test.goRemoves formatter coverage.
pkg/workflow/github_app_requirements.goRemoves webhook-event wrapper.
pkg/workflow/github_app_requirements_test.goRemoves wrapper coverage.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment threadpkg/cli/log_entry.go
@@ -1,7 +1,6 @@
package cli

import (
@github-actions

Copy link
Copy Markdown
ContributorAuthor

🎉 This pull request is included in a new release.

Release: v0.87.2

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pelikhan