Skip to content

Create commit in new branch without creating branch beforehand #1793

Open
@brondum

Description

@brondum

Hi.

Is it possible to create a commit in a new branch without explicitly doing a client.Git.CreateRef.
When creating the remote ref before doing the commit Github creates the branch with the same commitSHA as the base branch, which causes our CI to trigger a job on the same SHA, which is just waste of time.

How i am doing it today:

  • Get ref from source branch client.Git.GetRef
  • Create new branch: client.Git.GetRef
  • Update file: client.Repositories.UpdateFile

Any ideas ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions