Skip to main content

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

ParameterTypeRequiredDescription
OwnerStringYesThe account owner of the repository (case-insensitive).
RepositoryStringYesThe name of the repository without the .git extension (case-insensitive).
Branch or commitStringYesThe branch name, tag, or commit SHA to retrieve (e.g., "main", "v1.0.0", or full SHA).
PageIntegerNoPage number for paginated file listings in the commit diff (default is 1).
Results per pageIntegerNoNumber 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'?"

Troubleshooting

FAQs