Gitea icon

Gitea

Interact with Gitea via API

Actions393

Overview

This node operation updates the branch protection priorities for a repository in Gitea, a self-hosted Git service. It allows users to specify the order or priority of branch protection rules by providing their IDs. This is useful for repository administrators who want to manage and enforce branch protection policies systematically, ensuring that certain branches have higher precedence in protection settings.

Practical examples include:

  • Reordering branch protection rules after adding new ones.
  • Prioritizing critical branches like main or release to have stricter protections.
  • Automating branch protection management as part of CI/CD workflows.

Properties

Name Meaning
Owner The owner (user or organization) of the repository where branch protection priorities will be updated.
Repo The name of the repository to update branch protection priorities for.
Ids A JSON array containing the IDs of the branch protection rules in the desired priority order.

Output

The node outputs JSON data representing the result of the update operation. This typically includes confirmation of the updated priorities or details of the branch protection rules after reordering. There is no indication of binary data output.

Dependencies

  • Requires an API key credential for authenticating with the Gitea instance.
  • Needs the base URL of the Gitea server configured in the credentials.
  • Depends on the Gitea REST API endpoint /api/v1 for branch protection management.

Troubleshooting

  • Invalid or missing repository owner/repo: Ensure the "Owner" and "Repo" fields are correctly set to existing values in your Gitea instance.
  • Malformed JSON in Ids: The "Ids" property must be a valid JSON array of branch protection rule IDs. Invalid JSON will cause request failures.
  • Authentication errors: Verify that the API key credential is valid and has sufficient permissions to modify branch protection settings.
  • API endpoint errors: If the Gitea server URL is incorrect or unreachable, the node will fail to connect.

Links and References

Discussion