diff --git a/services/gitea/atlas-identity-bootstrap-job.yaml b/services/gitea/atlas-identity-bootstrap-job.yaml index 507774202..d452bc883 100644 --- a/services/gitea/atlas-identity-bootstrap-job.yaml +++ b/services/gitea/atlas-identity-bootstrap-job.yaml @@ -2,7 +2,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: gitea-atlas-identity-bootstrap-1 + name: gitea-atlas-identity-bootstrap-2 namespace: gitea labels: app.kubernetes.io/name: gitea diff --git a/services/gitea/scripts/gitea_atlas_identity_ensure.sh b/services/gitea/scripts/gitea_atlas_identity_ensure.sh index 554f09c8d..cbfe61ca4 100644 --- a/services/gitea/scripts/gitea_atlas_identity_ensure.sh +++ b/services/gitea/scripts/gitea_atlas_identity_ensure.sh @@ -16,6 +16,7 @@ hermes_email=hermes-automation@bstein.dev organization=atlas owner_user=bstein contributor_team=Contributors +contributor_units='["repo.actions","repo.packages","repo.code","repo.issues","repo.wiki","repo.pulls","repo.releases","repo.projects"]' die() { 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" 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}" case "${status}" in 201|422) ;;