Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation allows you to delete branch protection rules from a specific branch in a repository hosted on a Gitea server. Branch protection is typically used to enforce certain workflows or restrictions on branches, such as requiring pull request reviews or preventing force pushes. Removing branch protection can be useful when you want to relax these restrictions, for example, to allow direct commits or administrative changes.

Practical scenarios include:

  • Automating repository maintenance by removing outdated or unnecessary branch protections.
  • Integrating with CI/CD pipelines where branch protection needs to be toggled dynamically.
  • Managing multiple repositories programmatically to ensure consistent branch policies.

Properties

Name Meaning
Owner The username or organization that owns the repository.
Repo The name of the repository from which to delete branch protection.
Name The name of the protected branch whose protection should be removed.

Output

The node outputs JSON data representing the response from the Gitea API after attempting to delete the branch protection. Typically, this will confirm whether the deletion was successful or provide error details if it failed.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential to authenticate with the Gitea server.
  • The Gitea server URL must be configured in the credentials.
  • The node depends on the Gitea REST API endpoint for branch protection management.

Troubleshooting

  • Common issues:

    • Incorrect owner, repo, or branch name may cause the API call to fail.
    • Insufficient permissions for the API token can result in authorization errors.
    • Network connectivity problems with the Gitea server will prevent the operation.
  • Error messages:

    • 404 Not Found: The specified repository or branch does not exist.
    • 403 Forbidden: The API token lacks permission to modify branch protections.
    • 400 Bad Request: Invalid input parameters.

To resolve these, verify the input values, ensure the API token has appropriate scopes, and check network access to the Gitea instance.

Links and References

Discussion