Files
Julien Lengrand-Lambert 3cdf8826eb Adding flyio
2024-03-07 10:52:37 +01:00

265 lines
7.8 KiB
HTTP

## PullsApi
### Check if a pull request has been merged
## Check if a pull request has been merged
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/merge
Authorization: Bearer {{bearerToken}}
### Create a pull request
## Create a pull request
POST https://api.github.com/repos/{{owner}}/{{repo}}/pulls
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"title" : "Amazing new feature",
"body" : "Please pull these awesome changes in!",
"head" : "octocat:new-feature",
"base" : "master"
}
### Create a reply for a review comment
## Create a reply for a review comment
POST https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/comments/{{comment_id}}/replies
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"body" : "Great stuff!"
}
### Create a review for a pull request
## Create a review for a pull request
POST https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/reviews
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"commit_id" : "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091",
"body" : "This is close to perfect! Please address the suggested inline change.",
"event" : "REQUEST_CHANGES",
"comments" : [ {
"path" : "file.md",
"position" : 6,
"body" : "Please add more information here, and fix this typo."
} ]
}
### Create a review comment for a pull request
## Create a review comment for a pull request
POST https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/comments
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"body" : "Great stuff!",
"commit_id" : "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"path" : "file1.txt",
"start_line" : 1,
"start_side" : "RIGHT",
"line" : 2,
"side" : "RIGHT"
}
### Delete a pending review for a pull request
## Delete a pending review for a pull request
DELETE https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/reviews/{{review_id}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Delete a review comment for a pull request
## Delete a review comment for a pull request
DELETE https://api.github.com/repos/{{owner}}/{{repo}}/pulls/comments/{{comment_id}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Dismiss a review for a pull request
## Dismiss a review for a pull request
PUT https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/reviews/{{review_id}}/dismissals
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"message" : "You are dismissed",
"event" : "DISMISS"
}
### Get a pull request
## Get a pull request
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Get a review for a pull request
## Get a review for a pull request
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/reviews/{{review_id}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Get a review comment for a pull request
## Get a review comment for a pull request
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/comments/{{comment_id}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List pull requests
## List pull requests
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List comments for a pull request review
## List comments for a pull request review
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/reviews/{{review_id}}/comments
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List commits on a pull request
## List commits on a pull request
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/commits
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List pull requests files
## List pull requests files
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/files
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Get all requested reviewers for a pull request
## Get all requested reviewers for a pull request
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/requested_reviewers
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List review comments on a pull request
## List review comments on a pull request
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/comments
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List review comments in a repository
## List review comments in a repository
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/comments
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List reviews for a pull request
## List reviews for a pull request
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/reviews
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Merge a pull request
## Merge a pull request
PUT https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/merge
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"commit_title" : "Expand enum",
"commit_message" : "Add a new value to the merge_method enum"
}
### Remove requested reviewers from a pull request
## Remove requested reviewers from a pull request
DELETE https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/requested_reviewers
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"reviewers" : [ "octocat", "hubot", "other_user" ],
"team_reviewers" : [ "justice-league" ]
}
### Request reviewers for a pull request
## Request reviewers for a pull request
POST https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/requested_reviewers
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"reviewers" : [ "octocat", "hubot", "other_user" ],
"team_reviewers" : [ "justice-league" ]
}
### Submit a review for a pull request
## Submit a review for a pull request
POST https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/reviews/{{review_id}}/events
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"body" : "Here is the body for the review.",
"event" : "REQUEST_CHANGES"
}
### Update a pull request
## Update a pull request
PATCH https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"title" : "new title",
"body" : "updated body",
"state" : "open",
"base" : "master"
}
### Update a pull request branch
## Update a pull request branch
PUT https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/update-branch
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"expected_head_sha" : "6dcb09b5b57875f334f61aebed695e2e4193db5e"
}
### Update a review for a pull request
## Update a review for a pull request
PUT https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/reviews/{{review_id}}
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"body" : "This is close to perfect! Please address the suggested inline change. And add more about this."
}
### Update a review comment for a pull request
## Update a review comment for a pull request
PATCH https://api.github.com/repos/{{owner}}/{{repo}}/pulls/comments/{{comment_id}}
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"body" : "I like this too!"
}