Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Get approval status of the pr#1148

Answeredbyoffbyone
thatdevin asked this question inQ&A
Discussion options

Hi there, I currently use the cool package and I am wondering how f there is an API that I could use to get the approval status of a specific PR?

BR,
Yue

You must be logged in to vote

Yep:

repo=g.repository(owner,repo)pr=repo.pull_request(PR_NUMBER_AS_STRING)states= [r.stateforrinpr.reviews()]

That gets the review statuses.

pr.mergeable andpr.mergeable_state tell you if the PR is able to merge.

Checks are the other approving concept and you can get at those using the commits on the PR:

most_recent_commit=list(pr.commits())[-1]runs=list(most_recent_commit.check_runs())statuses= [r.statusforrinruns]

Replies: 1 comment

Comment options

Yep:

repo=g.repository(owner,repo)pr=repo.pull_request(PR_NUMBER_AS_STRING)states= [r.stateforrinpr.reviews()]

That gets the review statuses.

pr.mergeable andpr.mergeable_state tell you if the PR is able to merge.

Checks are the other approving concept and you can get at those using the commits on the PR:

most_recent_commit=list(pr.commits())[-1]runs=list(most_recent_commit.check_runs())statuses= [r.statusforrinruns]
You must be logged in to vote
0 replies
Answer selected bysigmavirus24
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@thatdevin@offbyone
Converted from issue

This discussion was converted from issue #1133 on April 26, 2023 00:37.


[8]ページ先頭

©2009-2025 Movatter.jp