Skip to content

Conversation

@soutar
Copy link

@soutar soutar commented Nov 6, 2025

Fixes a nil pointer panic when creating/updating GitHub PR comments (see #405). The crash came from the PR adapter converting PullRequestListOptionsListOptions and dereferencing a nil options value.

Rather than band-aid with a nil check, I removed the conversion entirely and now pass *github.ListOptions straight through to go-github. That endpoint only supports pagination anyway, so accepting PullRequestListOptions implied filters (state/head/base) that were never used.

Net result: no behavioural change for callers (passing nil is fine; go-github tolerates it), clearer API (pagination only), and no more nil-deref in the adapter.

@soutar soutar force-pushed the github-comment-panic branch 2 times, most recently from b519a79 to e5dce1f Compare November 6, 2025 10:57
@soutar soutar force-pushed the github-comment-panic branch from e5dce1f to 57b44d0 Compare November 6, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant