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.
As with the previous key added in 19c0916, I deleted the associated
private key using /usr/bin/shred. But of course, I have no way to prove
that. Again, all the more reason to always use a test account when
running these integration tests.
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