Extend tests for Azure.create_pull_request(..., reviewers)#4056
Extend tests for Azure.create_pull_request(..., reviewers)#4056trejjam wants to merge 1 commit intodependabot:mainfrom
Conversation
|
Thanks for the contribution! I'm going to trigger CI, but I notice some things that'll definitely hit the linter, and I expect most tests for this class will now fail. Speaking of tests, it'd be great to add some test cases for this that show how it works, it wasn't immediately clear to be from the docs what structure we need to pass to |
|
Executing tests on Windows 10 was not really smooth ... But I manage it (with a few fixes) I did add tests for creating the Azure PR |
Yeah I'd recommend using the docker dev environment to run tests, there are quite a few things that need to be set up in order to run it outside of docker. I personally always run inside the docker env
Thanks! |
|
@trejjam for this one, two requests:
|
00b6906 to
f6b6700
Compare
|
.gitattribute PR: #5731 |
f6b6700 to
8362ad1
Compare
There was a problem hiding this comment.
IMO we need to do one of two things:
- decide we want to support reviewers as a top-level arg across all the clients that support it... planning to eventually also add plumbing support for it in github/gitlab/bitbucket even if they're no-ops for now. But even in this case, we also have to decide if at the client layer we make it an optional arg or a required arg.
- Not let this leak from Azure upwards... not even sure this is possible with the current code layout. But if we're only doing it for Azure, I'd rather not add an arg globally.
At first glance I lean towards making it a global optional arg, and then also optional at the individual client layer... reviewers really aren't a required thing to open PR's, but they are convenient and likely supported across pretty much all platforms...
I'm going to noodle on this API design a little and reach out to a teammate to get a second opinion.
In the meantime, no need to modify this PR, just leave as-is for now.
There was a problem hiding this comment.
Note to self: We could make this an optional arg instead of required here... depends whether we make reviewers a global required arg vs a global optional or local to azure arg.
I want to noodle on this API a little...
|
Thanks for the fast rebase and splitting out as separate commits. Give me a little bit of time to think on the API design. |
8362ad1 to
ceb390d
Compare
|
After noodling on this more, "requested reviewers" is a pretty ubiquitous concept... I checked GitHub, BitBucket, GitLab, and they all support it. So I'm 👍 on the path this PR took of adding @trejjam can you fix merge conflicts? The code in this PR currently all looks good to me, so unless another maintainer feels differently, once those conflicts are fixed this should be good to merge. |
ceb390d to
5db5798
Compare
|
Duplicate #5988 |
|
In the meantime, someone else implemented the feature... So this simply becomes tests extension... |
|
And the tests are failing, and I do not have the will to fix them |
|
Oh man, I'm so sorry! I completely forgot about #5988, my apologies! And when looking at that PR, we should have pursued this one first... but we just weren't caught up on our backlog so completely overlooked it. Again, my sincere apologies. |
This PR adds support for reviewers in the create_pr.
Azure doc: https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20requests/create?view=azure-devops-rest-6.0#request-body