gitea: define Atlas contributor units
This commit is contained in:
parent
53a090d3f5
commit
ec5c931c84
@ -2,7 +2,7 @@
|
|||||||
apiVersion: batch/v1
|
apiVersion: batch/v1
|
||||||
kind: Job
|
kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
name: gitea-atlas-identity-bootstrap-1
|
name: gitea-atlas-identity-bootstrap-2
|
||||||
namespace: gitea
|
namespace: gitea
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: gitea
|
app.kubernetes.io/name: gitea
|
||||||
|
|||||||
@ -16,6 +16,7 @@ hermes_email=hermes-automation@bstein.dev
|
|||||||
organization=atlas
|
organization=atlas
|
||||||
owner_user=bstein
|
owner_user=bstein
|
||||||
contributor_team=Contributors
|
contributor_team=Contributors
|
||||||
|
contributor_units='["repo.actions","repo.packages","repo.code","repo.issues","repo.wiki","repo.pulls","repo.releases","repo.projects"]'
|
||||||
|
|
||||||
die() {
|
die() {
|
||||||
echo "Gitea Atlas identity bootstrap failed: $*" >&2
|
echo "Gitea Atlas identity bootstrap failed: $*" >&2
|
||||||
@ -180,7 +181,7 @@ rm -f "${response_file}"
|
|||||||
expect_status "${status}" 204 "add ${owner_user} to Atlas owners"
|
expect_status "${status}" 204 "add ${owner_user} to Atlas owners"
|
||||||
|
|
||||||
response_file=$(mktemp)
|
response_file=$(mktemp)
|
||||||
status=$(api_request POST "/orgs/${organization}/teams" "{\"name\":\"${contributor_team}\",\"description\":\"Atlas automation contributors\",\"permission\":\"write\",\"includes_all_repositories\":true,\"can_create_org_repo\":false}" "${response_file}")
|
status=$(api_request POST "/orgs/${organization}/teams" "{\"name\":\"${contributor_team}\",\"description\":\"Atlas automation contributors\",\"permission\":\"write\",\"includes_all_repositories\":true,\"can_create_org_repo\":false,\"units\":${contributor_units}}" "${response_file}")
|
||||||
rm -f "${response_file}"
|
rm -f "${response_file}"
|
||||||
case "${status}" in
|
case "${status}" in
|
||||||
201|422) ;;
|
201|422) ;;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user