Forgejo icon

Forgejo

Interact with Forgejo API

Overview

This node interacts with the Forgejo API to manage branch protections within a repository. Specifically, the 'Get Protection' operation retrieves the protection settings of a specified branch in a given repository owned by a user or organization. This is useful for scenarios where you need to programmatically check branch protection rules, such as required approvals or push restrictions, to enforce or audit repository security policies.

Use Case Examples

  1. A DevOps engineer uses this node to automatically fetch branch protection settings before merging code to ensure compliance with organizational policies.
  2. A project manager integrates this node in a workflow to monitor branch protection status across multiple repositories for reporting purposes.

Properties

Name Meaning
Owner The username or organization name that owns the repository.
Repository The name of the repository containing the branch.
Branch Name The name of the branch for which to retrieve protection settings.

Output

JSON

  • json - The JSON response containing the branch protection details from the Forgejo API.

Dependencies

  • Requires an API key credential for Forgejo API authentication.

Troubleshooting

  • Ensure the 'Owner', 'Repository', and 'Branch Name' fields are correctly specified; incorrect values will result in API errors or empty responses.
  • API authentication errors may occur if the Forgejo API key credential is missing or invalid; verify credentials are properly configured.
  • If the branch does not have protection enabled, the API may return an empty or error response; verify branch protection is set up in the repository.

Links

Discussion