Uh oh!
There was an error while loading. Please reload this page.
GitHubRepositories: Add Additional Parameters - #192
GitHubRepositories: Add Additional Parameters#192Howard Wolosky (HowardWolosky) merged 20 commits into
Conversation
Simon Heather (X-Guardian)
commented
May 29, 2020
Howard Wolosky (@HowardWolosky), can we trigger the CI on this PR? |
Howard Wolosky (HowardWolosky)
commented
May 29, 2020
Once #199 is resolved, I'll run CI on this. Thanks for your patience (and many contributions). |
Howard Wolosky (HowardWolosky)
commented
May 30, 2020
Simon Heather (@X-Guardian) -- don't you need the |
Simon Heather (X-Guardian)
commented
May 31, 2020
Yes, Howard Wolosky (@HowardWolosky) , you are right. I've added these. I haven't added any tests for these changes yet. I'll add these once #176 has been merged. |
Howard Wolosky (HowardWolosky)
commented
May 31, 2020
/azp run PowerShellForGitHub-CI |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Simon Heather (X-Guardian)
commented
May 31, 2020
I don't think the pipeline triggered successfully. |
Howard Wolosky (HowardWolosky)
commented
May 31, 2020
/azp run PowerShellForGitHub-CI |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Howard Wolosky (HowardWolosky)
commented
Jun 1, 2020
/azp run PowerShellForGitHub-CI |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Simon Heather (X-Guardian)
commented
Jun 1, 2020
I'm not seeing the test results on the Azure Pipelines job (there should be a 'test' tab). Also, any reason why the code coverage is configured to not be published when pulling from a fork? |
Howard Wolosky (HowardWolosky)
commented
Jun 1, 2020
That's been confusing me too. Sometimes it shows up, sometimes it doesn't. Here are tworecent runs where it did show up.
I really can't think of any. I'll change the yaml template shortly. |
Simon Heather (X-Guardian)
commented
Jun 1, 2020
I don't see the test tab on either of those runs. I'm seeing the same issue with other open-source projects, so I've been digging around and it looks like Microsoft are now hiding the test tab for non-organization members. See: https://developercommunity.visualstudio.com/content/problem/1045997/tests-tab-not-visible-for-logged-out-users-on-open.html. I hope they change there minds on this! |
Howard Wolosky (HowardWolosky)
left a comment
There was a problem hiding this comment.
Thanks for catching this and for the suggested fix.
Things are a bit more complicated here because Private and Visibility are controlling the same root property on the repo. I've added some thoughts on this matter for your consideration.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Howard Wolosky (HowardWolosky)
left a comment
There was a problem hiding this comment.
Thanks for the quick update! Two minor phrasing updates requested for the warning message because you had better wording in your CBH, and then a request to migrate our own usage away from -Private and on to Visibility. Thanks again.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Howard Wolosky (HowardWolosky)
commented
Jun 2, 2020
This CI failed due to a single related test: I can repro that failure locally as well, but only with your change. |
Howard Wolosky (HowardWolosky)
commented
Jun 2, 2020
I also confirmed by manually using it that, despite the body looking correct, the request is still creating a public repo: Set-GitHubConfiguration-LogRequestBody
New-GitHubRepository-RepositoryName "testp"-AutoInit -Visibility "Private"log result... (Get-GitHubRepository-OwnerName PowerShellForGitHubTeam -RepositoryName testp).Visibility
public |
Simon Heather (X-Guardian)
commented
Jun 2, 2020
I think it is a problem with the API. If you specify the How about we remove the |
Howard Wolosky (HowardWolosky)
commented
Jun 2, 2020
That works for me. Would you mind creating a tracking issue for |
Simon Heather (X-Guardian)
commented
Jun 3, 2020
OK, I've removed the I'll raise another PR with the Reminder: this PR still needs additional tests to be added, but I'm waiting for #176 to be merged. |
Howard Wolosky (HowardWolosky)
commented
Jun 3, 2020
Thanks for all that. #176 should be getting merged in today. |
Howard Wolosky (HowardWolosky)
left a comment
There was a problem hiding this comment.
This update looks great, pending the additional tests. Thanks!
Simon Heather (X-Guardian)
commented
Jun 4, 2020
I've updated the GitHubRepositories tests with the following:
|
Simon Heather (X-Guardian)
commented
Jun 4, 2020
By the way, you have added a |
Howard Wolosky (HowardWolosky)
commented
Jun 4, 2020
Removed. Thanks for the reminder. That was there back when we were prepping to deprecate the |
Simon Heather (X-Guardian)
commented
Jun 5, 2020
Can we trigger the CI for this PR? |
Howard Wolosky (HowardWolosky)
commented
Jun 5, 2020
/azp run PowerShellForGitHub-CI |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Simon Heather (X-Guardian)
commented
Jun 9, 2020
Hi Howard Wolosky (@HowardWolosky), are we able to get this PR reviewed and merged? |
Howard Wolosky (HowardWolosky)
commented
Jun 9, 2020
/azp run PowerShellForGitHub-CI |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Howard Wolosky (HowardWolosky)
left a comment
There was a problem hiding this comment.
Update looks good, thanks.
Kicked off a new CI build for verification.
I'm mixed on the idea of the file-level suppression for the PSUseDeclaredVarsMoreThanAssignments false positives, because having it has helped me catch when I mistyped a variable name or incorrectly used the wrong one in the wrong scope. The workaround is annoying, but it does add value.
I'm not going to have you make further changes, but that change specifically might end up getting reverted as part of the pipelining change since there are so many UT changes being done as part of it.
Simon Heather (X-Guardian)
commented
Jun 9, 2020
I would suggest adding |
Howard Wolosky (HowardWolosky)
commented
Jun 10, 2020
Brilliant! It won't identify variables that are assigned to but are never used, but it will at least capture when a variable is accessed that wasn't previously created. I do think that we're losing a little something by not identifying variables that we are saving but not using (which might point to a miswritten test), but this will make the tests more manageable (and readable) in general by avoiding the workaround I was previously using. I tested it out by putting it in Tests/Common.ps1, and then I inserted the following to the top of a test file: $foo=$barand got the following error immediately upon executing the test: Will be making use of this in the updated pipeline tests. Thanks! |
Pull Request description
This PR adds the following parameters to the
New-GitHubRepositoryandUpdate-GitHubRepositoryfunctions:This Pull Request fixes the following issues