Skip to content

Conversation

wesleimp
Copy link
Collaborator

@wesleimp wesleimp commented Mar 2, 2020

Closes #1442

@googlebot googlebot added the cla: yes Indication that the PR author has signed a Google Contributor License Agreement. label Mar 2, 2020
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @wesleimp!
I have been trying to figure out if the *_number fields should be int instead of int64, but I'm not finding any other place in this repo where these fields are already represented except in IssueComment where the ID is an int64, so I'm thinking we can leave these.

So the only other thing that needs changing is to revert the changes to go.mod and go.sum, please.

Then we should be ready for a second LGTM before merging.

@gmlewis gmlewis requested a review from gauntface March 3, 2020 00:51
@wesleimp wesleimp requested a review from gmlewis March 3, 2020 13:01
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Awaiting second LGTM before merging.

@wesleimp
Copy link
Collaborator Author

wesleimp commented Mar 3, 2020

@martinssipenko - if you feel like reviewing and approving, your help would be greatly appreciated!

// DeleteTeamDiscussionReactionByTeamIDAndOrgID deletes the reaction to a team discussion by organization ID and team ID.
//
// GitHub API docs: https://developer.github.com/v3/reactions/#delete-team-discussion-reaction
func (s *ReactionsService) DeleteTeamDiscussionReactionByTeamIDAndOrgID(ctx context.Context, orgID, teamID, discussionNumber, reactionID int64) (*Response, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method is described as "ByTeamIDAndOrgID", but the parameters are in the opposite order: orgID first, teamID second.

Having orgID be first makes sense, given it's a higher level piece of information. It's consistent with specifying repoID first, issueID second.

What do you think about renaming this method (and others like it) to be consistent with the parameters, i.e., "ByOrgIDAndTeamID"?

(Optional comment.)

Copy link
Member

@dmitshur dmitshur Mar 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another idea here is to use a simpler "ByID" suffix for all these methods that use IDs instead of repo/owner/org names.

That is what's used by many other existing endpoints:

$ go doc -all github.com/google/go-github/github | grep ByID | wc -l    
      55

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, consistency would be good.

@wesleimp wesleimp requested a review from dmitshur March 9, 2020 14:04
@codecov
Copy link

codecov bot commented Mar 9, 2020

Codecov Report

Merging #1451 into master will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1451      +/-   ##
==========================================
+ Coverage   68.07%   68.16%   +0.09%     
==========================================
  Files          92       94       +2     
  Lines        8307     8419     +112     
==========================================
+ Hits         5655     5739      +84     
- Misses       1795     1819      +24     
- Partials      857      861       +4     
Impacted Files Coverage Δ
github/reactions.go 64.50% <100.00%> (+5.88%) ⬆️
github/repos_pages.go 53.84% <0.00%> (-0.51%) ⬇️
github/github.go 89.77% <0.00%> (ø)
github/actions_workflow_jobs.go 58.46% <0.00%> (ø)
github/actions_runners.go 51.35% <0.00%> (ø)
github/actions_workflow_runs.go 48.71% <0.00%> (ø)
github/authorizations.go 71.57% <0.00%> (+15.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f66efb...ffb6c45. Read the comment docs.

@gmlewis
Copy link
Collaborator

gmlewis commented Mar 13, 2020

OK, I think this PR is ready for merging and would be good to get into the repo before we make release v30.0.0 (with its breaking API changes).

If we could please get a second LGTM on it, that would be great. Thank you.

Copy link

@joebowbeer joebowbeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wesleimp wesleimp requested a review from gmlewis March 13, 2020 11:59
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize that I didn't catch this before, but I'm just realizing that in other places in our repo, whenever we have a *Number (as opposed to a *ID), we use int instead of int64.

So for consistency, I'm thinking that we should change all issueNumber, discussionNumber, and commentNumber arguments to be of type int instead of type int64 (and leave all the *ID types to be int64).

@joebowbeer
Copy link

@wesleimp it would be great to have this merged in order to unblock v30

@wesleimp wesleimp requested a review from gmlewis March 18, 2020 13:14
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @wesleimp and reviewers!
LGTM.
Merging.

@gmlewis gmlewis merged commit e5d8dd6 into google:master Mar 18, 2020
sprsld pushed a commit to sprsld/go-github that referenced this pull request Mar 24, 2020
n1lesh pushed a commit to n1lesh/go-github that referenced this pull request Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indication that the PR author has signed a Google Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support new "Delete Reactions" endpoints
6 participants