fix: define constant for duplicated GQL client error string (go:S1192) - #138
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Replace 4 occurrences of duplicated string literal "failed to get GitHub GQL client: %v" with a package-level constant errFailedToGetGQLClient. Resolves SonarQube issue AZhX1hJ3UiHWiWeaJF-T (go:S1192). Co-Authored-By: parker.duff@codeium.com <pwjduff@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
The SonarCloud Quality Gate failure is due to 7 pre-existing These are MINOR-severity issues unrelated to the |




Closes: SonarQube issue
AZhX1hJ3UiHWiWeaJF-T(rulego:S1192)Summary
Defines a package-level constant
errFailedToGetGQLClientfor the string literal"failed to get GitHub GQL client: %v"which was duplicated 4 times across the discussion handler functions inpkg/github/discussions.go.This is a pure refactor with no behavioral change — the formatted error messages remain identical at runtime.
Changes
errFailedToGetGQLClientat the top ofdiscussions.goListDiscussions,GetDiscussion,GetDiscussionComments, andListDiscussionCategoriesHuman Review Checklist
erras the format arg — no change in error formatting behaviorLink to Devin session: https://app.devin.ai/sessions/a45f9eeb845a4e87b5d03ed42e1b90f7
Requested by: @parkerduff