Limitations
- Subject to GitHub API rate limits, along with any additional limits configured by your admin for GitHub actions.
- Can operate only on repositories and pull requests that are accessible through GitHub app installation and permissions of your organization.
- For private repositories, the GitHub app used for actions must be installed and authorized for the organization and for the specific repository. If that app is missing or not fully approved, calls to this action can return HTTP 404 Not Found even when the pull request exists.
Prerequisites
- Your admin must install and configure the GitHub connector, add the GitHub actions pack under Admin > Actions, and enable this action.
- A GitHub app must be installed on the relevant organization(s) and linked to the correct GitHub datasource in the Glean admin console.
- You must authenticate for GitHub actions so the action can run using your GitHub identity.
Supported parameters
| Parameter | Type | Description |
|---|---|---|
| Owner | String | Owner of the repository that contains the pull request. |
| Repository Name | String | Name of the repository that contains the pull request. |
| Pull Request Number | Integer | Number of the pull request to retrieve details for. |
Usage example
You want to review an important pull request that was just opened and need to see its details before deciding next steps. Instruction to an agent: “Get the details for pull request #127 in the mycompany/backend repository.” Resulting behavior:-
Calls Get a pull request with:
-
Ownerset to “mycompany”. -
Repository Nameset to “backend”. -
Pull Request Numberset to 127.
-
-
Retrieves pull request data including:
- PR title and description
- Author information
- Base and head branches
- Current state (open, closed, merged)
- List of changed files
- Commit count
- Review status and comments
- Labels and assignees
- Presents the pull request details to the user.
- User can review the information and decide whether to approve, request changes, or take other actions.
Troubleshooting
Action fails for a specific pull request
Action fails for a specific pull request
- Possible cause: The owner, repo, or pull_number values do not match an existing pull request that is available through your GitHub connector.
- Fix: Confirm that the repository is connected in Glean, the pull request exists in GitHub, and the identifiers you passed (owner, repo, pull request number) match the pull request you want to retrieve.
Action succeeds intermittently or stops working after many rapid calls
Action succeeds intermittently or stops working after many rapid calls
- Possible cause: You are hitting GitHub API rate limits.
- Fix: Reduce how frequently the action is called or stagger calls across workflows. If this keeps happening, contact your Glean admin to review configuration and usage.
Action appears unavailable or you see an authentication or permission error
Action appears unavailable or you see an authentication or permission error
404 Not Found error when trying to fetch a pull request
404 Not Found error when trying to fetch a pull request
- Possible cause: The GitHub app used for actions is not installed or not authorized for the organization or for the specific (often private) repository, even though the pull request exists.
- Fix: Verify that the correct GitHub app for actions is installed and approved at the organization level and has access to the target repository. After updating the app configuration, re-authenticate for GitHub actions and retry.
FAQs
Can this action read private pull requests?
Can this action read private pull requests?
Yes, as long as the GitHub app used for actions is installed and authorized for your organization and has access to the private repository.
Who runs this action in GitHub?
Who runs this action in GitHub?
The action runs using the identity that authenticated for GitHub actions. Make sure that identity has permission to view the target repository and pull request.