Skip to content

Public API: Create branch #8213

@Meldiron

Description

@Meldiron

Describe the feature

Similar to ability to List branches which shows branch name and commit details, let's have Create branch, to have better feature parity with industry standard.

This is pretty-much request equal to issue #8209 but instead of focusing on tags, this focuses on branches.

Describe the solution you'd like

New API endpoint POST /api/v1/repos/{owner}/{repo}/branches with payload of tag's name (string) and commit's hash (string)

Describe alternatives you've considered

Cloning repository, and using CLI to do those actions locally, then push them to remote.

Works, but introduces need to execute bash commands on backend server, which is always security concern. Having official API for this will make me sleep better at night 😅

Additional context

Before creating PR for this, I will wait for maintaner response on issue regarding similar feature for tags ( #8209 ) and relevant pull request ( #8212 )

Since solutions will be almost identical, best to first merge tags, and then copy the solution to branches.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    🎯 featureCategorizes as related to a new feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions