SIGN IN SIGN UP

Allow SHAs when creating PR comments (#3248)

Existing code requires a `Commit` to be passed into
`PullRequest.create_review_comment` even though it only uses the SHA.
Given an existing `PullRequest`, to pass a `Commit`, one would need to
make another round trip via `Repository.get_commit(sha=sha)` just to
pass in the larger object.

This may need additional tests / work, but I was hoping to gauge
interest in the idea before completing the rest. Thanks :)

Edit: I see we're also doing `def remove_from_labels(self, label:
github.Label.Label | str)` elsewhere where we can pass both. That's what
I originally did before moving to this pattern. Let me know which you
would prefer.

---------

Co-authored-by: Enrico Minack <github@enrico.minack.dev>
M
Matt Tuchfarber committed
95a6d4001b1d2c6ad81d1255fdde1acbdbc82245
Parent: b4092b5
Committed by GitHub <noreply@github.com> on 7/17/2025, 7:47:24 PM