Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation retrieves the list of commit statuses for a specific reference (branch, tag, or commit) in a repository hosted on a Gitea instance. It is useful for monitoring the state of continuous integration checks, deployment statuses, or other status contexts associated with a particular commit or branch.

Common scenarios include:

  • Checking the build or test status of a specific commit before merging.
  • Monitoring deployment or release statuses tied to tags.
  • Filtering statuses by their state (e.g., only errors or successes) to quickly assess the health of a codebase at a given ref.

Example: You want to fetch all "pending" CI statuses for the main branch of your repository to decide if it’s safe to proceed with a deployment.

Properties

Name Meaning
Owner The owner (user or organization) of the repository.
Repo The name of the repository.
Ref The name of the branch, tag, or commit SHA to get statuses for.
Sort How to sort 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 status objects related to the specified ref. Each status object typically includes details such as:

  • The state of the status (pending, success, error, etc.).
  • Context or description of the status.
  • Timestamps for creation and updates.
  • Target URLs or links related to the status (e.g., CI logs).
  • Other metadata relevant to the status check.

If binary data were involved (not indicated here), it would represent attachments or files related to the status, but this operation focuses on JSON status information only.

Dependencies

  • Requires connection to a Gitea API endpoint.
  • Needs an API authentication token configured in the node credentials to authorize requests.
  • The base URL for the Gitea instance must be set in the credentials.

Troubleshooting

  • Invalid Owner/Repo/Ref: If the specified repository or ref does not exist, the node will likely return an error indicating resource not found. Verify spelling and existence.
  • Authentication Errors: Missing or invalid API tokens will cause authorization failures. Ensure the API key credential is correctly configured.
  • Pagination Issues: Setting page or limit incorrectly (e.g., zero or negative values) may result in no data or errors. Use positive integers starting from 1 for pages.
  • No Statuses Returned: If no statuses match the filters (state, sort), the output will be empty. Try broadening filters or checking the ref correctness.

Links and References

Discussion