branchRestrictions
BranchRestriction
Bases: BitbucketCloudBase
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/branchRestrictions.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
|
branch_match_kind
property
The branch restriction match kind
branch_type
property
The branch restriction type
groups
property
The branch restriction groups
id
property
The branch restriction id
kind
property
The branch restriction kind
pattern
property
The branch restriction pattern
users
property
The branch restriction users
value
property
The branch restriction value
delete()
Delete the branch restriction.
:return: The response on success
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/branch-restrictions/%7Bid%7D#delete
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/branchRestrictions.py
127 128 129 130 131 132 133 134 135 |
|
update(**kwargs)
Update the branch restriction properties. Fields not present in the request body are ignored.
:param kwargs: dict: The data to update.
:return: The updated branch restriction
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/branch-restrictions/%7Bid%7D#put
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/branchRestrictions.py
115 116 117 118 119 120 121 122 123 124 125 |
|
BranchRestrictions
Bases: BitbucketCloudBase
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/branchRestrictions.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
create(kind, branch_match_kind='glob', branch_pattern='*', branch_type=None, users=None, groups=None, value=None)
Add a new branch restriction.
:param value: :param kind: string: One of require_tasks_to_be_completed, force, restrict_merges, enforce_merge_checks, require_approvals_to_merge, delete, require_all_dependencies_merged, push, require_passing_builds_to_merge, reset_pullrequest_approvals_on_change, require_default_reviewer_approvals_to_merge :param branch_match_kind: string: branching_model or glob, if branching_model use param branch_type otherwise branch_pattern. :param branch_pattern: string: A glob specifying the branch this restriction should apply to (supports * as wildcard). :param branch_type: string: The branch type specifies the branches this restriction should apply to. One of: feature, bugfix, release, hotfix, development, production. :param users: List: List of user objects that are excluded from the restriction. Minimal: {"username": "
:return: The created BranchRestriction object
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/branch-restrictions#post
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/branchRestrictions.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
each(kind=None, pattern=None, q=None, sort=None)
Returns the list of branch restrictions in this repository.
:param kind: string: Branch restrictions of this type :param pattern: string: Branch restrictions applied to branches of this pattern :param q: string: Query string to narrow down the response. See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details. :param sort: string: Name of a response property to sort results. See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details.
:return: A generator for the BranchRestriction objects
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/branch-restrictions#get
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/branchRestrictions.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
get(id)
Returns the branch restriction with the ID in this repository.
:param id: string: The requested issue ID
:return: The requested BranchRestriction objects
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/branch-restrictions/%7Bid%7D#get
Source code in server/vendor/atlassian/bitbucket/cloud/repositories/branchRestrictions.py
98 99 100 101 102 103 104 105 106 107 108 |
|