Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Microsoft PowerShell wrapper for GitHub API

License

NotificationsYou must be signed in to change notification settings

microsoft/PowerShellForGitHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[GitHub version]powershellgallerydownloadsGitHub code size in bytesdownloadsCII Best Practicestweet
Build statusAzure DevOps testsAzure DevOps coverage
Help Wanted IssuesGitHub last commit

Table of Contents


Overview

This is aPowerShellmodulethat provides stateless command-line interaction and automation for theGitHub v3 API.

Embracing the benefits of PowerShell, it hasfull support for pipelining, allowing you pipe the output ofvirtually any command into any other command within the module.


What's New

Check outCHANGELOG.md to review the details of the current release as well asall past releases.


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 toIssue #70.

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


Installation

You can get latest release of the PowerShellForGitHub on thePowerShell Gallery

Install-Module-Name PowerShellForGitHub

Configuration

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

  1. Create a new API token by going tohttps://github.com/settings/tokens/new (provide a descriptionand check any appropriate scopes)
  2. CallSet-GitHubAuthentication, enter anything as the username (the username is ignored butrequired by the dialog that pops up), and paste in the API token as the password. That will besecurely cached to disk and will persist across all future PowerShell sessions.If you ever wish to clear it in the future, just callClear-GitHubAuthentication).

For automated scenarios (like GithHub Actions) where you are dynamically getting the access tokenneeded for authentication, refer toExample 2 inGet-Help Set-GitHubAuthentication -Examplesfor how to configure in a promptless fashion.

Alternatively, youcould configure PowerShell itself to always pass in a plain-text access tokento any command (by setting$PSDefaultParameterValues["*-GitHub*:AccessToken"] = "<access token>"),although keep in mind that this is insecure (any other process could access this plain-text value).

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

Get-HelpSet-GitHubConfiguration-ShowWindow

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

Set-GitHubConfiguration-DefaultOwnerName PowerShellSet-GitHubConfiguration-DefaultRepositoryName PowerShellForGitHub

Be warned that there are some commands where you may want to only ever supply the OwnerName(like if you're callingGet-GitHubRepository and want to see all the repositories ownedby 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 overridefor 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 forthe most up-to-date list!

GitHub Enterprise

To set the configuration to use a GitHub Enterprise server instead of GitHub.com, simply supplytheApiHostName parameter with the hostname of your GitHub Enterprise server.

Set-GitHubConfiguration-ApiHostName"github.contoso.com"

Usage

Example command:

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

For more example commands, please refer toUSAGE.


Developing and Contributing

Please see theContribution Guide for information on how to develop andcontribute.

If you have any problems, please consultGitHub Issuesto see if has already been discussed.

If you do not see your problem captured, please filefeedback.


Legal and Licensing

PowerShellForGitHub is licensed under theMIT license.


Governance

Governance policy for this project is describedhere.


Code of Conduct

For more info, seeCODE_OF_CONDUCT


Reporting Security Issues

Please refer toSECURITY.md.


Privacy Policy

For more information, refer to Microsoft'sPrivacy Policy.

About

Microsoft PowerShell wrapper for GitHub API

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors34


[8]ページ先頭

©2009-2025 Movatter.jp