Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation retrieves the list of commit statuses for a specific commit in a repository hosted on a Gitea server. It is useful for monitoring the state of continuous integration (CI) checks, deployment statuses, or other automated processes linked to commits. For example, a developer can use this node to fetch all status checks for a particular commit SHA to determine if the commit passed all required tests before merging.

Properties

Name Meaning
Owner The owner (user or organization) of the repository
Repo The name of the repository
Sha The SHA hash identifier of the commit for which to list statuses
Sort The sorting order of the returned statuses. Options: Oldest, Recentupdate, Leastupdate, Leastindex, Highestindex
State Filter statuses by their state. Options: Pending, Success, Error, Failure, Warning
Page The page number of results to return (1-based)
Limit The number of results per page (page size)

Output

The output JSON contains an array of commit status objects corresponding to the specified commit SHA. Each status object typically includes details such as the state (e.g., success, failure), description, context, target URL, and timestamps. This allows users to programmatically inspect the status checks associated with a commit.

If binary data were involved (not in this case), it would be summarized accordingly, but here the output is purely JSON data representing commit statuses.

Dependencies

  • Requires connection to a Gitea instance via its API.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The base URL for the Gitea API must be set in the credentials.
  • Uses standard HTTP headers for JSON content negotiation.

Troubleshooting

  • Common issues:

    • Incorrect or missing repository owner or name will result in errors fetching statuses.
    • Invalid or expired API tokens will cause authentication failures.
    • Providing an invalid commit SHA will lead to no results or error responses.
    • Pagination parameters (page, limit) set incorrectly may yield empty or incomplete results.
  • Error messages:

    • Authentication errors usually indicate problems with the API key or permissions; verify credentials.
    • "Not Found" errors often mean the repo, owner, or commit SHA does not exist or is inaccessible.
    • Rate limiting errors from the Gitea API require waiting or adjusting request frequency.

Links and References

Discussion