Skip to content

Commit

Permalink
Clarify issue comments and review comments on pull requests (issue #59)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquev6 committed Sep 8, 2012
1 parent 20092a0 commit 82b7322
Show file tree
Hide file tree
Showing 9 changed files with 319 additions and 12 deletions.
Expand Up @@ -1315,6 +1315,49 @@
]
}
},
{
"name": "issue_comments",
"singularName": "issue_comment",
"type": "IssueComment",
"getList": {
"request": {
"url": [
{ "type": "parentUrl", "value": [ { "type": "parentUrl", "value": [ { "type": "attribute", "value": [ "url" ] } ] } ] },
{ "type": "constant", "value": "/issues/" },
{ "type": "stringOf", "value": [ { "type": "attribute", "value": [ "number" ] } ] },
{ "type": "constant", "value": "/comments" }
]
}
},
"getElement": {
"parameter": { "name": "id", "type": "integer" },
"request": {
"url": [
{ "type": "parentUrl", "value": [ { "type": "parentUrl", "value": [ { "type": "attribute", "value": [ "url" ] } ] } ] },
{ "type": "constant", "value": "/issues/comments/" },
{
"type": "stringOf",
"value": [
{ "type": "argument", "value": [ "id" ] }
]
}
]
}
},
"createElement": {
"mandatoryParameters": [
{ "name": "body", "type": "string" }
],
"request": {
"url": [
{ "type": "parentUrl", "value": [ { "type": "parentUrl", "value": [ { "type": "attribute", "value": [ "url" ] } ] } ] },
{ "type": "constant", "value": "/issues/" },
{ "type": "stringOf", "value": [ { "type": "attribute", "value": [ "number" ] } ] },
{ "type": "constant", "value": "/comments" }
]
}
}
},
{
"name": "commits",
"singularName": "commit",
Expand Down
183 changes: 183 additions & 0 deletions codegen/JsonDescriptionOfGithubApiV3/description.normalized.json
Expand Up @@ -7650,6 +7650,189 @@
"name": "PullRequestComment"
}
},
{
"group": "issue_comments",
"name": [
"create",
"issue_comment"
],
"mandatoryParameters": [
{
"type": {
"simple": true,
"cardinality": "scalar",
"name": "string"
},
"name": "body"
}
],
"request": {
"url": [
{
"type": "parentUrl",
"value": [
{
"type": "parentUrl",
"value": [
{
"type": "attribute",
"value": [
"url"
]
}
]
}
]
},
{
"type": "constant",
"value": "/issues/"
},
{
"type": "stringOf",
"value": [
{
"type": "attribute",
"value": [
"number"
]
}
]
},
{
"type": "constant",
"value": "/comments"
}
],
"information": "status",
"verb": "POST",
"postParameters": true
},
"isMutation": false,
"optionalParameters": [],
"type": {
"simple": false,
"cardinality": "scalar",
"name": "IssueComment"
}
},
{
"group": "issue_comments",
"name": [
"get",
"issue_comment"
],
"mandatoryParameters": [
{
"type": {
"simple": true,
"cardinality": "scalar",
"name": "integer"
},
"name": "id"
}
],
"request": {
"url": [
{
"type": "parentUrl",
"value": [
{
"type": "parentUrl",
"value": [
{
"type": "attribute",
"value": [
"url"
]
}
]
}
]
},
{
"type": "constant",
"value": "/issues/comments/"
},
{
"type": "stringOf",
"value": [
{
"type": "argument",
"value": [
"id"
]
}
]
}
],
"information": "data",
"verb": "GET"
},
"isMutation": false,
"optionalParameters": [],
"type": {
"simple": false,
"cardinality": "scalar",
"name": "IssueComment"
}
},
{
"group": "issue_comments",
"name": [
"get",
"issue_comments"
],
"mandatoryParameters": [],
"request": {
"url": [
{
"type": "parentUrl",
"value": [
{
"type": "parentUrl",
"value": [
{
"type": "attribute",
"value": [
"url"
]
}
]
}
]
},
{
"type": "constant",
"value": "/issues/"
},
{
"type": "stringOf",
"value": [
{
"type": "attribute",
"value": [
"number"
]
}
]
},
{
"type": "constant",
"value": "/comments"
}
],
"information": "data",
"verb": "GET"
},
"isMutation": false,
"optionalParameters": [],
"type": {
"simple": false,
"cardinality": "list",
"name": "IssueComment"
}
},
{
"group": "commits",
"name": [
Expand Down
12 changes: 6 additions & 6 deletions doc/ReferenceOfApis.md
Expand Up @@ -287,8 +287,8 @@ API `/repos/:user/:repo/issues/:number`

API `/repos/:user/:repo/issues/:number/comments`
================================================
* GET: `Issue.get_comments`
* POST: `Issue.create_comment`
* GET: `Issue.get_comments` or `PullRequest.get_issue_comments`
* POST: `Issue.create_comment` or `PullRequest.create_issue_comment`

API `/repos/:user/:repo/issues/:number/events`
==============================================
Expand All @@ -307,7 +307,7 @@ API `/repos/:user/:repo/issues/:number/labels/:name`

API `/repos/:user/:repo/issues/comments/:id`
============================================
* GET: `Issue.get_comment`
* GET: `Issue.get_comment` or `PullRequest.get_issue_comment`
* PATCH: `IssueComment.edit`
* DELETE: `IssueComment.delete`

Expand Down Expand Up @@ -376,8 +376,8 @@ API `/repos/:user/:repo/pulls/:number`

API `/repos/:user/:repo/pulls/:number/comments`
===============================================
* GET: `PullRequest.get_comments`
* POST: `PullRequest.create_comment`
* GET: `PullRequest.get_comments` or `PullRequest.get_review_comments`
* POST: `PullRequest.create_comment` or `PullRequest.create_review_comment`

API `/repos/:user/:repo/pulls/:number/commits`
==============================================
Expand All @@ -394,7 +394,7 @@ API `/repos/:user/:repo/pulls/:number/merge`

API `/repos/:user/:repo/pulls/comments/:number`
===============================================
* GET: `PullRequest.get_comment`
* GET: `PullRequest.get_comment` or `PullRequest.get_review_comment`
* PATCH: `PullRequestComment.edit`
* DELETE: `PullRequestComment.delete`

Expand Down
18 changes: 13 additions & 5 deletions doc/ReferenceOfClasses.md
Expand Up @@ -1025,16 +1025,16 @@ Attributes
* `url`: string
* `user`: `NamedUser`

Comments
--------
* `create_comment( body, commit_id, path, position )`: `PullRequestComment`
Review comments
---------------
* `create_comment( body, commit_id, path, position )` or `create_review_comment( body, commit_id, path, position )`: `PullRequestComment`
* `body`: string
* `commit_id`: `Commit`
* `path`: string
* `position`: integer
* `get_comment( id )`: `PullRequestComment`
* `get_comment( id )` or `get_review_comment( id )`: `PullRequestComment`
* `id`: integer
* `get_comments()`: iterator of `PullRequestComment`
* `get_comments()` or `get_review_comments()`: iterator of `PullRequestComment`

Commits
-------
Expand All @@ -1044,6 +1044,14 @@ Files
-----
* `get_files()`: iterator of `File`

Issue_comments
--------------
* `create_issue_comment( body )`: `IssueComment`
* `body`: string
* `get_issue_comment( id )`: `IssueComment`
* `id`: integer
* `get_issue_comments()`: iterator of `IssueComment`

Merging
-------
* `is_merged()`: bool
Expand Down

0 comments on commit 82b7322

Please sign in to comment.