Skip to content

Commit

Permalink
fix: assign platform admins as owner
Browse files Browse the repository at this point in the history
  • Loading branch information
ferruhcihan committed Oct 17, 2024
1 parent 6251b2b commit d6466b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/operator/gitea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
GITEA_URL_PORT,
cleanEnv,
} from '../validators'
import { orgName, otomiChartsRepoName, otomiValuesRepoName, teamNameViewer, username } from './common'
import { orgName, otomiChartsRepoName, otomiValuesRepoName, teamNameOwners, teamNameViewer, username } from './common'

// Interfaces
interface hookInfo {
Expand Down Expand Up @@ -442,10 +442,10 @@ async function setupGitea() {

// Set Gitea Functions
export function buildTeamString(teamNames: any[]): string {
if (teamNames === undefined) return '{}'
const teamObject: groupMapping = {}
const teamObject: groupMapping = { 'platform-admin': { otomi: [teamNameOwners] } }
if (teamNames === undefined) return JSON.stringify(teamObject)
teamNames.forEach((teamName: string) => {
teamObject[`team-${teamName}`] = { otomi: ['otomi-viewer', `team-${teamName}`] }
teamObject[`team-${teamName}`] = { otomi: [teamNameViewer, `team-${teamName}`] }
})
return JSON.stringify(teamObject)
}
Expand Down
5 changes: 0 additions & 5 deletions src/tasks/common.ts

This file was deleted.

0 comments on commit d6466b2

Please sign in to comment.