List commits
The GitHub List commits action retrieves commit history from a GitHub repository with filtering and pagination options. Use this read-only action to explore commit activity for review, audit, or debugging workflows.
The action supports filtering by owner, repository, author, committer, path, and time range (since, until), making it useful for pull request reviews, repository activity summaries, and targeted commit analysis.
Limitations
- Subject to GitHub API rate limits and Glean’s configured rate limits for the GitHub connector. On very large organizations or repositories, calls may be slower or may return errors when limits are reached.
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.
-
For custom GitHub apps, ensure required repository permissions (contents, commit statuses, issues, pull requests) are granted to read commit history.
Supported parameters
| Name | Type | Description |
|---|---|---|
| Author | String | Filter results to items authored by this user or identifier. |
| Committer | String | Filter results to items committed by this user or identifier. |
| Owner | String | Owner name of the repository or project (for example, user or organization). |
| Page | Integer | Page number of results to return (used for pagination). Default is 1. |
| Path | String | Restrict results to items that touch the given file or directory path. |
| Results per page | Integer | Number of results to include per page. Default is 1. |
| Repository | String | Repository name or project identifier under the owner. |
| SHA | String | Specific revision (for example, branch name or commit SHA) to list results from. |
| Since | String | Only include items created or updated after this timestamp (typically ISO 8601). |
| Until | String | Only include items created or updated before this timestamp (typically ISO 8601). |
Usage example
You want to review what changes a specific developer made to the authentication module in the last two weeks.
Instruction to an agent:
"Show me all commits by alice@company.com to the auth/ directory in the mycompany/backend repository from the last two weeks."
Resulting behavior:
-
Calls List commits with:
-
Ownerset to "mycompany". -
Repositoryset to "backend". -
Authorset to "alice@company.com". -
Pathset to "auth/" to filter commits touching the authentication directory. -
Sinceset to two weeks ago (for example, 2025-01-01T00:00:00Z). -
Results per pageset to 30 to retrieve a reasonable batch.
-
-
Retrieves commit data including:
-
Commit SHA and message
-
Author information
-
Commit timestamp
-
Files changed in each commit
-
Commit URL for detailed review
-
-
Presents the filtered commit history showing only Alice's changes to the auth directory.
-
User can review the commit messages and click through to see detailed diffs.
Workflow tip: Use Author to filter by developer, Path to focus on specific directories or files, and Since/Until to narrow the time range. Combine with Page and Results per page parameters for pagination when dealing with large commit histories. This is particularly useful for code reviews, security audits, and understanding recent changes to critical components.