| 259 | |
| 260 | @dataclass |
| 261 | class PullRequest(Node): |
| 262 | baseRef: Optional[Ref] |
| 263 | baseRefName: str |
| 264 | body: str |
| 265 | closed: bool |
| 266 | headRef: Optional[Ref] |
| 267 | headRefName: str |
| 268 | # headRepository: Optional[Repository] |
| 269 | # maintainerCanModify: bool |
| 270 | number: GitHubNumber |
| 271 | _repository: GraphQLId # cycle breaker |
| 272 | # state: PullRequestState |
| 273 | title: str |
| 274 | url: str |
| 275 | reviewers: List[str] = dataclasses.field(default_factory=list) |
| 276 | labels: List[str] = dataclasses.field(default_factory=list) |
| 277 | |
| 278 | def repository(self, info: GraphQLResolveInfo) -> Repository: |
| 279 | return github_state(info).repositories[self._repository] |
| 280 | |
| 281 | |
| 282 | @dataclass |