Actions73
- Repository Actions
- Issue Actions
- Pull Request Actions
- User Actions
- Organization Actions
- Release Actions
- Webhook Actions
- Branch Actions
- Commit Actions
- Tag Actions
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
- A DevOps engineer uses this node to automatically fetch branch protection settings before merging code to ensure compliance with organizational policies.
- 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
- Forgejo API Documentation - Official API documentation for Forgejo, including branch protection endpoints.