Skip to content

Commit

Permalink
feat: add configuration for teams
Browse files Browse the repository at this point in the history
  • Loading branch information
netomi committed Dec 31, 2024
1 parent 00e2181 commit 4d6f5ba
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [0.13.0] - 2024/12/31

### Added

- Added configuration for teams.

## [0.12.0] - 2024/12/20

### Added
Expand Down
24 changes: 24 additions & 0 deletions otterdog-defaults.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,17 @@ local newOrgRole(name) = {
base_role: "none",
};

# Function to create a new team with default settings.
local newTeam(name) = {
name: name,
description: "",
privacy: "visible",
notifications: true,
members: [],
skip_members: false,
skip_non_organization_members: true,
};

# Function to create a new environment with default settings.
local newEnvironment(name) = {
name: name,
Expand Down Expand Up @@ -386,6 +397,18 @@ local newOrg(name, id) = {
# organization roles
roles: [],

# organization teams
teams: [
newTeam('eclipsefdn-releng') {
description: "This team is composed of members of Eclipse Foundation Release Engineering Team staff members. They don't have write permissions to the project repositories.",
skip_members: true,
},
newTeam('eclipsefdn-security') {
description: "This team is composed of members of Eclipse Foundation Security Team staff members (https://eclipse.org/security/team.php). They don't have write permissions to the project repositories.",
skip_members: true,
},
],

# organization secrets
secrets: [],

Expand Down Expand Up @@ -463,6 +486,7 @@ local newOrg(name, id) = {
{
newOrg:: newOrg,
newOrgRole:: newOrgRole,
newTeam:: newTeam,
newOrgWebhook:: newOrgWebhook,
newOrgSecret:: newOrgSecret,
newOrgVariable:: newOrgVariable,
Expand Down
13 changes: 13 additions & 0 deletions validate-team.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# *******************************************************************************
# Copyright (c) 2024 Eclipse Foundation and others.
# This program and the accompanying materials are made available
# under the terms of the Eclipse Public License 2.0
# which is available at http://www.eclipse.org/legal/epl-v20.html
# SPDX-License-Identifier: EPL-2.0
# *******************************************************************************

# some EF specific validation rules for organization teams:
#
# - do not allow to invite new members to the organization, this shall entirely be handled by the sync script

context.property_equals(self, "skip_non_organization_members", True)

0 comments on commit 4d6f5ba

Please sign in to comment.