| |
@@ -70,7 +70,10 @@
|
| |
def set_tags(self, project, params):
|
| |
# This endpoint does not exists yet
|
| |
# https://pagure.io/pagure/issue/4663
|
| |
- pass
|
| |
+ logging.warning(
|
| |
+ "The PR tag %s has not been defined due to "
|
| |
+ "https://pagure.io/pagure/issue/4663 only in Pagure >= 5.9" % (
|
| |
+ params))
|
| |
# path = '%s/tags/update' % project
|
| |
# resp = self.post(self.base_url + path, params)
|
| |
# self._manage_error(*resp)
|
| |
@@ -84,17 +87,19 @@
|
| |
config['pull_requests'] = True
|
| |
config['notify_on_pull-request_flag'] = True
|
| |
if gating:
|
| |
+ config['Minimum_score_to_merge_pull-request'] = 0
|
| |
config['open_metadata_access_to_all'] = False
|
| |
- # Cannot set 0 by the API so let's force it to -1
|
| |
- # Then https://review.opendev.org/#/c/691254/ is needed asap.
|
| |
- config['Minimum_score_to_merge_pull-request'] = -1
|
| |
client.set_tags(project, ['gateit'])
|
| |
+ # convert value https://pagure.io/pagure/issue/4712
|
| |
+ for k, v in config.items():
|
| |
+ if isinstance(v, bool):
|
| |
+ config[k] = 1 if v else 0
|
| |
client.set_config(project, config)
|
| |
logging.debug("Applying new setting set on %s" % project)
|
| |
acls = {
|
| |
'user_type': 'user',
|
| |
'name': 'zuul',
|
| |
- 'acl': 'admin'
|
| |
+ 'acl': 'commit'
|
| |
}
|
| |
client.set_acl(project, acls)
|
| |
logging.debug("Adding zuul user as admin on %s" % project)
|
| |