Description
Add a new config option required-conversation-resolution that, when enabled, fails the can-be-merged check if the PR has unresolved review threads.
GitHub's REST API doesn't expose thread resolution status — only the GraphQL API v4 has reviewThreads { isResolved }. The codebase already has httpx as a dependency, so we'll use it for the GraphQL call.
Requirements
- New
required-conversation-resolution boolean config at global + repository level in schema
- GraphQL helper method
get_unresolved_review_threads() on GithubWebhook class
- Integration into
check_if_can_be_merged() in PullRequestHandler
- Threads that are resolved or outdated are excluded
- Failure message shows file:line for up to 5 unresolved threads
Deliverables
Description
Add a new config option
required-conversation-resolutionthat, when enabled, fails thecan-be-mergedcheck if the PR has unresolved review threads.GitHub's REST API doesn't expose thread resolution status — only the GraphQL API v4 has
reviewThreads { isResolved }. The codebase already hashttpxas a dependency, so we'll use it for the GraphQL call.Requirements
required-conversation-resolutionboolean config at global + repository level in schemaget_unresolved_review_threads()onGithubWebhookclasscheck_if_can_be_merged()inPullRequestHandlerDeliverables
required-conversation-resolutiontoschema.yaml(global + repo level)github_api.py_repo_data_from_config()get_unresolved_review_threads()GraphQL method toGithubWebhookcheck_if_can_be_merged()(parallel with existing gather)test_schema_validator.pyandtest_config_schema.pyexamples/config.yamlandexamples/.github-webhook-server.yaml