branch_prs
Actor
¶
PullRequest
¶
Bases: CamelModel
A repository pull request.
Attributes:
Name | Type | Description |
---|---|---|
closed |
bool
|
... |
title |
str
|
... |
number |
int
|
... |
base_ref_name |
str
|
... |
mergeable |
MergeableState
|
... |
merged |
bool
|
... |
author |
Actor
|
... |
latest_reviews |
WithNodes[PullRequestReview]
|
... |
url |
str
|
... |
Source code in m/github/graphql/queries/branch_prs.py
PullRequestReview
¶
Bases: BaseModel
A review object for a given pull request.
Attributes:
Name | Type | Description |
---|---|---|
author |
Actor
|
... |
body |
str
|
... |
state |
PullRequestReviewState
|
... |
Source code in m/github/graphql/queries/branch_prs.py
fetch(token, owner, repo, branch)
¶
Retrieve the pr information for the specified branch.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
token |
str
|
A Github PAT. |
required |
owner |
str
|
The owner of the repo. |
required |
repo |
str
|
The name of the repo. |
required |
branch |
str
|
Name of the branch. |
required |
Returns:
Type | Description |
---|---|
OneOf[Issue, list[PullRequest]]
|
A list of pull requests connected to the branch or an issue. |