-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename "id" parameter to "commentID" in comment-related methods of IssuesService. #885
Labels
Comments
dmitshur
added a commit
that referenced
this issue
Mar 29, 2018
Also document which IssueComment fields need to be set in EditComment method. This should help improve clarity of the API, and reduce the chance to mix up the wrong IDs. Resolves #885.
dmitshur
added a commit
that referenced
this issue
Mar 29, 2018
) Also document which IssueComment fields need to be set in EditComment method. This should help improve clarity of the API, and reduce the chance to mix up the issue vs comment IDs. Resolves #885.
dmitshur
added a commit
that referenced
this issue
Mar 30, 2018
This is a breaking API change that is a part of issue #597. It should've been applied earlier, but we missed it because the parameter was misleadingly named number rather than id or commentID. Rename the parameter to commentID to make it more clear that it's the comment ID and not the PR ID nor PR number. This should help improve clarity of the API, and reduce the chance to mix up the IDs. Also document which PullRequestComment fields need to be set in EditComment method. Similar to #886. Updates #885. Updates #597.
This was referenced Mar 30, 2018
dmitshur
added a commit
that referenced
this issue
Apr 2, 2018
…888) This is a breaking API change that is a part of issue #597. It should've been applied earlier, but we missed it because the parameter was misleadingly named number rather than id or commentID. Rename the parameter to commentID to make it more clear that it's the comment ID and not the PR ID nor PR number. This should help improve clarity of the API, and reduce the chance to mix up the IDs. Also document which PullRequestComment fields need to be set in EditComment method. Similar to #886. Updates #885. Updates #597.
nbareil
pushed a commit
to nbareil/go-github
that referenced
this issue
May 1, 2018
…oogle#886) Also document which IssueComment fields need to be set in EditComment method. This should help improve clarity of the API, and reduce the chance to mix up the issue vs comment IDs. Resolves google#885.
nbareil
pushed a commit
to nbareil/go-github
that referenced
this issue
May 1, 2018
…oogle#888) This is a breaking API change that is a part of issue google#597. It should've been applied earlier, but we missed it because the parameter was misleadingly named number rather than id or commentID. Rename the parameter to commentID to make it more clear that it's the comment ID and not the PR ID nor PR number. This should help improve clarity of the API, and reduce the chance to mix up the IDs. Also document which PullRequestComment fields need to be set in EditComment method. Similar to google#886. Updates google#885. Updates google#597.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The endpoints that touch comments in
IssuesService
are very different from ones that touch issues. Comment-related endpoints take the comment ID (anint64
now), while issue-related endpoints use the issue number (anint
):Using the name
id
for the parameter can be misleading. People can think it refers to the issue ID.This problem is exacerbated in the
EditComment
endpoints because they take anid int64
and the*github.IssueComment
itself also contains anID int64
(but setting it has no effect; it's there for the Get/List operations, not Edit).GistsService
sets a good example by calling the parametercommentID
in itsGetComment
method:I think we should rename
id
tocommentID
inIssuesService
to make it more clear.(I've also noticed a similar issue in
PullRequestsService
and its comment-related methods, but I'll make that a separate issue.)The text was updated successfully, but these errors were encountered: