-
Notifications
You must be signed in to change notification settings - Fork 191
Added Discussions support #382
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
Conversation
Turns out unit tests aren't working. My mistake. Getting: Strangely, some tests are still passing:
|
Works okay when I run this:
Been going in circles on this for an hour. Read all the contributing docs in the repo. Doesn't even work when I revert my change. |
It looks like you're not sync'd up with what's currently in main. |
Yeah, that makes sense; I'm probably not getting all the Pester 5+ changes. My repo says it's up to date with the main branch, but it's clearly not. So can I just close out this PR, re-create my fork, then open a new one? |
That's overkill. No need to do that. You just need to merge the current changes in First, add a named branch for upstream:
After that, it's easy to do operations in your fork that interact with this project. This will get your fork's master fully in-sync with this one.
Finally, just rebase your branch on top of your local master
After that, your fork will be modifying on top of the current change in this project's |
@HowardWolosky okay, my change is actually working here. It's in the context "When creating a repository with all possible settings". It's the context "When creating a private repository with default settings" that's not working. It uses the same function to run both, but my new -Discussions parameter isn't even being added to the header. So I'm starting to believe it's a different issue. Here's some relevent variables I inspected during the test run:
Line 222 in GitHubRepositories.ps1 while running Error: |
I'm not seeing the test failures that you're describing when running your changes locally. |
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.
Pretty straightforward change. Just looking for a change to the parameter name.
Also, as a tip for the future -- you may find it easier to work on your changes in branches that you then submit pull requests, as opposed to working directly in your fork's master
. That would allow you to work on multiple unrelated changes at once (which is the problem you were previously running into).
This parameter should also be added to the |
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 14 days of this comment. |
This would make sense, but the GitHub docs don't show has_discussions as a parameter to update a repository. |
No, but it does work (I tried it). I think the documentation is incomplete. |
I pushed the change right before I saw your comment. Changing the other as well. |
/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 for the contribution!
Description
Allow the user to enable Discussions in Github repositories
Issues Fixed
Fixes #378
References
https://docs.github.com./en/rest/repos/repos?apiVersion=2022-11-28#update-a-repository
Checklist
- [ ] Formatters were created for any new types being added.- [ ] Changes to the manifest file follow the manifest guidance.- [ ] Relevant usage examples have been added/updated in USAGE.md.