Microsoft PowerShell wrapper for GitHub API
Перейти к файлу
Howard Wolosky 35b3d51ce7 Fixing PSScriptAnalyzer error for Test-GitHubOrganizationMember
Was failing on PSUseOutputTypeCorrectly:
  The cmdlet 'Test-GitHubOrganizationMember' returns an object of type 'System.Boolean'
  but this type is not declared in the OutputType attribute.
2019-03-15 04:11:01 -07:00
Tests Fix Milestones.tests due_on DateTime issue 2019-01-17 14:50:29 -08:00
.gitignore Module restructure to v0.2.0 2018-11-13 01:49:21 -08:00
CHANGELOG.md Updating module to 0.6.4 2019-01-16 12:48:46 -08:00
CODE_OF_CONDUCT.md Module restructure to v0.2.0 2018-11-13 01:49:21 -08:00
CONTRIBUTING.md Updating module to 0.6.2 2018-12-13 22:04:49 -08:00
GOVERNANCE.md Module restructure to v0.2.0 2018-11-13 01:49:21 -08:00
GitHubAnalytics.ps1 Fix all string parameters to be CamelCased and avoid abbreviation 2019-01-03 15:27:54 -08:00
GitHubAssignees.ps1 Add support for assignee APIs (#54) 2018-11-30 14:47:14 -08:00
GitHubBranches.ps1 Update helper methods to grab appropriate default values from previous scope (#52) 2018-11-19 13:07:05 -08:00
GitHubComments.ps1 Add ability to specify a MediaType for issues (#83) 2019-01-16 11:18:24 -08:00
GitHubConfiguration.ps1 Add `LogRequestBody` configuration option to make development debugging easier (#60) 2018-12-04 20:06:34 -08:00
GitHubCore.ps1 Update Split-GitHubUri to work with the `api.github.com` URI's as well 2019-02-07 10:50:10 -08:00
GitHubEvents.ps1 Minor updates for recent Events PR 2018-12-11 08:27:28 -08:00
GitHubIssues.ps1 Add ability to specify a MediaType for issues (#83) 2019-01-16 11:18:24 -08:00
GitHubLabels.ps1 Add support for issue labels (#59) 2018-12-13 07:21:15 -08:00
GitHubMilestones.ps1 Fix all string parameters to be CamelCased and avoid abbreviation 2019-01-03 15:27:54 -08:00
GitHubMiscellaneous.ps1 Fix all string parameters to be CamelCased and avoid abbreviation 2019-01-03 15:27:54 -08:00
GitHubOrganizations.ps1 Fixing PSScriptAnalyzer error for Test-GitHubOrganizationMember 2019-03-15 04:11:01 -07:00
GitHubPullRequests.ps1 Fix all string parameters to be CamelCased and avoid abbreviation 2019-01-03 15:27:54 -08:00
GitHubRepositories.ps1 Fix all string parameters to be CamelCased and avoid abbreviation 2019-01-03 15:27:54 -08:00
GitHubRepositoryForks.ps1 Fix all string parameters to be CamelCased and avoid abbreviation 2019-01-03 15:27:54 -08:00
GitHubRepositoryTraffic.ps1 Fix all string parameters to be CamelCased and avoid abbreviation 2019-01-03 15:27:54 -08:00
GitHubTeams.ps1 Add Test-GitHubOrganizationMember 2019-03-15 04:05:17 -07:00
GitHubUsers.ps1 Fix all string parameters to be CamelCased and avoid abbreviation 2019-01-03 15:27:54 -08:00
Helpers.ps1 Prevent `ConvertTo-SmarterObject` from flattening arrays (#56) 2018-11-30 11:26:13 -08:00
LICENSE Updating license 2016-07-26 13:36:21 -07:00
NugetTools.ps1 Improve robustness of `Get-NugetPackageDllPath` to file access issues 2018-11-14 13:47:11 -08:00
PowerShellForGitHub.psd1 Add Test-GitHubOrganizationMember 2019-03-15 04:05:17 -07:00
PowerShellForGitHub.psm1 Prevent `ConvertTo-SmarterObject` from flattening arrays (#56) 2018-11-30 11:26:13 -08:00
README.md Updating module to 0.6.0 2018-12-13 07:39:42 -08:00
Telemetry.ps1 Update helper methods to grab appropriate default values from previous scope (#52) 2018-11-19 13:07:05 -08:00
USAGE.md Fix all string parameters to be CamelCased and avoid abbreviation 2019-01-03 15:27:54 -08:00
appveyor.yml Module restructure to v0.2.0 2018-11-13 01:49:21 -08:00

README.md

PowerShellForGitHub PowerShell Module

[GitHub version] Build status

Table of Contents


Overview

This is a PowerShell module that provides command-line interaction and automation for for the GitHub v3 API.


Current API Support

At present, this module can:

Development is ongoing, with the goal to add broad support for the entire API set.

For a comprehensive look at what work is remaining to be API Complete, refer to Issue #70.

Review examples to see how the module can be used to accomplish some of these tasks.


Installation

You can get latest release of the PowerShellForGitHub on the PowerShell Gallery

Install-Module -Name PowerShellForGitHub

Configuration

To avoid severe API rate limiting by GitHub, you should configure the module with your own personal access token.

  1. Create a new API token by going to https://github.com/settings/tokens/new (provide a description and check any appropriate scopes)
  2. Call Set-GitHubAuthentication, enter anything as the username (the username is ignored but required by the dialog that pops up), and paste in the API token as the password. That will be securely cached to disk and will persist across all future PowerShell sessions. If you ever wish to clear it in the future, just call Clear-GitHubAuthentication).

A number of additional configuration options exist with this module, and they can be configured for just the current session or to persist across all future sessions with Set-GitHubConfiguration. For a full explanation of all possible configurations, run the following:

Get-Help Set-GitHubConfiguration -ShowWindow

For example, if you tend to work on the same repository, you can save yourself a lot of typing by configuring the default OwnerName and/or RepositoryName that you work with. You can always override these values by expicitly providing a value for the paramater in an individual command, but for the common scenario, you'd have less typing to do.

Set-GitHubConfiguration -DefaultOwnerName PowerShell
Set-GitHubConfiguration -DefaultRepositoryName PowerShellForGitHub

Be warned that there are some commands where you may want to only ever supply the OwnerName (like if you're calling Get-GitHubRepository and want to see all the repositories owned by a particular user, as opposed to getting a single, specific repository). In cases like that, you'll need to explicitly pass in $null as the relevant parameter value as a temporary override for your default if you've set a default for one (or both) of these values.

There are more great configuration options available. Just review the help for that command for the most up-to-date list!


Usage

Example command:

$issues = Get-GitHubIssue -Uri 'https://github.com/PowerShell/PowerShellForGitHub'

For more example commands, please refer to USAGE.


Developing and Contributing

Please see the Contribution Guide for information on how to develop and contribute.

If you have any problems, please consult GitHub Issues to see if has already been discussed.

If you do not see your problem captured, please file feedback.


PowerShellForGitHub is licensed under the MIT license.


Governance

Governance policy for this project is described here.


Code of Conduct

For more info, see CODE_OF_CONDUCT


Privacy Policy

For more information, refer to Microsoft's Privacy Policy.