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

344 Коммитов

Автор SHA1 Сообщение Дата
Howard Wolosky fd4fa65f23
Update module to 0.17.0 (#424) 2023-11-20 17:32:05 -08:00
Andy Jordan 356350b22f
Replace `BinaryFormatter` with `PSSerializer` (#415)
Replace `BinaryFormatter` with `PSSerializer`

Since the former has been removed from PowerShell 7.4 (because it was removed from .NET 7) and the latter can accomplish the same thing.

The default depth is 1, so we need to specify. Best I could find was that the prior implementation defaulted to a depth of 64, so we're going with that.
2023-11-20 16:36:18 -08:00
Jason Vercellone 9ec863b142
Add support for codespaces (#407)
Adds initial support for GitHub Codespaces.

#### References
Endpoints ~~excluded~~ below will be added in subsequent PRs

**[Codespaces/codespaces](https://docs.github.com/en/rest/codespaces/codespaces)**
- [x] [List codespaces in a repository for the authenticated user](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#list-codespaces-in-a-repository-for-the-authenticated-user)
- [x] [Create a codespace in a repository](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#create-a-codespace-in-a-repository)
~~[List devcontainer configurations in a repository for the authenticated user](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#list-devcontainer-configurations-in-a-repository-for-the-authenticated-user)~~
~~[Get default attributes for a codespace](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#get-default-attributes-for-a-codespace)~~
- [x] [Create a codespace from a pull request](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#create-a-codespace-from-a-pull-request)
- [x] [List codespaces for the authenticated user](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#list-codespaces-for-the-authenticated-user)
- [x] [Create a codespace for the authenticated user](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#create-a-codespace-for-the-authenticated-user)
- [x] [Get a codespace for the authenticated user](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#get-a-codespace-for-the-authenticated-user)
~~[Update a codespace for the authenticated user](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#update-a-codespace-for-the-authenticated-user)~~
- [x] [Delete a codespace for the authenticated user](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#delete-a-codespace-for-the-authenticated-user)
~~[Export a codespace for the authenticated user](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#export-a-codespace-for-the-authenticated-user)~~
~~[Get details about a codespace export](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#get-details-about-a-codespace-export)~~
~~[Create a repository from an unpublished codespace](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#create-a-repository-from-an-unpublished-codespace)~~
- [x] [Start a codespace for the authenticated user](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#start-a-codespace-for-the-authenticated-user)
- [x] [Stop a codespace for the authenticated user](https://docs.github.com/en/rest/codespaces/codespaces?apiVersion=2022-11-28#stop-a-codespace-for-the-authenticated-user)

**[Codespaces/organizations](https://docs.github.com/en/rest/codespaces/organizations)**
- [x] [List codespaces for the organization](https://docs.github.com/en/rest/codespaces/organizations?apiVersion=2022-11-28#list-codespaces-for-the-organization)
~~[Manage access control for organization codespaces](https://docs.github.com/en/rest/codespaces/organizations?apiVersion=2022-11-28#manage-access-control-for-organization-codespaces)~~
~~[Add users to Codespaces billing for an organization](https://docs.github.com/en/rest/codespaces/organizations?apiVersion=2022-11-28#add-users-to-codespaces-billing-for-an-organization)~~
~~[Removes users from Codespaces billing for an organization](https://docs.github.com/en/rest/codespaces/organizations?apiVersion=2022-11-28#removes-users-from-codespaces-billing-for-an-organization)~~
- [x] [List codespaces for a user in organization](https://docs.github.com/en/rest/codespaces/organizations?apiVersion=2022-11-28#list-codespaces-for-a-user-in-organization)
- [x] [Delete a codespace from the organization](https://docs.github.com/en/rest/codespaces/organizations?apiVersion=2022-11-28#delete-a-codespace-from-the-organization)
~~[Stop a codespace for an organization user](https://docs.github.com/en/rest/codespaces/organizations?apiVersion=2022-11-28#stop-a-codespace-for-an-organization-user)~~
2023-08-29 10:21:13 -07:00
Howard Wolosky 482fe23317
Remove static analysis warning for using a module alias being referenced in a test (#414)
I generally don't like aliases being used (neither does PSScriptAnalyzer), but in this case, `New-GitHubDeploymentEnvironment` was writting to be able to behave as `Set-GitHubDeploymentEnvironment` as well, and we should be testing it the way that a user would likely be calling it.
2023-08-22 10:41:46 -07:00
microsoft-github-policy-service[bot] 2233b86601
Onboarding to GitOps.ResourceManagement (#408)
* Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement

* Deleting fabricbot.json

---------

Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
2023-06-23 12:05:38 -07:00
Simon Heather 6f94a9b0a3
New/Set-GitHubRepository: Add Support for Merge Commit Title and Message Options (#385)
Adds merge commit message and title parameters to the `New-GitHubRepository` and `Set-GitHubRepository` functions.

Fixes #384

#### References

- https://docs.github.com/en/rest/repos/repos#create-an-organization-repository
- https://docs.github.com/en/rest/repos/repos#update-a-repository
2023-05-01 18:12:49 -07:00
Simon Heather dd844e5e4a
API Coverage: Add Support for Deployment Environments (#395)
Adds the following new cmdlets for managing GitHub Deployment Environments:

- `New-GitHubDeploymentEnvironment`
- `Get-GitHubDeploymentEnvironment`
- `Set-GitHubDeploymentEnvironment`
- `Remove-GitHubDeploymentEnvironment`

Fixes #394

#### References

-  [Deployment Environments](https://docs.github.com/en/rest/deployments/environments)
2023-04-30 11:33:42 -07:00
Simon Heather 43d5392642
Set-GitHubRepository: Add Support for 'Secret Scanning' Option (#391)
Adds the `SecretScanning` parameter to the `Set-GitHubRepository` function.

> The parameter was implemented using the `Enabled, Disabled` parameter validate set rather than a switch to mirror the pattern used by the GitHub API.

Fixes #390

#### References

- https://docs.github.com/en/rest/repos/repos#update-a-repository
2023-04-29 11:54:04 -07:00
Simon Heather d5094a0fc8
Remove has_wiki check (#404)
Remove the `has_wiki` property check from the private repositories unit tests as Wikis are no longer supported on the GitHub free tier.

Fixes #403
2023-04-20 17:20:35 -07:00
Simon Heather 516be0b4ca
Set-GitHubRepository: Add Support for 'Web Commit Signoff Required' Option
Adds the `WebCommitSignoffRequired` parameter to the `Set-GitHubRepository` function.

Fixes #388

References:

- https://docs.github.com/en/rest/repos/repos#update-a-repository
2023-02-26 21:12:19 -08:00
Simon Heather 9baf54e44c
New/Set-GitHubRepository: Add Support for 'Allow Update Branch' Option
Adds the `AllowUpdateBranch` parameter to the `New-GitHubRepository` and `Set-GitHubRepository` functions.

Fixes #386

References:

- https://docs.github.com/en/rest/repos/repos#create-an-organization-repository
- https://docs.github.com/en/rest/repos/repos#update-a-repository
2023-02-26 21:09:25 -08:00
Simon Heather b976e9515c
New/Set-GitHubRepository: Add AllowAutoMerge Parameter
Adds the `AllowAutoMerge` parameter to the `New-GitHubRepository` and `Set-GitHubRepository` functions.

Fixes #357 

References:
- https://docs.github.com/en/rest/repos/repos#create-an-organization-repository
- https://docs.github.com/en/rest/repos/repos#update-a-repository
2023-02-26 16:48:55 -08:00
Neil White 3ccee43287
Added Discussions support (#382)
Allow the user to enable Discussions in Github repositories.

Fixes #378
2023-02-26 12:10:01 -08:00
Mark 5e1a4b3129
Pester v5 (#366)
Updated all Pester tests in the project to support Pester v5.  The main benefit that we get out of this, besides just moving on to the currently supported version of the test framework, is that we can now execute individual tests directly within VS Code.

In the process of doing this migration:

* Removed repository Code of Conduct tests from GitHubMiscellaneous.tests.ps1 since the command has been deprecated by GitHub
* Updated GitHubReleases.tests.ps1 to account for pre-releases
* Updated run-unitTests.yaml and CONTRIBUTING.md to have the Pester v5.3.3 install command, as well as to update its invocation commands.
* Removed the language-specific error messages in some `-Throws` tests because the wording keeps changing.
* Updated this project's VSCode settings.json to take advantage of the fact that the tests are now Pester 5 compatible.  This allows each individual block to have a Run/Debug link associated with it.  ([More info](https://pester.dev/docs/usage/vscode)).
* Disabled all of the Projects/ProjectCards/ProjectColumns tests because Classic Projects have been deprecated by GitHub (#380 for more info)

Fixes #194 

Co-authored-by: Howard Wolosky <HowardWolosky@users.noreply.github.com>
2022-12-16 12:34:34 -08:00
Neil White 938896738c
Added API versioning support (#379)
GitHub is introducing versioned API's.  In order to get the expected behavior of an API, you need to invoke the API with its version in the request header.  This change updates the core functions (`Invoke-GHRestMethod` and `Invoke-GHRestMethodMultipleResult`) to accept an ApiVersion as part of their param sets so that as the module continues to add new functionality, methods can request the appropriate API Version for their individual calls.

Fixes #377 

Reference: [To infinity and beyond: enabling the future of GitHub’s REST API with API versioning](https://github.blog/2022-11-28-to-infinity-and-beyond-enabling-the-future-of-githubs-rest-api-with-api-versioning/)
[API Versions](https://docs.github.com/en/rest/overview/api-versions?apiVersion=2022-11-28)
2022-12-16 08:29:19 -08:00
Howard Wolosky 515e9bef78
Revert "New/Set-GitHubRepository: Add AllowAutoMerge and UseSquashPrTitleAsDefault Parameters (#358)" (#381)
This reverts commit 1afe5ac872.

It turns out that this isn't quite working right.

The `use_squash_pr_title_as_default` parameter [has been deprecated per the documentation](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#update-a-repository) in favor of `squash_merge_commit_title ` which works a bit differently.

Additionally, there appears to be a GitHub-side bug at the moment with changing the value of `allow_auto_merge` (it does not honor the request being sent).

Given this, for the time being we'll revert the change until we know that the feature is working correctly.
2022-12-15 15:32:42 -08:00
Simon Heather 1afe5ac872
New/Set-GitHubRepository: Add AllowAutoMerge and UseSquashPrTitleAsDefault Parameters (#358)
Adds the following parameters to the `New-GitHubRepository` and `Set-GitHubRepository` functions:

* AllowAutoMerge
* UseSquashPrTitleAsDefault

References

* https://docs.github.com/en/rest/repos/repos#create-an-organization-repository
* https://docs.github.com/en/rest/repos/repos#update-a-repository

Fixes #357
2022-12-14 17:28:18 -08:00
Howard Wolosky d8ee50a7ad
Fix coalesced Team permission property (#361)
When retrieving the permissions granted to a team for a repository, the API returns an array of booleans indicating what individual permissions the team currently has.

| name | permissions granted |
| ---- | ------------------ |
| pull | pull |
| triage | pull, triage |
| push | pull, triage, push |
| maintain | pull, triage, push, maintain |
| admin | pull, triage, push, maintain, admin |

As you can see, each permissions builds on top of the previous permission.  When adding extra properties to this returned object via `Add-GitHubRepositoryTeamPermissionAdditionalProperties`, we also add a new `permission` property that attempts to represent the collection of permissions with their current top-permission level.

The logic however incorrectly favored `push` over `maintain` and thus would always said that a Team had `push` permission when in fact it may have actually had `maintain` permission.

This simple change corrects that ordering mistake.
2022-12-14 17:23:36 -08:00
Howard Wolosky 4d7667bcaf
Not forwarding AccessToken to sub-commands for Repo Team Permissions (#362)
The Get/Set/Remove-GitHubRepositoryTeamPermission functions will sometimes call Get-GitHubTeam to get missing information.  In those instances, they weren't passing along the `AccessToken` parameter if it had been provided by the user.  In those scenarios, the result will be a 404 since the Get-GitHubTeam call won't have the same auth permissions as the core API being called.
2022-12-14 17:22:08 -08:00
Howard Wolosky 1466f1656b
Improve the 404 friendly message (#363)
Doing some clarifying wording in the friendly error message that we add to a 404 to indicate that they could be getting the error because the item truly doesn't exist, not simply due to authentication issues.
2022-12-14 17:21:06 -08:00
msftbot[bot] 9aac69728f
Migrate FabricBot Tasks to Config-as-Code` (#356)
**TL;DR;** Requesting to add [FabricBot](https://eng.ms/docs/products/1es-data-insights/merlinbot/extensions/fabricbot_overview) configuration associated with your repository to `.github/fabricbot.json`.

**Context**

FabricBot is now a [config-as-code-only](https://eng.ms/docs/products/1es-data-insights/merlinbot/extensions/bot-config-as-code) platform. As a result, while you can still use the [FabricBot Configuration Portal](https://portal.fabricbot.ms/bot/?repo=microsoft/PowerShellForGitHub) to modify your FabricBot configuration, you can no longer save the changes. The only way to save changes to your configuration at the moment is to _export configuration_ from the portal and upload the exported configuration to `.github/fabricbot.json` in your repository. In this pull request, we are adding your FabricBot configuration to your repository at `.github/fabricbot.json` so that you can make changes to it going forward.

While the [FabricBot Configuration Portal](https://portal.fabricbot.ms/bot/?repo=microsoft/PowerShellForGitHub) is the *only way* to modify your FabricBot configuration at the moment, we have a feature on our backlog to publish the JSON schema defining the structure of the FabricBot configuration file. With the JSON schema, you can (1) use a plaintext editor of your choice to modify the FabricBot configuration file and use the schema to validate the file after editing or (2) [configure](https://code.visualstudio.com/Docs/languages/json#_json-schemas-and-settings) VS Code to use the schema when editing FabricBot configuration file to take advantage of convenience features such as automatic code completion and field description on mouseover.

Co-authored-by: msftbot[bot] <48340428+msftbot[bot]@users.noreply.github.com>
Co-authored-by: Howard Wolosky <HowardWolosky@users.noreply.github.com>
2022-07-29 09:26:56 -07:00
Howard Wolosky 4b48946d81
Fix telemetry failure for long-running sessions (#355)
The telemetry code was creating a singleton base telemetry event the first time that telemetry was being sent.  That base event included the date.  If a PowerShell session lasted multiple days, the telemetry reporting would eventually start to fail because the date being reported for the event was too old.

We now just create a new telemetry event every time one is requested (this also ensures that it honors changes to the ApplicationInsightsKey), and now we only cache a GUID that we use to represent the "session" ID which we consider to be the duration of the current PowerShell session.
2022-07-25 11:39:09 -07:00
laustta fe881f6830
Fixed typo in New-GitHubRepositoryFork for USAGE.md (#345) 2021-11-18 08:12:37 -08:00
Matt Gucci 8b46226ba5
Fix help: Set-GitHubConfiguration -DefaultRepositoryName (#341)
Would be a copy-paste error from `-DefaultOwnerName `.
2021-09-24 18:13:36 -07:00
Simon Heather f7efc4a036
GitHubBranches: Add Get/New/Remove GitHub Repository Branch Pattern Protection Rule (#313)
Adds the following functions to the `GitHubBranches` module:

* `Invoke-GHGraphQl`
* `Get-GitHubRepositoryBranchPatternProtectionRule`
* `New-GitHubRepositoryBranchPatternProtectionRule`
* `Remove-GitHubRepositoryBranchPatternProtectionRule`

`Invoke-GHGraphQl` is based on `Invoke-GHRestMethod` but modified with the following features:

* Use of the GitHub GraphQL API Endpoint.
* PowerShell 5 and 6+ `Invoke-WebRequest` error handling support.
* Use of `ThrowTerminatingError` instead of `Throw` for enhanced exceptions and hiding the internal details of the function. Reference: [Everything you wanted to know about exceptions](https://docs.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-exceptions)
* GraphQl specific error handling.
* Extensive debug logging.

Fixes #312 

References
* [createbranchprotectionrule](https://docs.github.com/en/graphql/reference/mutations#createbranchprotectionrule)
* [deletebranchprotectionrule](https://docs.github.com/en/graphql/reference/mutations#deletebranchprotectionrule)
* [branchprotectionrule](https://docs.github.com/en/graphql/reference/objects#branchprotectionrule)
2021-07-15 08:43:15 -07:00
Howard Wolosky 0ebf9e8b8d
Update module to 0.16.1 (#330) 2021-05-26 08:24:11 -07:00
jing8956 1200b5b36a
Fix Encode Issues (#328)
`Set-GitHubContent` needed to use the `UTF8` encoder, just like `Get-GitHubContent`, as opposed to the `Unicode` encoder.
2021-05-10 21:12:43 -07:00
Howard Wolosky 002363505f
Fix gist test validating the since parameter (#321)
octocat recently updated all of its gists, starting on 2/24/2021.
The test previously would query for gists that were updated since 2016, but as of 2/24/2021, that included all of them.

The test has been made more robust by choosing the most recent date of all the gists and then requerying, which should hopefully now always guarantee that we'll get a reduced set of gists, unless all of the gists are suddenly updated in the future at the exact same second.
2021-03-25 00:52:07 -07:00
Howard Wolosky a2329d6730
Allow callers of Invoke-GHRestMethod[MultipleResult] to specify additional headers (#319)
When experimenting with the the notifications API, it was necessary to be able to specify an additional header (If-Modified-Since).

Making this support generic by allowing callers to specify any number of additional headers to be included with the REST request.
2021-03-20 15:52:37 -07:00
Howard Wolosky f7a60c75e2
Disable DFS for release builds (#316)
The functionality is not currently being used, and keeping it enabled
will cause this pipeline to stop being supported.
2021-01-27 14:02:21 -08:00
Howard Wolosky 007deb7e53
Fix issues with Build-Wiki and add Wiki documentation to CONTRIBUTING.md's Release section (#311)
Fixed some issues with `Build-Wiki`:

* Ensured that `Home.md` is not incorrectly categorized as deprecated.
* Fixed how we check for `platyPS` being installed.
* Fixed how we reference files in `Move-Item` to solve the issue when the file being moved is new.
* Added warning/reminder to run this under `PS7+` to avoid issue with how multi-line examples get formatted.

Also added Wiki updating instructions to the release section of `CONTRIBUTING.md`.
2021-01-06 14:16:21 -08:00
Howard Wolosky a1640a27b4
Update module to 0.16.0 (#310) 2021-01-05 11:46:46 -08:00
Howard Wolosky 7f1dbf2510
Fix the USAGE.md example for New-GitHubRepositoryFromTemplate (#309)
Resolves #308
2020-12-31 15:10:30 -08:00
Simon Heather 22e3d7bdf6
GitHubRepositories: Add Get/Set/Remove GitHub Repository Team Permissions (#300)
Adds the following functions:

* `Get-GitHubRepositoryTeamPermission`
* `Set-GitHubRepositoryTeamPermission`
* `Remove-GitHubRepositoryTeamPermission`

References
* [Check team permissions for a repository](https://docs.github.com/en/free-pro-team@latest/rest/reference/teams#check-team-permissions-for-a-repository)
* [Add or update team repository permissions](https://docs.github.com/en/free-pro-team@latest/rest/reference/teams#add-or-update-team-repository-permissions)
* [Remove a repository from a team](https://docs.github.com/en/free-pro-team@latest/rest/reference/teams#remove-a-repository-from-a-team)

Resolves #307
2020-12-24 12:54:03 -08:00
Pepe Rivera 8fd4201020
Fix labels in events being treated as full label objects (#306)
`Get-GitHubEvent` is currently broken if the issue contains and event that includes the "label" or "labels" property. This is because `Add-GitHubEventAdditionalProperties` treats the labels in the event object as full fledged label objects that normally contain a URL property and other additional pieces of data. The label property in a `GitHub.Event` is a lighter-weight object that simply contains the string for the label and color that was changed, it is not the full object that you would typically receive from a call like `Get-GithubLabel`. 

Updated to add a new `GitHub.LabelSummary` type to describe this scenario, as well as passing in the needed `RepositoryUrl` when adding the additional label properties.
2020-12-21 16:42:51 -08:00
Simon Heather d4997057f8
GitHubRepositories: Add Get/Set GitHub Repository Actions Permissions (#301)
Adds the following functions to the `GitHubRepositories` module:

- `Get-GitHubRepositoryActionsPermission`
- `Set-GitHubRepositoryActionsPermission`

#### References

- [Get GitHub Actions permissions for a repository](https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#get-github-actions-permissions-for-a-repository)
- [Set GitHub Actions permissions for a repository](https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#set-github-actions-permissions-for-a-repository)
2020-12-06 08:25:44 -08:00
Jonathan Moss 8a29c7faa8
Fix markdown for example in USAGE.md (#299) 2020-11-02 19:31:57 -08:00
Howard Wolosky 28c4336825
Add reference to Wiki in USAGE.md (#298)
Add a reference to the documentation in the Wiki to the top of USAGE.md.
2020-10-27 15:08:09 -07:00
Ted Hudek 28e20d4a2a
Fix typo in example in USAGE.md (#297)
Changes an opening brace to parenthesis because `Add-GitHubIssueLabel` takes an array of label strings.
2020-10-23 12:10:37 -07:00
John ec7950c02c
Fixed the AuthorName/AuthorEmail variable check for Set-GitHubContent (#295)
Fixed the variable check for Set-GitHubContent.

Resolves #285.
2020-10-16 14:59:10 -07:00
Howard Wolosky c92d8a64eb
Fix potential call depth overflow error when retrying a 202 response (#294)
GitHub will return back a `202` response when the result for the query is not yet ready.  GitHub requests that we "give the job a few moments to complete, and then submit the request again."

We already had the configuration value `RetryDelaySeconds` which covered how many seconds we would sleep before trying the request again. We tried the request again via a recursive call to `Invoke-GHRestMethod`.

It turns out that there's something going on with GitHub right now, and trying to get contributor statistics for a completely new repository never returns back a 200, even after 145 retry attempts over 72 minutes.

That many recursive calls ends up causing a call depth overflow exception with PowerShell.  While this scenario should be an edge-case, nonetheless it seems better to remove the possibility of this error from occurring by modifying the retry logic to be a loop rather than a recursive call.

I've also added a new configuration value: `MaximumRetriesWhenResultNotReady` to help control and limit the number of retries that we'll attempt in this situation, ultimately throwing an exception if the retry limit is exceeded without a 200 response.

Finally, I've disabled the `When getting Github Repository Contributors with Statistics` test until the problem is fixed on the GitHub end.  I've disabled the test by commenting the test out vs using the disable keyword to avoid the Pester failure for disabled tests, and I've opened a [support issue](https://github.community/t/unable-to-retrieve-contributor-statistics-for-a-brand-new-repo/136658) on this problem.
2020-10-08 12:56:37 -07:00
Howard Wolosky c06614903e Fix static-analyzer warning for Windows PowerShell
The Build-* verb is new to PowerShell Core and so was considered
unapproved for Windows PowerShell.  Given that these are internal
helper methods and it _is_ an approved verb in PS Core, keeping as-is
and just marking these warning instances to be suppressed.
2020-10-07 14:22:16 -07:00
Howard Wolosky ab536c772a
Add missing .SYNOPSIS to functions (#293)
Now that we are generating help documentation for the module, we want to ensure that we have a .SYNOPSIS for every function CBH.
2020-10-05 00:25:32 -07:00
Howard Wolosky 4379a46572
Auto-generate documentation for Wiki (#292)
This adds a new script utility, `Build-Wiki.ps1`, which can be used to auto-generate the documentation for the Wiki.  This uses the [PlatyPS](https://github.com/PowerShell/PlatyPS) module to generate the actual help documentation.

Relevant notes:
* This will generate the `Home.md`, `_sidebar.md`, and `_footer.md`   files for the Wiki if they don't already exist in the destination directory.
* If they do already exist, it intelligently updates the content, only replacing the parts that it generated itself (denoted with
  comments in the markdown content itself).
* At present, this is not being hooked-up to CI because I don't want to deal with storing credentials that have admin access 
to the actual repo.

Tip of the hat to @X-Guardian for the suggestion and the initial help with writing this out.

Resolves #208
2020-10-04 23:07:59 -07:00
Jack Samuel S 35be16a9c4
Fix typos in USAGE.md (#288)
Fixes #287
2020-09-26 11:43:12 -07:00
Howard Wolosky 5b835cd543
Update module to 0.15.1 (#284) 2020-09-09 08:35:39 -07:00
Howard Wolosky e9a6810b3c
Fix default logPath when no user profile is available (#283)
In Azure Function Apps, the special `MyDocuments` folder resolves to an empty string, which means that the default `logPath` gets stored as an empty string.

3094c9789c/GitHubConfiguration.ps1 (L650-L657)

3094c9789c/GitHubConfiguration.ps1 (L671)

This causes problems when `Write-Log` is called by any other function, because we directly assign the current configuration value for `LogPath` as the parameter's default, which throws an exception when an empty string is assigned.

3094c9789c/Helpers.ps1 (L142)

In this scenario, we'll fall back to using the `LocalApplicationDataFolder` folder and writing a verbose message to the user letting them know this has happened.  I've opted for a verbose message as opposed to a warning to avoid a constant annoying warning for users.  The alternate path is documented in the updated USAGE.md, and it's also retrievable by calling `Get-GitHubConfiguration -Name LogPath`.

Documentation has also been updated to reflect this behavior change.

Fixes #282
2020-09-09 08:15:35 -07:00
Howard Wolosky 5ee03650b8 Increase max runtime for CI pipeline jobs 2020-09-08 21:43:11 -07:00
Howard Wolosky 3094c9789c Fixing README badges/links 2020-08-27 12:32:42 -07:00
Howard Wolosky 458d07c8f2 Update README's listing of current API support
Updated the summary of the current API support in the README to account
for the recent `0.15.0` changes.  Also added a direct link to the
CHANGELOG as well.
2020-08-20 12:54:04 -07:00