-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add possibility to add assignees to pull request #196
Add possibility to add assignees to pull request #196
Conversation
Add parameter assignees (-a) to the pull request command that allows to specify assignees usernames that should be added to the created pull request.
I would say that the GitLab implementation before was a bug. Even through it's a breaking change, I think we are fine to fix it since Multi-gitter is still not 1.0.0 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution ❤️
There seems to be a minor mistake in the test, and a file that isn't gofmt'ed, otherwise it look good to me 😄
|
||
usersWithMetadata = append(usersWithMetadata, bitbucketv1.UserWithMetadata{User: userWithLinks}) | ||
assignees, err := b.getUsersWithLinks(newPR.Assignees, client) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryancurrah Do you have the ability to test out the new --assignees
flag in bitbucket server? 🙂
What's the difference between assignees and reviewers? |
@ryancurrah From this response: For "assignee": up to the project's team/maintainer what it means and there's no strict definition. It can be the PR opener, or someone responsible for that area (who is going to accept the PR after the review is done or just close it). It's not up to GitHub to define what it is leaving it open for project maintainers what fits best for their project. |
I applied suggestions from the code review and verified that it works for GitHub. |
Hrm thats not a concept that exists in Bitbucket. Not sure how it will apply here. Maybe note that it wont work for certain SCM providers. |
Assignees do not exist, but "Participants" seems to be a concept. It seems that they should be similar, but I'm not really sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Thanks for the contribution 😄
The only thing I'm uncertain about is if we should do the assignee -> participant mapping for bitbucket server. I will let @ryancurrah decide that. Otherwise, I'm ready to merge it.
Looking at the API documentation a participant has three roles, So participant is how a reviewer is added to a pull request. And it looks like only
So it seems that in this case participant -> reviewer. |
Thanks @ryancurrah 👍 I guess in that case, we should remove the assignees for bitbucket server, since assigning participants are already reviewers? |
Yes that seems to be the case. |
@Berreek If you remove the bitbucket server code, I'm ready to merge the PR 🙂 |
Done! |
the previous mapping in GitLab was reviewers -> assignees. It has now been corrected.
Released in v0.35.0 🎉 |
What does this change
Add parameter assignees (-a) to the
run
command that allows to specify assignees usernames that should be added to the created pull request.What issue does it fix
Closes #194
Notes for the reviewer
I'm not sure about one change in this pull request which is worth to mention I guess. In current implementation for GitLab when you pass
reviewers
in the command they were converted toassignees
in GitLab. I changed it here soreviewers
are converted toreviewers
andassignees
toassignees
. This is a breaking change I assume if someone relied on the previous behaviuour.Checklist