github
Git functionality.
NewBranch
Bases: BaseModel
Information used to create a new Git branch.
Attributes:
Name | Type | Description |
---|---|---|
repo_path |
str
|
Local path to the git repo |
branch_name |
str
|
Name of the branch to create |
commit_msg |
str
|
Message that describes the git commit |
files |
Set[str]
|
Files included in the commit |
instruction_msg |
str
|
Message that should be displayed after the branch was pushed |
Source code in dapla_team_cli/github.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
create_branch(branch)
Create a new git branch with a set of files.
Source code in dapla_team_cli/github.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
delete_remote_branch(branch_name, repo)
Deletes a remote branch on specified repo.
Source code in dapla_team_cli/github.py
85 86 87 88 89 90 91 |
|
get_commit(sha, repo_name, gh_org=None)
Gets a commit given a sha.
Source code in dapla_team_cli/github.py
122 123 124 125 126 127 |
|
get_decoded_string_from_shell(command)
Decodes subprocess output to string.
Source code in dapla_team_cli/github.py
51 52 53 54 55 |
|
get_github_org(org_name='statisticsnorway')
Gets auth token from the environment and returns Github object.
Source code in dapla_team_cli/github.py
58 59 60 61 62 63 64 65 66 |
|
get_pr(pr_number, repo_name, gh_org=None)
Returns a PR given a PR number and a repository.
Source code in dapla_team_cli/github.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
get_repo(repo_name, gh_org=None)
Gets a repository object given a repository name.
Source code in dapla_team_cli/github.py
94 95 96 97 98 |
|