Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Github Reviews #88

Open
g1y opened this issue Aug 9, 2017 · 1 comment
Open

Support Github Reviews #88

g1y opened this issue Aug 9, 2017 · 1 comment

Comments

@g1y
Copy link
Contributor

g1y commented Aug 9, 2017

Problem:

Github reviews are a nice, but the approve or disapprove is not supported as a block or a CR.

Do this:

  • Make an approve count as a CR.
  • make request changes count as a dev_block.

Before this can happen, the api wrapper needs to be updated to a version that supports reviews.

@jordycosta
Copy link
Member

jordycosta commented May 24, 2023

Looking a bit into this
https://docs.github.com/en/rest/pulls/reviews


Example GET Request:

https://api.github.com/repos/iFixit/ifixit/pulls/48059/reviews

[
    {
        "id": 1440710547,
        "node_id": "PRR_kwDOACywbc5V33-T",
        "user": {
            "login": "djmetzle",
            "id": 6876047,
            "node_id": "MDQ6VXNlcjY4NzYwNDc=",
            "avatar_url": "https://avatars.githubusercontent.com/u/6876047?u=901202f561c642f2f42eb93b7a1ea59a930ae3b2&v=4",
            "gravatar_id": "",
            "url": "https://api.github.com/users/djmetzle",
            "html_url": "https://github.com/djmetzle",
            "followers_url": "https://api.github.com/users/djmetzle/followers",
            "following_url": "https://api.github.com/users/djmetzle/following{/other_user}",
            "gists_url": "https://api.github.com/users/djmetzle/gists{/gist_id}",
            "starred_url": "https://api.github.com/users/djmetzle/starred{/owner}{/repo}",
            "subscriptions_url": "https://api.github.com/users/djmetzle/subscriptions",
            "organizations_url": "https://api.github.com/users/djmetzle/orgs",
            "repos_url": "https://api.github.com/users/djmetzle/repos",
            "events_url": "https://api.github.com/users/djmetzle/events{/privacy}",
            "received_events_url": "https://api.github.com/users/djmetzle/received_events",
            "type": "User",
            "site_admin": false
        },
        "body": "Nice! CR :robot: ",
        "state": "APPROVED",
        "html_url": "https://github.com/iFixit/ifixit/pull/48059#pullrequestreview-1440710547",
        "pull_request_url": "https://api.github.com/repos/iFixit/ifixit/pulls/48059",
        "author_association": "CONTRIBUTOR",
        "_links": {
            "html": {
                "href": "https://github.com/iFixit/ifixit/pull/48059#pullrequestreview-1440710547"
            },
            "pull_request": {
                "href": "https://api.github.com/repos/iFixit/ifixit/pulls/48059"
            }
        },
        "submitted_at": "2023-05-23T23:29:37Z",
        "commit_id": "152f9310ac06dcb4316ef0fa56d576e7e614f169"
    }
]

Looks like we can use the reviews.state property value
CHANGES_REQUESTED or APPROVED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants