Repository navigation
Open
Labels
api-reactionsWork to complete the API's defined here: https://developer.github.com/v3/reactionsWork to complete the API's defined here: https://developer.github.com/v3/reactionsdiscussionWe are looking for additional community feedback on this topic before proceeding further.We are looking for additional community feedback on this topic before proceeding further.enhancementAn issue or pull request introducing new functionality to the project.An issue or pull request introducing new functionality to the project.triage neededAn issue that needs to be reviewed by a member of the team.An issue that needs to be reviewed by a member of the team.
Description
Feature Idea Summary
Now that #193 is in, this will track reacting to
- Issue Comments
- PR Comments
- Commit Comments
Feature Idea Additional Details
In #193, I proposed:
For Get-GitHubComment I've can add PullRequestNumber and IssueNumber
Get-GitHubReaction will have a parameter set just for Issue (PullRequestNumber will then be alias so that pipeline works) with an optional Comment parameter. When we support Pull Request Comments we can split up into 2 parameter sets:
PullRequestComment
PullRequestReviewComment
where we add a ReviewComment param
This would also align with Get-GitHubComment which can get PR Comments today.
Requested Assignment
- If possible, I would like to implement this.
Metadata
Metadata
Assignees
Labels
api-reactionsWork to complete the API's defined here: https://developer.github.com/v3/reactionsWork to complete the API's defined here: https://developer.github.com/v3/reactionsdiscussionWe are looking for additional community feedback on this topic before proceeding further.We are looking for additional community feedback on this topic before proceeding further.enhancementAn issue or pull request introducing new functionality to the project.An issue or pull request introducing new functionality to the project.triage neededAn issue that needs to be reviewed by a member of the team.An issue that needs to be reviewed by a member of the team.
Activity
HowardWolosky commentedon Jul 16, 2020
Some initial thoughts:
#242 renamed
Get-GitHubComment->Get-GetHubIssueCommentbecause it's really just focused on Issue comments. It was aliased back toGet-GitHubCommentto avoid a breaking change, but it's really an Issue-focused function.I think it's going to be difficult to create a single function that can handle all of the different comment types. For instance, getting a specific pull request comment does not require having the pull request number available. Neither do you need the issue number to get a specific issue comment . We could in theory author the function to require the
PullRequestNumber/IssueNumber, which would make the signature much more straight-forward, but trying to enable the minimum required parameters of the API means that we can't cover both types in the same function. It's a similar situation with reactions to those other comment types. We don't technically need that information to successfully use those API's, so it seems a bit artificial to require them of the user.I also don't think that adding an additional string parameter to capture the type of comment is a good alternative either. E.g.
Feel free to prove me wrong though or provide a compelling argument.
Right now, you can see that in #172 I added
Get-GitHubGistComment(which is yet another comment type, but one that doesn't support reactions), and in my ongoing pullRequests work it addsGet-GitHubPullRequestReviewComment.Maybe we do move forward with your current designed plan and have
Get-GitHubComment/Get-GitHubReactionsupport all comment types, but additionally require the unnecessary parameters in order to qualify what theCommentIdis referencing, but then also add type-specific functions (e.g.Get-GitHubIssueComment,Get-GitHubPullRequestComment,Get-GitHubPullRequestReviewComment, etc...) that don't require that additional data given the context is already there in the name.Thoughts?
TylerLeonhardt commentedon Jul 17, 2020
Do you think there's a scenario when you want only Pull Request review comments and not Pull Request normal comments?
I'm thinking about:
What would a user expect that to do?
Personally - I'm thinking it'd grab both review and normal comments.
TylerLeonhardt commentedon Jul 17, 2020
but then again....... commit comments show up in pull requests on the website... so then a user might expect those to come back as well
but I don't agree with that.
HowardWolosky commentedon Jul 17, 2020
I can imagine scenarios where you'd just want PR comments and not review comments. I could see that resolved possibly with a couple parameter sets (these are just the pull request-related ones):
[int64] PullRequest[switch] $IncludeReviewComments[int64] PullRequest[int64] CommentKeep in mind that this is just for
Get-GitHubComment. They would look different in the type-specific functions.Also keep in mind that proceeding this way means that
Get-GitHubIssueCommentshould no longer be aliased toGet-GitHubCommentand instead a separateGet-GitHubCommentshould be created that starts to support these additional comment types.TylerLeonhardt commentedon Jul 17, 2020
Could follow
Get-GitHubPullRequest'sStateparameter which has validate set of:could do:
or something like that