client.scripts.patch_sql_git

A method of the Scripts endpoint.

patch_sql_git(id: int, *, git_ref: str = None, git_branch: str = None, git_path: str = None, git_repo_url: str = None, git_ref_type: str = None, pull_from_git: bool = None) Response

Update an attached git file

API URL: PATCH /scripts/sql/{id}/git

import civis
client = civis.APIClient()
response = client.scripts.patch_sql_git(...)
Parameters:
idint

The ID of the item.

git_refstr, optional

A git reference specifying an unambiguous version of the file. Can be a branch name, or the full or shortened SHA of a commit.

git_branchstr, optional

The git branch that the file is on.

git_pathstr, optional

The path of the file in the repository.

git_repo_urlstr, optional

The URL of the git repository (e.g., https://github.com/organization/repo_name.git).

git_ref_typestr, optional

Specifies if the file is versioned by branch or tag.

pull_from_gitbool, optional

Automatically pull latest commit from git. Only works for scripts.

Returns:
civis.Response
  • git_refstr

    A git reference specifying an unambiguous version of the file. Can be a branch name, tag or the full or shortened SHA of a commit.

  • git_branchstr

    The git branch that the file is on.

  • git_pathstr

    The path of the file in the repository.

  • git_repocivis.Response
    • idint

      The ID for this git repository.

    • repo_urlstr

      The URL for this git repository.

    • created_at : str (time)

    • updated_at : str (time)

  • git_ref_typestr

    Specifies if the file is versioned by branch or tag.

  • pull_from_gitbool

    Automatically pull latest commit from git. Only works for scripts and workflows (assuming you have the feature enabled)