Skip to main content

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

NameTypeDescription
AuthorStringFilter results to items authored by this user or identifier.
CommitterStringFilter results to items committed by this user or identifier.
OwnerStringOwner name of the repository or project (for example, user or organization).
PageIntegerPage number of results to return (used for pagination). Default is 1.
PathStringRestrict results to items that touch the given file or directory path.
Results per pageIntegerNumber of results to include per page. Default is 1.
RepositoryStringRepository name or project identifier under the owner.
SHAStringSpecific revision (for example, branch name or commit SHA) to list results from.
SinceStringOnly include items created or updated after this timestamp (typically ISO 8601).
UntilStringOnly 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:

    • Owner set to "mycompany".

    • Repository set to "backend".

    • Author set to "alice@company.com".

    • Path set to "auth/" to filter commits touching the authentication directory.

    • Since set to two weeks ago (for example, 2025-01-01T00:00:00Z).

    • Results per page set 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.

Troubleshooting

FAQs