Forgejo icon

Forgejo

Interact with Forgejo API

Overview

This node interacts with the Forgejo API to create a status for a specific commit in a repository. It allows users to set the state of the commit status (e.g., pending, success, error, failure), provide a context identifier, description, and a target URL for more information. This is useful for CI/CD pipelines, code review processes, or any workflow that needs to track the status of commits programmatically.

Use Case Examples

  1. Setting a 'pending' status when a build starts.
  2. Updating the status to 'success' when tests pass.
  3. Marking a commit as 'failure' if deployment fails.

Properties

Name Meaning
Owner The username or organization that owns the repository.
Repository The name of the repository where the commit exists.
SHA The SHA hash of the commit to which the status will be applied.
Status State The state of the commit status, indicating the result or progress (pending, success, error, failure).
Context An optional string to identify the status context, such as the name of the CI system or process.
Description An optional description providing more details about the status.
Target URL An optional URL linking to more information about the status, such as build logs or deployment details.

Output

JSON

  • json
    • state - The state of the commit status as returned by the API.
    • context - The context identifier of the status.
    • description - The description of the status.
    • target_url - The target URL for more information about the status.

Dependencies

  • Requires an API key credential for Forgejo API authentication.

Troubleshooting

  • Ensure the 'owner', 'repository', and 'sha' parameters are correctly set; incorrect values will cause API errors.
  • The API may return errors if the commit SHA does not exist in the repository.
  • Network or authentication issues can cause request failures; verify the API credentials and network connectivity.

Links

  • Forgejo API Documentation - Official API documentation for Forgejo, useful for understanding available endpoints and parameters.

Discussion