* Get the team ID from the team key
(teamKey)
| 151 | * Get the team ID from the team key |
| 152 | */ |
| 153 | async function getTeamId(teamKey) { |
| 154 | const data = await linearGraphQL( |
| 155 | ` |
| 156 | query($key: String!) { |
| 157 | team(id: $key) { |
| 158 | id |
| 159 | name |
| 160 | } |
| 161 | } |
| 162 | `, |
| 163 | { key: teamKey } |
| 164 | ); |
| 165 | |
| 166 | if (!data.team) { |
| 167 | throw new Error(`Team with key "${teamKey}" not found`); |
| 168 | } |
| 169 | |
| 170 | return data.team.id; |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Find or create a label for the release version |