julien Lengrand-Lambert f1fcceb375
Major Jetbrains HTTP Client upgrade. Move to BETA (#15779)
* Add notes to requests for better readability

* Adds extra configs for jetbrains http client for testing

* Adding new sample data

* Changes

* Setting up test infrastructure

* Adds body to requests.

* Fixing some bugs in map traversal

It'd be much better to use a proper library for this though

* Adding secret file to gitignore

* Adds github spec, for complex example.

Add null check to avoid errors in example extraction

* Add support for custom variables in request body

* Add support for all basic Auth headers

* Not sure whaet happened with my api mustache file

* Add support for custom headers

* Fixes empty lines issue

* Adds support for Accept header

* Adding many tests, deleting experiment files

* Updates generator doc

* Completes README file with extra information

* Runs generate-samples and export docs

* Running sample generation

* Adding missing files to samples

* Removing forgotten stdout statements

* Ignore one test making the docker image generation fail
2024-03-09 16:56:26 +08:00

238 lines
6.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
### Create a pull request
## Create a pull request
POST https://api.github.com/repos/{{owner}}/{{repo}}/pulls
Content-Type: application/json
Accept: application/json
{
"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
{
"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
{
"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
{
"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
### 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
### 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
{
"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
### 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
### 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
### List pull requests
## List pull requests
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls
Accept: application/json
### 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
### 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
### List pull requests files
## List pull requests files
GET https://api.github.com/repos/{{owner}}/{{repo}}/pulls/{{pull_number}}/files
Accept: application/json
### 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
### 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
### 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
### 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
### 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
{
"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
{
"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
{
"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
{
"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
{
"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
{
"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
{
"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
{
"body" : "I like this too!"
}