looker-open-source / pylookml

A pythonic api for automatic lookml
https://pylookml.readthedocs.io/en/latest/introduction.html
MIT License
45 stars 23 forks source link

function to create a new branch on origin #51

Open russlooker opened 3 years ago

russlooker commented 3 years ago
proj = lookml.Project(
        repo=GIT_REPO,
        access_token=GIT_ACCESS_TOKEN,
        looker_host='https://example.looker.com/',
        looker_project_name = LOOKER_PROJECT,
        branch = GIT_BRANCH
      )
sb = proj._git_connection.get_branch('master')
proj._git_connection.create_git_ref(ref='refs/heads/' + GIT_BRANCH, sha=sb.commit.sha)

wrap those last two lines in a project method