Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def create(self, match, users=None, groups=None, keys=None,
restriction_type=RestrictionType.READ_ONLY,
matcher_type=Matcher.PATTERN):
"""
Restrict a branch, or set of branches defined by a pattern,
to a set of users, groups, and access keys.
Note: access keys need to be specified by their numerical id. labels are
not accepted.
"""
data = Restriction.request_data(match, users, groups, keys,
restriction_type, matcher_type)
return self._client.post(self.url(""), data=data)