Merge "Enable whitelisted-orgs-as-admins for ghprb trigger"
This commit is contained in:
commit
e499da1945
@ -676,6 +676,8 @@ def github_pull_request(parser, xml_parent, data):
|
|||||||
:arg list admin-list: the users with admin rights (optional)
|
:arg list admin-list: the users with admin rights (optional)
|
||||||
:arg list white-list: users whose pull requests build (optional)
|
:arg list white-list: users whose pull requests build (optional)
|
||||||
:arg list org-list: orgs whose users should be white listed (optional)
|
:arg list org-list: orgs whose users should be white listed (optional)
|
||||||
|
:arg bool allow-whitelist-orgs-as-admins: members of white listed orgs
|
||||||
|
will have admin rights. (default false)
|
||||||
:arg string cron: cron syntax of when to run (optional)
|
:arg string cron: cron syntax of when to run (optional)
|
||||||
:arg string trigger-phrase: when filled, commenting this phrase
|
:arg string trigger-phrase: when filled, commenting this phrase
|
||||||
in the pull request will trigger a build (optional)
|
in the pull request will trigger a build (optional)
|
||||||
@ -701,6 +703,8 @@ def github_pull_request(parser, xml_parent, data):
|
|||||||
XML.SubElement(ghprb, 'spec').text = data.get('cron', '')
|
XML.SubElement(ghprb, 'spec').text = data.get('cron', '')
|
||||||
admin_string = "\n".join(data.get('admin-list', []))
|
admin_string = "\n".join(data.get('admin-list', []))
|
||||||
XML.SubElement(ghprb, 'adminlist').text = admin_string
|
XML.SubElement(ghprb, 'adminlist').text = admin_string
|
||||||
|
XML.SubElement(ghprb, 'allowMembersOfWhitelistedOrgsAsAdmin').text = str(
|
||||||
|
data.get('allow-whitelist-orgs-as-admins', False)).lower()
|
||||||
white_string = "\n".join(data.get('white-list', []))
|
white_string = "\n".join(data.get('white-list', []))
|
||||||
XML.SubElement(ghprb, 'whitelist').text = white_string
|
XML.SubElement(ghprb, 'whitelist').text = white_string
|
||||||
org_string = "\n".join(data.get('org-list', []))
|
org_string = "\n".join(data.get('org-list', []))
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<spec>* * * * *</spec>
|
<spec>* * * * *</spec>
|
||||||
<adminlist>user1
|
<adminlist>user1
|
||||||
user2</adminlist>
|
user2</adminlist>
|
||||||
|
<allowMembersOfWhitelistedOrgsAsAdmin>true</allowMembersOfWhitelistedOrgsAsAdmin>
|
||||||
<whitelist>user3
|
<whitelist>user3
|
||||||
user4</whitelist>
|
user4</whitelist>
|
||||||
<orgslist>org1
|
<orgslist>org1
|
||||||
|
@ -15,6 +15,7 @@ triggers:
|
|||||||
github-hooks: true
|
github-hooks: true
|
||||||
permit-all: false
|
permit-all: false
|
||||||
auto-close-on-fail: false
|
auto-close-on-fail: false
|
||||||
|
allow-whitelist-orgs-as-admins: true
|
||||||
white-list-target-branches:
|
white-list-target-branches:
|
||||||
- master
|
- master
|
||||||
- testing
|
- testing
|
||||||
|
Loading…
Reference in New Issue
Block a user