Remove `"COMMENT"` as the default event for `create_review` (#3078)
Fixes a discrepancy between PyGithub for creating a pull request review, compared to the Github API. When using the REST API, not specifying an `event` defaults to using `PENDING` mode, which creates a review and automatically adds the user as a reviewer. In the current PyGithub implementation, if no `event` parameter is given, it defaults to `COMMENT`, which does not add the user as a reviewer. It is not possible to use `event="PENDING"` via the API, it's just the default Github creates server side when `event` is sent empty. https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#create-a-review-for-a-pull-request **Relevant section pasted below:** `event` string The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. **By leaving this blank, you set the review action state to `PENDING`**, which means you will need to [submit the pull request review](https://docs.github.com/rest/pulls/reviews#submit-a-review-for-a-pull-request) when you are ready. Can be one of: APPROVE, REQUEST_CHANGES, COMMENT **<- note `PENDING` can't be selected directly, only indirectly by leaving `event` blank, and thus setting the default to `COMMENT` in PyGithub this incorrectly blocks this** --------- Co-authored-by: Enrico Minack <github@enrico.minack.dev>
E
Eddie Santos committed
8494da5c129187abde723f3cc1dff632667e2266
Parent: fb51957
Committed by GitHub <noreply@github.com>
on 8/25/2025, 4:16:08 PM