Skip to content

Commit

Permalink
change names of pull request-related endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Gallo committed Dec 19, 2016
1 parent 92b5ee7 commit 0305e49
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 42 deletions.
24 changes: 12 additions & 12 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1299,26 +1299,26 @@ declare namespace Github {
sha?: string;
merge_method?: "merge"|"squash"|"rebase";
};
export type PullRequestsGetPullRequestReviewsParams =
export type PullRequestsGetReviewsParams =
& Owner
& Repo
& Number
& Page
& PerPage
;
export type PullRequestsGetPullRequestReviewParams =
export type PullRequestsGetReviewParams =
& Owner
& Number
& Id
;
export type PullRequestsGetPullRequestReviewsCommentsParams =
export type PullRequestsGetReviewsCommentsParams =
& Owner
& Number
& Id
& Page
& PerPage
;
export type PullRequestsCreatePullRequestReviewParams =
export type PullRequestsCreateReviewParams =
& Owner
& Repo
& Number
Expand All @@ -1329,7 +1329,7 @@ declare namespace Github {
path?: string;
position?: number;
};
export type PullRequestsSubmitPullRequestReviewParams =
export type PullRequestsSubmitReviewParams =
& Owner
& Repo
& Number
Expand All @@ -1338,7 +1338,7 @@ declare namespace Github {
body?: string[];
event?: "APPROVE"|"REQUEST_CHANGES"|"COMMENT"|"PENDING";
};
export type PullRequestsDismissPullRequestReviewParams =
export type PullRequestsDismissReviewParams =
& Owner
& Repo
& Number
Expand Down Expand Up @@ -2748,12 +2748,12 @@ declare class Github {
getFiles(params: Github.PullRequestsGetFilesParams, callback?: Github.Callback): Promise<any>;
checkMerged(params: Github.PullRequestsCheckMergedParams, callback?: Github.Callback): Promise<any>;
merge(params: Github.PullRequestsMergeParams, callback?: Github.Callback): Promise<any>;
getPullRequestReviews(params: Github.PullRequestsGetPullRequestReviewsParams, callback?: Github.Callback): Promise<any>;
getPullRequestReview(params: Github.PullRequestsGetPullRequestReviewParams, callback?: Github.Callback): Promise<any>;
getPullRequestReviewsComments(params: Github.PullRequestsGetPullRequestReviewsCommentsParams, callback?: Github.Callback): Promise<any>;
createPullRequestReview(params: Github.PullRequestsCreatePullRequestReviewParams, callback?: Github.Callback): Promise<any>;
submitPullRequestReview(params: Github.PullRequestsSubmitPullRequestReviewParams, callback?: Github.Callback): Promise<any>;
dismissPullRequestReview(params: Github.PullRequestsDismissPullRequestReviewParams, callback?: Github.Callback): Promise<any>;
getReviews(params: Github.PullRequestsGetReviewsParams, callback?: Github.Callback): Promise<any>;
getReview(params: Github.PullRequestsGetReviewParams, callback?: Github.Callback): Promise<any>;
getReviewsComments(params: Github.PullRequestsGetReviewsCommentsParams, callback?: Github.Callback): Promise<any>;
createReview(params: Github.PullRequestsCreateReviewParams, callback?: Github.Callback): Promise<any>;
submitReview(params: Github.PullRequestsSubmitReviewParams, callback?: Github.Callback): Promise<any>;
dismissReview(params: Github.PullRequestsDismissReviewParams, callback?: Github.Callback): Promise<any>;
getComments(params: Github.PullRequestsGetCommentsParams, callback?: Github.Callback): Promise<any>;
getCommentsForRepo(params: Github.PullRequestsGetCommentsForRepoParams, callback?: Github.Callback): Promise<any>;
getComment(params: Github.PullRequestsGetCommentParams, callback?: Github.Callback): Promise<any>;
Expand Down
24 changes: 12 additions & 12 deletions lib/index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -1294,26 +1294,26 @@ declare module "github" {
sha?: string;
merge_method?: "merge"|"squash"|"rebase";
};
declare type PullRequestsGetPullRequestReviewsParams =
declare type PullRequestsGetReviewsParams =
& Owner
& Repo
& Number
& Page
& PerPage
;
declare type PullRequestsGetPullRequestReviewParams =
declare type PullRequestsGetReviewParams =
& Owner
& Number
& Id
;
declare type PullRequestsGetPullRequestReviewsCommentsParams =
declare type PullRequestsGetReviewsCommentsParams =
& Owner
& Number
& Id
& Page
& PerPage
;
declare type PullRequestsCreatePullRequestReviewParams =
declare type PullRequestsCreateReviewParams =
& Owner
& Repo
& Number
Expand All @@ -1324,7 +1324,7 @@ declare module "github" {
path?: string;
position?: number;
};
declare type PullRequestsSubmitPullRequestReviewParams =
declare type PullRequestsSubmitReviewParams =
& Owner
& Repo
& Number
Expand All @@ -1333,7 +1333,7 @@ declare module "github" {
body?: string[];
event?: "APPROVE"|"REQUEST_CHANGES"|"COMMENT"|"PENDING";
};
declare type PullRequestsDismissPullRequestReviewParams =
declare type PullRequestsDismissReviewParams =
& Owner
& Repo
& Number
Expand Down Expand Up @@ -2733,12 +2733,12 @@ declare module "github" {
getFiles(params: PullRequestsGetFilesParams, callback?: Callback): Promise<any>;
checkMerged(params: PullRequestsCheckMergedParams, callback?: Callback): Promise<any>;
merge(params: PullRequestsMergeParams, callback?: Callback): Promise<any>;
getPullRequestReviews(params: PullRequestsGetPullRequestReviewsParams, callback?: Callback): Promise<any>;
getPullRequestReview(params: PullRequestsGetPullRequestReviewParams, callback?: Callback): Promise<any>;
getPullRequestReviewsComments(params: PullRequestsGetPullRequestReviewsCommentsParams, callback?: Callback): Promise<any>;
createPullRequestReview(params: PullRequestsCreatePullRequestReviewParams, callback?: Callback): Promise<any>;
submitPullRequestReview(params: PullRequestsSubmitPullRequestReviewParams, callback?: Callback): Promise<any>;
dismissPullRequestReview(params: PullRequestsDismissPullRequestReviewParams, callback?: Callback): Promise<any>;
getReviews(params: PullRequestsGetReviewsParams, callback?: Callback): Promise<any>;
getReview(params: PullRequestsGetReviewParams, callback?: Callback): Promise<any>;
getReviewsComments(params: PullRequestsGetReviewsCommentsParams, callback?: Callback): Promise<any>;
createReview(params: PullRequestsCreateReviewParams, callback?: Callback): Promise<any>;
submitReview(params: PullRequestsSubmitReviewParams, callback?: Callback): Promise<any>;
dismissReview(params: PullRequestsDismissReviewParams, callback?: Callback): Promise<any>;
getComments(params: PullRequestsGetCommentsParams, callback?: Callback): Promise<any>;
getCommentsForRepo(params: PullRequestsGetCommentsForRepoParams, callback?: Callback): Promise<any>;
getComment(params: PullRequestsGetCommentParams, callback?: Callback): Promise<any>;
Expand Down
12 changes: 6 additions & 6 deletions lib/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4001,7 +4001,7 @@
"description": "Merge a pull request (Merge Button)"
},

"get-pull-request-reviews": {
"get-reviews": {
"url": "/repos/:owner/:repo/pulls/:number/reviews",
"method": "GET",
"params": {
Expand All @@ -4014,7 +4014,7 @@
"description": "List reviews on a pull request."
},

"get-pull-request-review": {
"get-review": {
"url": "/repos/:owner/pulls/:number/reviews/:id",
"method": "GET",
"params": {
Expand All @@ -4025,7 +4025,7 @@
"description": "Get a single pull request review."
},

"get-pull-request-reviews-comments": {
"get-reviews-comments": {
"url": "/repos/:owner/pulls/:number/reviews/:id/comments",
"method": "GET",
"params": {
Expand All @@ -4038,7 +4038,7 @@
"description": "Get a single pull request reviews comments."
},

"create-pull-request-review": {
"create-review": {
"url": "/repos/:owner/:repo/pulls/:number/reviews",
"method": "POST",
"params": {
Expand Down Expand Up @@ -4086,7 +4086,7 @@
"description": "Create a pull request review."
},

"submit-pull-request-review": {
"submit-review": {
"url": "/repos/:owner/:repo/pulls/:number/reviews/:id/events",
"method": "POST",
"params": {
Expand Down Expand Up @@ -4114,7 +4114,7 @@
"description": "Submit a pull request review."
},

"dismiss-pull-request-review": {
"dismiss-review": {
"url": "/repos/:owner/:repo/pulls/:number/reviews/:id/dismissals",
"method": "GET",
"params": {
Expand Down
24 changes: 12 additions & 12 deletions test/pullRequestsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ describe("[pullRequests]", function() {
);
});

it("should successfully execute POST /repos/:owner/:repo/pulls/:number/reviews (createPullRequestReview)", function(next) {
client.pullRequests.createPullRequestReview(
it("should successfully execute POST /repos/:owner/:repo/pulls/:number/reviews (createReview)", function(next) {
client.pullRequests.createReview(
{
owner: "String",
repo: "String",
Expand Down Expand Up @@ -148,8 +148,8 @@ describe("[pullRequests]", function() {
);
});

it("should successfully execute GET /repos/:owner/:repo/pulls/:number/reviews/:id/dismissals (dismissPullRequestReview)", function(next) {
client.pullRequests.dismissPullRequestReview(
it("should successfully execute GET /repos/:owner/:repo/pulls/:number/reviews/:id/dismissals (dismissReview)", function(next) {
client.pullRequests.dismissReview(
{
owner: "String",
repo: "String",
Expand Down Expand Up @@ -304,8 +304,8 @@ describe("[pullRequests]", function() {
);
});

it("should successfully execute GET /repos/:owner/pulls/:number/reviews/:id (getPullRequestReview)", function(next) {
client.pullRequests.getPullRequestReview(
it("should successfully execute GET /repos/:owner/pulls/:number/reviews/:id (getReview)", function(next) {
client.pullRequests.getReview(
{
owner: "String",
number: "Number",
Expand All @@ -319,8 +319,8 @@ describe("[pullRequests]", function() {
);
});

it("should successfully execute GET /repos/:owner/:repo/pulls/:number/reviews (getPullRequestReviews)", function(next) {
client.pullRequests.getPullRequestReviews(
it("should successfully execute GET /repos/:owner/:repo/pulls/:number/reviews (getReviews)", function(next) {
client.pullRequests.getReviews(
{
owner: "String",
repo: "String",
Expand All @@ -336,8 +336,8 @@ describe("[pullRequests]", function() {
);
});

it("should successfully execute GET /repos/:owner/pulls/:number/reviews/:id/comments (getPullRequestReviewsComments)", function(next) {
client.pullRequests.getPullRequestReviewsComments(
it("should successfully execute GET /repos/:owner/pulls/:number/reviews/:id/comments (getReviewsComments)", function(next) {
client.pullRequests.getReviewsComments(
{
owner: "String",
number: "Number",
Expand Down Expand Up @@ -372,8 +372,8 @@ describe("[pullRequests]", function() {
);
});

it("should successfully execute POST /repos/:owner/:repo/pulls/:number/reviews/:id/events (submitPullRequestReview)", function(next) {
client.pullRequests.submitPullRequestReview(
it("should successfully execute POST /repos/:owner/:repo/pulls/:number/reviews/:id/events (submitReview)", function(next) {
client.pullRequests.submitReview(
{
owner: "String",
repo: "String",
Expand Down

0 comments on commit 0305e49

Please sign in to comment.