From f07b7f42899daa98888b0a21869529f048e05399 Mon Sep 17 00:00:00 2001 From: tree Date: Wed, 9 Feb 2022 09:59:52 +0100 Subject: [PATCH] Update --- spec/22/team.yaml | 23 ++++++++++++++++++++++- utils/team.js | 3 +++ utils/test.js | 6 ++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/spec/22/team.yaml b/spec/22/team.yaml index a8a9c0c..a85cf7f 100644 --- a/spec/22/team.yaml +++ b/spec/22/team.yaml @@ -39,6 +39,10 @@ persons: name: Dušan Kmetyo twitter: dusankmetyo + dimi: + name: Dmitrij Malyšev + twitter: dmit_ry + teams: core: @@ -74,7 +78,7 @@ teams: sponsorship: name: Sponzorství - parent: budget + parent: finance desc: | Shánění a domlouvání sponzorů. members: @@ -104,6 +108,15 @@ teams: - vojtch lead: tereza + srna: + name: SRNA + parent: catering + desc: | + https://docs.utxo.cz/experimenty/srna + members: + - tree + lead: tree + program: name: Program desc: | @@ -168,6 +181,14 @@ teams: - tree lead: tree + electronic-stage: + name: Party - Electronic Stage + parent: party + members: + - tree + - dimi + lead: tree + kryptokino: name: KryptoKino parent: program diff --git a/utils/team.js b/utils/team.js index 7670b3c..5cccc04 100644 --- a/utils/team.js +++ b/utils/team.js @@ -21,5 +21,8 @@ for (const t of teams.filter((t) => !t.parent)) { console.log(`[${t.id}] +${members(t)}`); for (const st of teams.filter((tx) => tx.parent === t.id)) { console.log(` \\\__ [${st.id}] +${members(st)}`); + for (const st2 of teams.filter((tx2) => tx2.parent === st.id)) { + console.log(` \\\__ [${st2.id}] +${members(st2)}`); + } } } diff --git a/utils/test.js b/utils/test.js index d12722d..90e9bc8 100644 --- a/utils/test.js +++ b/utils/test.js @@ -89,6 +89,12 @@ for (const entryId of utxo.entriesList()) { const persons = Object.keys(entry.specs.team.persons); for (const teamId of Object.keys(entry.specs[specId].teams)) { const team = entry.specs[specId].teams[teamId]; + if ( + team.parent && + !Object.keys(entry.specs.team.teams).includes(team.parent) + ) { + throw new Error(`Parent not found: ${team.parent}`); + } if (team.lead && !persons.includes(team.lead)) { throw new Error(`Lead not found: ${team.lead}`); }