{"id":21071693,"url":"https://github.com/pcgeek86/psgithub","last_synced_at":"2025-04-13T06:37:40.196Z","repository":{"id":5823377,"uuid":"54005887","full_name":"pcgeek86/PSGitHub","owner":"pcgeek86","description":"This PowerShell module contains commands to manage GitHub through its REST API.","archived":false,"fork":false,"pushed_at":"2022-03-16T01:03:41.000Z","size":1013,"stargazers_count":189,"open_issues_count":9,"forks_count":37,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-26T23:06:54.150Z","etag":null,"topics":["github","powershell"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pcgeek86.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-16T06:16:14.000Z","updated_at":"2025-02-09T21:32:59.000Z","dependencies_parsed_at":"2022-08-30T02:30:22.765Z","dependency_job_id":null,"html_url":"https://github.com/pcgeek86/PSGitHub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcgeek86%2FPSGitHub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcgeek86%2FPSGitHub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcgeek86%2FPSGitHub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pcgeek86%2FPSGitHub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pcgeek86","download_url":"https://codeload.github.com/pcgeek86/PSGitHub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675355,"owners_count":21143763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","powershell"],"created_at":"2024-11-19T18:53:57.295Z","updated_at":"2025-04-13T06:37:40.176Z","avatar_url":"https://github.com/pcgeek86.png","language":"PowerShell","readme":"# PSGitHub\n\n[![powershellgallery](https://img.shields.io/powershellgallery/v/PSGitHub.svg)](https://www.powershellgallery.com/packages/PSGitHub)\n[![downloads](https://img.shields.io/powershellgallery/dt/PSGitHub.svg?label=downloads)](https://www.powershellgallery.com/packages/PSGitHub)\n[![build](https://ci.appveyor.com/api/projects/status/github/pcgeek86/PSGitHub?branch=master\u0026svg=true)](https://ci.appveyor.com/project/pcgeek86/psgithub)\n[![chat](https://badges.gitter.im/pcgeek86/PSGitHub.svg)](https://gitter.im/pcgeek86/PSGitHub?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nPowerShell module with commands to query and manage GitHub through its REST API.\n\n## Installation\n\n![Install PSGitHub](https://raw.githubusercontent.com/pcgeek86/PSGitHub/master/Assets/psgithub.svg)\n\nYou can install the PSGitHub PowerShell module using one of the following methods.\n\n1. Install from the PowerShell Gallery (requires PowerShell 5.0+)\n   ```powershell\n   Install-Module PSGitHub\n   ```\n2. Copy-install the module to your `$env:PSModulePath`\n3. Extract the module anywhere on the filesystem, and import it explicitly, using `Import-Module`\n\n## Setup\n\nTo access private repositories, make changes and have a higher rate limit,\n[create a GitHub token](https://github.com/settings/tokens/new). This token can be provided to all PSGitHub\nfunctions as a `SecureString` through the `-Token` parameter. You can set a default token to be used by\nchanging `$PSDefaultParameterValues` in your `profile.ps1`:\n\n### On Windows\n\n```powershell\n$PSDefaultParameterValues['*GitHub*:Token'] = 'YOUR_ENCRYPTED_TOKEN' | ConvertTo-SecureString\n```\n\nTo get the value for `YOUR_ENCRYPTED_TOKEN`, run `Read-Host -AsSecureString | ConvertFrom-SecureString` once\nand paste in your token.\n\n### On macOS/Linux\n\nmacOS and Linux do not have access to the Windows Data Protection API, so they cannot use\n`ConvertFrom-SecureString` to generate an encrypted plaintext version of the token without a custom encryption\nkey.\n\nIf you are not concerned about storing the token in plain text in the `profile.ps1`, you can set it like this:\n\n```powershell\n$PSDefaultParameterValues['*GitHub*:Token'] = 'YOUR_PLAINTEXT_TOKEN' | ConvertTo-SecureString -AsPlainText -Force\n```\n\nAlternatively, you could store the token in a password manager or the Keychain, then retrieve it in your\nprofile and set it the same way.\n\n## Features\n\n### Included Cmdlets\n\n\u003c!--\nGenerate rows with\n\nGet-Command -Name *-GitHub* -CommandType Function | Group-Object -Property { ($_.Name -split '-')[1] } | ForEach-Object { \"| $(($_.Group | ForEach-Object { ($_.Name -split '-')[0] }) -join ', ') | $($_.Name -replace 'GitHub','') |\" }\n--\u003e\n\n| Supported Verbs                | GitHub Resource      |\n| ------------------------------ | -------------------- |\n| Add, Get                       | Assignee             |\n| Get                            | CombinedCommitStatus |\n| Get, New                       | Comment              |\n| Start                          | Fork                 |\n| Get, New, Remove, Save, Update | Gist                 |\n| Remove                         | GitRef               |\n| Find, Get, New, Update         | Issue                |\n| Get                            | IssueTimeline        |\n| Find, Get, New, Remove, Update | Label                |\n| Get                            | License              |\n| Get                            | Milestone            |\n| Get                            | Organization         |\n| Get                            | Project              |\n| Get, Move, New                 | ProjectCard          |\n| Get                            | ProjectColumn        |\n| Get, Merge, New                | PullRequest          |\n| Get                            | PullRequestFile      |\n| Get                            | RateLimit            |\n| Get, New                       | Release              |\n| Get, New, Remove               | ReleaseAsset         |\n| Find, Get, New, Remove         | Repository           |\n| New, Submit                    | Review               |\n| New                            | ReviewRequest        |\n| Get                            | Team                 |\n| Get                            | TeamMember           |\n| Set                            | Token                |\n| Find, Get, Update              | User                 |\n\n### Pretty Formatting\n\nPSGitHub includes pretty, colored output formatting. Different views are available when piping to different\n`Format-*` cmdlets (`Format-Table`, `Format-List`, `Format-Custom` and `Format-Wide`) and specifying the\n`-View` parameter. Markdown in issue bodies and comments is highlighted as well.\n\n#### Issues \u0026 Pull Requests\n\n##### `Format-Table` (default)\n\n![Screenshot of Issue Table View](./Screenshots/Issue-Table.svg)\n\n##### `Format-Custom`\n\n![Screenshot of Issue Custom View](./Screenshots/Issue-Custom.svg)\n\n##### `Format-List -View Full`\n\nIncludes colored labels and rendered markdown.\n\n![Screenshot of PullRequest List Full View](./Screenshots/PullRequest-List-Full.svg)\n\n#### Milestones\n\n![Screenshot of Milestone Table View](./Screenshots/Milestone-Table.svg)\n\n#### Labels\n\n![Screenshot of Label Table View](./Screenshots/Label-Table.svg)\n\nLabels also support `Format-Wide`.\n\n#### Commit Statuses\n\n![Screenshot of CombinedCommitStatus List View](./Screenshots/CombinedCommitStatus-List.svg)\n\n### Autocompletion\n\nThere is autocompletion for almost all parameters, namely `-Owner`, `-RepositoryName`, `-Number` (issue\nnumbers), `-Label`, `-Assignee`, `-MilestoneName`. Search keywords in `Find-Github*` queries also have\nautocompletion.\n\n![Screenshot of issue autocompletion](./Screenshots/Issue-Completion.svg)\n\n### Pipeline Support\n\nAll cmdlets have pipeline support. This means you can take the output of one cmdlet like `Find-GitHubIssue`\nand pipe it into another like `Update-GitHubIssue`.\n\n```powershell\n# Close all wont-fix issues\nFind-GitHubIssue \"is:open label:wont-fix\" | Update-GitHubIssue -State closed\n```\n\nPSGitHub is also designed to interoperate with [PowerGit](https://github.com/felixfbecker/PowerGit). This\nmeans for example that you can pipe a PowerGit branch object into `New-GitHubPullRequest` to open a new pull\nrequest from that branch (`Get-GitHubPullRequest` and `Merge-GitHubPullRequest` work equally). At the minimum,\npiping any PowerGit object (repository, branch, commit, remote, etc) will fill the `-Owner` and\n`-RepositoryName` parameters.\n\n```powershell\n# Opening a new PR for a new branch\nNew-GitBranch my-branch | Send-GitObject | New-GitHubPullRequest\n\n# Merging the PR of the current branch\nGet-GitHead | Merge-GitHubPullRequest -WaitForStatusChecks\n\n# Clone a GitHub repository\nGet-GitHubRepository -RepositoryName foo | Copy-GitRepository\n```\n\n### Pagination\n\nPagination is automatic. Every cmdlet that queries collections will keep making requests for new pages and\nemit objects until the end is reached. To limit the number of results, pipe to `Select-Object -First`.\n\n### Types\n\nAll objects returned are raw GitHub API responses, however with assigned TypeNames, which have Types.ps1xml\nfiles. They are extended with several additional properties, for example aliasing all snake_cased properties\nto PascalCase for consistency with PowerShell naming conventions.\n\n## Contributing\n\n### SVG Screenshots\n\nSVG Screenshots are created with [term2svg](https://github.com/nbedos/termtosvg)\n\n```powershell\ntermtosvg ./Screenshots/frames -s -g 100x12 -t base16_default_dark -c 'pwsh -NoExit -Command clear'\n```\n\n`-s` outputs still .svg frames. Always use the `base16_default_dark` theme for consistency. Keep the column\nwidth at 100 for best readability in the README (resize your terminal to match the width). If 12 is not enough\nthe row height should be matched to the output of the command. Execute your command, then execute `exit`. Pick\nthe frame that shows the command output but does not show the next prompt.\n\n## Issues\n\nPlease report issues in the GitHub Issue Tracker.\n\n## Contributors\n\nThis module was originally developed by Trevor Sullivan. You can contact Trevor using one of the following\nmethods:\n\n- E-mail: trevor@trevorsullivan.net\n- Website: https://trevorsullivan.net\n- Twitter: [@pcgeek86](https://twitter.com/pcgeek86)\n- GitHub: [@pcgeek86](https://github.com/pcgeek86)\n\n### Core Contributors\n\n- Felix Becker\n  - Twitter: [@felixfbecker](https://twitter.com/felixfbecker)\n  - GitHub: [@felixfbecker](https://github.com/felixfbecker)\n- Thomas Malkewitz\n  - Skype: thomasmalkewitz\n  - Twitter: [@dotps1](https://twitter.com/dotps1)\n  - Website: https://dotps1.github.io\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcgeek86%2Fpsgithub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpcgeek86%2Fpsgithub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpcgeek86%2Fpsgithub/lists"}