This repository was archived by the owner on Jun 22, 2026. It is now read-only.
Fix bugs, improve code quality, upgrade go-github to v74#7
Merged
Conversation
- fix missing return after close(channel) in comment loop goroutine (would panic) - fix missing slash in githubBaseURL producing malformed run URLs - deduplicate isApproved/isDenied into single matchesWordList function - use strings.Join for readable approver formatting in issue bodies - use slices.Contains from stdlib instead of hand-rolled approversIndex - consolidate minimumApprovals parsing into retrieveApprovers (was parsed twice) - surface team-fetch errors in expandGroupFromUser instead of swallowing them - upgrade go-github from v61 to v74 Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
returnstatements afterclose(channel)innewCommentLoopChannel— without these, the goroutine continues looping and panics on the next send/close of the already-closed channel/togithubBaseURLso issue links resolve correctly (https://github.com/owner/repo/...instead ofhttps://github.comowner/repo/...)isApproved/isDenied: Consolidated into a singlematchesWordList(body, words)function, removing ~20 lines of duplicated logicstrings.Join: Replacesfmt.Sprintf("%s", slice)for human-readable approver lists in issue bodiesslices.Contains: Replaces hand-rolledapproversIndexwith stdlib (Go 1.21+)minimumApprovalsparsing: Was parsed in bothretrieveApproversandmain(); now parsed and validated once inretrieveApproverswhich returns the valueexpandGroupFromUsernow returns errors, distinguishing 404 (not a team) from real failures (auth, rate limit, network)Test plan
go build ./...compiles cleanlygo test -v ./...— all 41 tests passMade with Cursor