Repository navigation
Description
Context
The GitHub PowerShell module is used to automate repository management tasks. Pull request management is a fundamental part of GitHub workflows — listing PRs, updating their state, requesting reviewers, managing assignees, and controlling auto-merge settings.
Request
The module has no commands for interacting with pull requests. There is no way to list, create, update, merge, or manage pull requests through the module. The only workaround is shelling out to the gh CLI, which breaks consistency with the module's typed object pipeline experience.
Desired capability
Full pull request lifecycle management through PowerShell commands, covering:
- CRUD operations — create, list, get, and update pull requests
- Auto-merge — enable and disable auto-merge on pull requests
- Reviewers — request and remove pull request reviewers
- Assignees — list, check, add, and remove assignees on issues/PRs
REST API endpoints
| Function | Method | Endpoint | Documentation |
|---|---|---|---|
New-GitHubPullRequest |
POST |
/repos/{owner}/{repo}/pulls |
Create a pull request |
Get-GitHubPullRequest (list) |
GET |
/repos/{owner}/{repo}/pulls |
List pull requests |
Get-GitHubPullRequest (get) |
GET |
/repos/{owner}/{repo}/pulls/{pull_number} |
Get a pull request |
Update-GitHubPullRequest |
PATCH |
/repos/{owner}/{repo}/pulls/{pull_number} |
Update a pull request |
Enable-GitHubPullRequestAutoMerge |
GraphQL | enablePullRequestAutoMerge |
Mutation |
Disable-GitHubPullRequestAutoMerge |
GraphQL | disablePullRequestAutoMerge |
Mutation |
Add-GitHubPullRequestReviewer |
POST |
/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers |
Request reviewers |
Remove-GitHubPullRequestReviewer |
DELETE |
/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers |
Remove reviewers |
Get-GitHubAssignee |
GET |
/repos/{owner}/{repo}/assignees |
List assignees |
Test-GitHubAssignee |
GET |
/repos/{owner}/{repo}/assignees/{assignee} |
Check assignee |
Add-GitHubAssignee |
POST |
/repos/{owner}/{repo}/issues/{issue_number}/assignees |
Add assignees |
Remove-GitHubAssignee |
DELETE |
/repos/{owner}/{repo}/issues/{issue_number}/assignees |
Remove assignees |
Acceptance criteria
- Pull requests can be created, listed, retrieved, and updated
- Auto-merge can be enabled and disabled on pull requests
- Reviewers can be requested and removed
- Assignees can be listed, tested, added, and removed
- All commands follow module conventions
Related issues
- Add Get, Update, and Comment commands for pull requests #546 — Detailed implementation plan for the initial subset (Get, Update, Add-Comment)
Technical decisions
Phased implementation: This is an epic covering the full pull request API surface. The initial subset (Get, Update, Add-Comment) is tracked in #546 with a detailed implementation plan. This issue tracks the remaining scope.
Function grouping: Pull request functions go under src/functions/public/Pull-Requests/ and src/functions/private/Pull-Requests/. Assignee functions go under src/functions/public/Issues/ and src/functions/private/Issues/ since the assignee API is part of the issues endpoint.
Auto-merge uses GraphQL: The enable/disable auto-merge functionality is only available via GraphQL mutations, not REST. These functions will use Invoke-GitHubGraphQLQuery instead of Invoke-GitHubAPI.
Implementation plan
Phase 1 (tracked in #546)
-
Get-GitHubPullRequest— list and get by number -
Update-GitHubPullRequest— update state, title, body, base -
Add-GitHubPullRequestComment— post a comment on a PR
Phase 2
-
New-GitHubPullRequest— create a pull request -
Enable-GitHubPullRequestAutoMerge— GraphQL mutation -
Disable-GitHubPullRequestAutoMerge— GraphQL mutation -
Add-GitHubPullRequestReviewer— request reviewers -
Remove-GitHubPullRequestReviewer— remove requested reviewers
Phase 3 — Assignees
-
Get-GitHubAssignee— list assignees for a repo -
Test-GitHubAssignee— check if a user can be assigned -
Add-GitHubAssignee— add assignees to an issue/PR -
Remove-GitHubAssignee— remove assignees from an issue/PR
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity
[-]🚀[Feature]: Add support for `PullRequests`[/-][+]Add pull request management functions[/+]MariusStorhaug commentedon Apr 4, 2026
Restructured issue description into the standard three-section format.