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

9 Коммитов

Автор SHA1 Сообщение Дата
Pepe Rivera e3b6c53017 Add ability to specify a MediaType for issues (#83)
Updates Issues API's to have a configurable MediaType.
2019-01-16 11:18:24 -08:00
Howard Wolosky 185441078e Fix all string parameters to be CamelCased and avoid abbreviation
Updated all parameter sets to use `CamelCased` inputs, and adjusted their usage
internally to still conform to the API requirements.

Made minor documentation changes related to these udpates.

Resolves #65: Fix all string parameters to be CamelCased and avoid abbreviation
2019-01-03 15:27:54 -08:00
Howard Wolosky 577f07bd21 Fix issue preventing labels from being updated when updating Issue
Similar to #76, `Update-GitHubIssue` was passing in the provided
labels as `label` instead of `labels` in the request body.
2018-12-13 21:59:32 -08:00
Francois-Xavier Cat 3b6e84cbaf Fix typo that prevent tag(s) to be assigned to new issue 2018-12-13 20:24:53 -08:00
Pepe Rivera bf6764080c Fix issue 2018-12-13 14:37:32 -08:00
Pepe Rivera 6c73554248 Add support for issue labels (#59)
Added support for the [Label](https://developer.github.com/v3/issues/labels/) API's for GitHub Issues.
2018-12-13 07:21:15 -08:00
Howard Wolosky 6cf344fb38
Prevent `ConvertTo-SmarterObject` from flattening arrays (#56)
* Ensure that `ConvertTo-SmarterObject` does not cause any side-effects on `InputObject`
* Ensure that `ConvertTo-SmarterObject` does not flatten any arrays
* Switched all calls of `ConvertTo-Json` to not use pipelining in order to avoid PowerShell's
  array-flattening logic when piping the InputObject in, as opposed to when passing it as a parameter.
* Ensured that we do best-effort Date conversion in `ConvertTo-SmarterObject` (a failed date conversion
  should never cause an exception/failure).
* Used a workaround described in [Pester's Wiki](# https://github.com/pester/Pester/wiki/Testing-different-module-types)
  to force the module to be a `Script Module` instead of a `Manifest Module` so that `Mock` and
  `InModuleScope` (which lets you test private methods) work.
* Added UT's for `ConvertTo-SmarterObject` core scenarios.

Resolves PowerShell#55: ConvertTo-SmarterObject is flattening arrays

Thanks to @DanBelcher-MSFT for the assist on this one.
2018-11-30 11:26:13 -08:00
Howard Wolosky 695845101f
Update helper methods to grab appropriate default values from previous scope (#52)
* Updated `Resolve-ParameterWithDefaultConfigurationValue` and `Resolve-RepositoryElements`
  to grab `$PSBoundParameters` from the previous (calling) scope if not provided.

* Updated `Write-InvocationLog` to grab `$MyInvocation` from the previous (calling) scope
  if not explicitly provided.

In all cases, this will simpliy the standard calling pattern for these functions.
2018-11-19 13:07:05 -08:00
Howard Wolosky eb33688e5b Module restructure to v0.2.0
+ Significant restructing and refactoring of entire module to make future expansion easier.
+ Significant documentation updates ([CHANGELOG](./CHANGELOG.md), [CONTRIBUTING.md](./CONTRIBUTING.md),
  [GOVERNANCE.md](./GOVERNANCE.md), [README.md](./README.md), [USAGE.md](./USAGE.md))
+ Added `Set-GitHubAuthentication` (and related methods) for securely caching the Access Token
+ Added `Set-GitHubConfiguration` (and related methods) to enable short and long-term configuration
  of the module.
+ Added ability to asynchronously see status update of REST requests.
+ Added logging and telemetry to the module (each can be disabled if desired).
+ Tests now auto-configure themselves across whatever account information is supplied in
  [Tests/Config/Settings.ps1](./Tests/Config/Settings.ps1)
+ Added support for a number of additional GitHub API's:
  + All [Miscellaneous API's](https://developer.github.com/v3/misc/)
  + Ability to fully query, update, remove, lock, and unlock Issues.
  + Enhanced pull request querying support
  + Ability tofully query, create, and remove Repositories, as well as transfer ownership,
    get tags, get/set topic and current used programming languages.
  + Enhanced user query support as well as being able update information for the current user.

* Made parameter ordering consistent across all functions (OwnerName is now first, then RepositoryName)
* Normalized all parameters to use SentenceCase
* All functions that can take a Uri or OwnerName/RepositoryName now support both options.
* Made all parameter names consistent across functions:
  * `GitHubAccessToken` -> `AccessToken`
  * `RepositoryUrl` -> `Uri`
  * `Organization` -> `OrganizationName`
  * `Repository` -> `RepositoryName`
  * `Owner` -> `OwnerName`
* Normalized usage of Verbose, Info and Error streams

- `New-GitHubLabels` was renamed to `Set-GitHubLabel` and can now optionally take in the labels
  to apply to the Repository.
- `Get-GitHubIssueForRepository` has been removed and replaced with `Get-GitHubIssue`.
  The key difference between these two is that it no longer accepts multiple repositories as single
  input, and filtering on creation/closed date can be done after the fact piping the results into
  `Where-Object` now that the returned objects from `Get-GitHubIssue` have actual `[DateTime]` values
  for the date properties.  For an updated example of doing this, refer to [example usage](USAGE.md#querying-issues).
- `Get-GitHubWeeklyIssueForRepository` has been removed and functionally replaced by `Group-GitHubIssue`.
  For an updated example of using it, refer to [example usage](USAGE.md#querying-issues)
- `Get-GitHubTopIssueRepository` has been removed.  We have [updated examples](USAGE.md#querying-issues)
  for how to accomplish the same scenario.
- `Get-GitHubPullRequestForRepository` has been removed and replaced with `Get-GitHubPullRequest`.
  The key difference between these two is that it no longer accepts multiple repositories as single
  input, and filtering on creation/merged date can be done after the fact piping the results into
  `Where-Object` now that the returned objects from `Get-GitHubPullRequest` have actual `[DateTime]` values
  for the date properties.  For an updated example of doing this, refer to [example usage](USAGE.md#querying-pull-requests).
- `Get-GitHubWeeklyPullRequestForRepository` has been removed and functionally replaced by `Group-GitHubPullRequest`.
  For an updated example of using it, refer to [example usage](USAGE.md#querying-pull-requests)
- `Get-GitHubTopPullRequestRepository` has been removed.  We have [updated examples](USAGE.md#querying-pull-requests)
  for how to accomplish the same scenario.
- `Get-GitHubRepositoryNameFromUrl` and `GitHubRepositoryOwnerFromUrl` have been removed and
  functionally replaced by `Split-GitHubUri`
- `Get-GitHubRepositoryUniqueContributor` has been removed.  We have an
  [updated example](USAGE.md#querying-contributors) for how to accomplish the same scenario.
- `GitHubOrganizationRepository` has been removed.  You can now retrieve repositories for an
  organization via `Get-GitHubRepository -OrganizationName <name>`.
- `Get-GitHubAuthenticatedUser` has been replaced with `Get-GitHubUser -Current`.

Fixes Issue #34: Warning output on import is being written out twice
Fixes Issue #33: TLS error in Get-GitHubIssueForRepository : Failed to execute query with exception
Fixes Issue #26: Token in template file
Fixes Issue #24: Add a command for configuration
2018-11-13 01:49:21 -08:00