-
Notifications
You must be signed in to change notification settings - Fork 188
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
GitHubRepositories: Add Additional Parameters #192
GitHubRepositories: Add Additional Parameters #192
Conversation
@HowardWolosky, can we trigger the CI on this PR? |
Once #199 is resolved, I'll run CI on this. Thanks for your patience (and many contributions). |
@X-Guardian -- don't you need the |
Yes, @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. |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
I don't think the pipeline triggered successfully. |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
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? |
That's been confusing me too. Sometimes it shows up, sometimes it doesn't. Here are two recent runs where it did show up.
I really can't think of any. I'll change the yaml template shortly. |
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! |
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 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.
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 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.
This CI failed due to a single related test:
I can repro that failure locally as well, but only with your change. |
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 |
I think it is a problem with the API. If you specify the How about we remove the |
That works for me. Would you mind creating a tracking issue for |
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. |
Thanks for all that. #176 should be getting merged in today. |
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.
This update looks great, pending the additional tests. Thanks!
I've updated the GitHubRepositories tests with the following:
|
By the way, you have added a |
Removed. Thanks for the reminder. That was there back when we were prepping to deprecate the |
Can we trigger the CI for this PR? |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi @HowardWolosky, are we able to get this PR reviewed and merged? |
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
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.
I would suggest adding |
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 = $bar and 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-GitHubRepository
andUpdate-GitHubRepository
functions:This Pull Request fixes the following issues