Get a commit
GitHub get a commit action retrieves details for a specific commit in a GitHub repository. This is a read-only action that returns commit metadata including author, committer, message, file changes, and parent commit references.
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.
-
The GitHub app must have read permissions to repository contents and metadata.
Supported parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Owner | String | Yes | The account owner of the repository (case-insensitive). |
| Repository | String | Yes | The name of the repository without the .git extension (case-insensitive). |
| Branch or commit | String | Yes | The branch name, tag, or commit SHA to retrieve (e.g., "main", "v1.0.0", or full SHA). |
| Page | Integer | No | Page number for paginated file listings in the commit diff (default is 1). |
| Results per page | Integer | No | Number of files per page in the commit diff (default is 30, maximum is 100). |
Usage examples
-
"Show me the details of the most recent commit on the 'main' branch of the 'octocat/Hello-World' repository."
-
"Get information about commit SHA 'abc123def456' in the 'facebook/react' repository."
-
"What files were changed in the latest commit on the 'develop' branch of 'microsoft/vscode'?"