In V3 of the GitHub API, pull request comments are created in two ways. The
first way is to create a comment on a specific line of a file in a commit
with the following parameters:
| Name | Type | Description |
|-----------|---------|--------------------------------------------------------|
| body | string | Required. The text of the comment |
| commit_id | string | Required. The SHA of the commit to comment on. |
| path | string | Required. The relative path of the file to comment on. |
| position | integer | Required. The line index in the diff to comment on. |
And the second way is through a reply to an existing comment with the following
parameters:
| Name | Type | Description |
|-------------|---------|---------------------------------------|
| body | string | Required. The text of the comment |
| in_reply_to | integer | Required. The comment id to reply to. |
This commit adds support for the second (or "Alternative Input" according to
the GitHub docs) way.
Rate is now a method, not a field.
Mention RateLimits rather than RateLimit since the latter is deprecated.
Use Go convention for marking deprecated identifiers. See
257114af91.
For more information about the preview see here:
https://developer.github.com/changes/2015-11-11-protected-branches-api/
This adds only retrieving the information and not setting it. Setting
will come in a later commit (if that one here is okay).
I tried to follow the naming guidelines as much as possible and
hopefully I made it right the first time. :-)
Add a new error type, TwoFactorAuthError, which identifies the need to
include a one-time password when using Basic Auth for a user with
two-factor auth enabled.
An example of using both the new transport and error type can be seen in
examples/basicauth/main.go.
fixes#258
API URLs starting with "/" does not play well with Github Enterprise,
whose API endpoint looks like "http(s)://hostname/api/v3/".
This fixes incorrect URLs in miletones APIs.
This change adds the fields "DiffHunk", "OriginalPosition", and "OriginalCommitId" to the PullRequestComment struct. These fields provide important information about the location of a comment.
- GetOrgMembership updated to accept user parameter (BREAKING CHANGE)
- EditOrgMembership updated to accept user parameter (BREAKING CHANGE)
- Added new RemoveOrgMembership method
Ref #187