Get pull request action in GitHub package
- Updated: 2026/05/13
Get pull request action in GitHub package
The Get Pull Request action retrieves detailed information of the specified pull request from a GitHub repository using the pull request number. The pull request must exist within the specified repository.
Overview
The Get Pull Request action retrieves details of both open and merged pull requests. The retrieved data includes details such as the title, state, author, URL, branch, comments, additions, deletions, created date, base branch, merge status, review comments, mergeability status, changed files, commits, and merged by information of the specified pull request.
Settings
The Get Pull Request action contains the following settings:
- Session name
-
Specifies the GitHub session name that the Connect action creates. Use one of the following options to specify the session name:
- Session name: Enter the session name as text directly or select the string variable that holds the session name text.
- Variable: Select the GitHub session variable that the Connect action creates.
- Owner name
- Specifies the name of the GitHub repository owner. The owner can be an organization or a user account.
- Repository name
- Specifies the name of the GitHub repository from which the action retrieves the pull request.
- Pull request number
- Specifies the pull request number to retrieve details.
- Assign output to variable
- Specifies the variable in which the action stores the response data. The response data
includes the following fields:
title- The title of the pull request.state- The state of the pull request. The state can beopenfor open pull requests andclosedfor merged pull requests.author- The creator of the pull request.url- The HTML URL of the pull request.branch- The source branch for which the pull request is created.comments- The number of comments in the pull request.additions- The number of additions made to the code in the source branch.deletions- The number of deletions made to the code in the source branch.created- The timestamp indicating when the pull request was created.baseBranch- The target branch into which the pull request must be merged.merged- The boolean flag indicating the merge status of the pull request.reviewComments- The number of review comments in the pull request. These are the inline comments added to the files within the source branch.mergeable- The boolean indicating whether the pull request can be merged without any conflicts.changedFiles- The number of changed files in the source branch of the pull request.commits- The number of commits made in the pull request.mergedBy- The user that merged the pull request to the target branch.
Use one of the following options to assign the output:
- Multiple variables: Create and specify individual variables
to store specific response data.
Use the Add variable mapping option to specify the key and corresponding variable type to store the specific response data.
- Dictionary: Create and specify a dictionary variable to store the entire response data. You can also select an existing dictionary variable.