Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Howard Wolosky 9600fc2112
Updates all state-changing commands to be silent by default (with -PassThru) (#276)
All state-changing commands (with the exception of `New-*`) are now silent by default.  Users can pass-in `-PassThru` to make them return the result that used to be returned by default.

Users can revert back to the previous behavior by leveraging the new configuration value: `DefaultPassThru`.

Resolves #217
2020-08-14 12:35:53 -07:00
Howard Wolosky db111559f9
Removing NoStatus from the module (#274)
The `NoStatus` parameter (and `DefaultNoStatus` config value) were deprecated as part of #253 when we stopped showing status except for multi-page requests that exceeded some minimum number of pages.

At that time, `NoStatus` (and `DefaultNoStatus`) were not removed in order to minimize the churn to the module.  However, keeping it in is adding unnecessary complexity to the module as we continue to expand what the module can do.

This change removes `NoStatus` (and `DefaultNoStatus`) from the module entirely.  The only impact that this may cause is with users who are currently using one (or both) of them.  This breaking change impact should be minimal, but its best for the breaking change to be part of the coming release which already has a number of other breaking changes as well, as opposed to having more breaking changes in a successive release.
2020-08-11 20:03:33 -07:00
Simon Heather 2f16de1f46
PowerShellForGitHub: Improve and Standardise WhatIf/Confirm Processing (#254)
Improves and standardizes the WhatIf/Confirm ('ShouldProcess') processing across all the functions.

* Moved the `$PSCmdlet.ShouldProcess` check out of `Invoke-GHRestMethod` and added it to the calling functions with the correct operation and target.
* Added `WhatIf:$false` and `Confirm:$false` to the `Out-File` Cmdlet call in the `Write-Log` function in the Helpers module. This will prevent the `Write-Log` function displaying `WhatIf` and `Confirm` prompts.
* Removed `ShouldProcess` from non-state changing functions.
* Modified the current `ShouldProcess` conditions to use an early return.
* Modified the `Set-GitHubIssueLabel` function to remove `ConfirmImpact='High'` and set `ConfirmPreference` to 'Low' if no labels have been specified instead.
* Modified the `Update-GitHubRepository` function to remove `ConfirmImpact='High'` and set `ConfirmPreference` to 'Low' if the repo is being renamed instead.
2020-08-03 14:26:23 -07:00
Howard Wolosky 92c4aa8b3a
Add support for gists (#172)
This completes the required work to support the full set of API's around gists.

It adds the following functions:
* `Get-GitHubGist`
* `Remove-GitHubGist`
* `Copy-GitHubGist` (aka. `Fork-GitHubGist`)
* `Add-GitHubGistStar`
* `Remove-GitHubGistStar`
* `Set-GitHubGistStar` (just a wrapper around `Add/Remove-GitHubGistStar`
* `Test-GitHubGistStar`
* `New-GitHubGist`
* `Set-GitHubGist`
   * `Rename-GitHubGistFile` (exposed helper function)
   * `Remove-GitHubGistFile` (exposed helper function)
   * `Set-GitHubGistFile` (exposed helper function, also known as `Add-GitHubGistFile`)
* `Get-GitHubGistComment`
* `Set-GitHubGistComment`
* `New-GitHubGistComment`
* `Remove-GitHubGistComment`

This also adds formatters for all newly introduced types: `GitHub.Gist`, `GitHub.GistCommit`, `GitHub.GistDetail`, and `GitHub.GistFork`.

Positional Binding has been set as `false`, and `Position` attributes added to the functions' mandatory parameters.

References:
[GitHub Gist](https://developer.github.com/v3/gists/)
[GitHub Gist Comments](https://developer.github.com/v3/gists/comments/)

Fixes #32
2020-07-20 15:07:58 -07:00