@sideboard-ai/core 0.1.15 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,8 +13,357 @@ import {
13
13
  import { existsSync, readdirSync } from "fs";
14
14
  import { join } from "path";
15
15
 
16
+ // src/git/team-meta.ts
17
+ var SOCCER_TEAM_META = {
18
+ "aalborg": { location: "Aalborg, Denmark", league: "Danish Superliga" },
19
+ "aalesund": { location: "\xC5lesund, Norway", league: "Norwegian First Division" },
20
+ "aarhus": { location: "Aarhus, Denmark", league: "Danish Superliga" },
21
+ "aberdeen": { location: "Aberdeen, Scotland", league: "Scottish Premiership" },
22
+ "ac-milan": { location: "Milan, Italy", league: "Serie A" },
23
+ "ado-den-haag": { location: "The Hague, Netherlands", league: "Eerste Divisie" },
24
+ "aik": { location: "Stockholm, Sweden", league: "Allsvenskan" },
25
+ "ajaccio": { location: "Ajaccio, France", league: "Ligue 2" },
26
+ "ajax": { location: "Amsterdam, Netherlands", league: "Eredivisie" },
27
+ "al-ahly": { location: "Cairo, Egypt", league: "Egyptian Premier League" },
28
+ "al-hilal": { location: "Riyadh, Saudi Arabia", league: "Saudi Pro League" },
29
+ "alajuelense": { location: "Alajuela, Costa Rica", league: "Liga FPD" },
30
+ "almere-city": { location: "Almere, Netherlands", league: "Eredivisie" },
31
+ "amiens": { location: "Amiens, France", league: "Ligue 2" },
32
+ "angers": { location: "Angers, France", league: "Ligue 1" },
33
+ "anyang": { location: "Anyang, South Korea", league: "K League 1" },
34
+ "argentinos-juniors": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
35
+ "arsenal": { location: "London, England", league: "Premier League" },
36
+ "aston-villa": { location: "Birmingham, England", league: "Premier League" },
37
+ "athletico-paranaense": { location: "Curitiba, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
38
+ "atlanta-united": { location: "Atlanta, USA", league: "MLS" },
39
+ "atlas": { location: "Guadalajara, Mexico", league: "Liga MX" },
40
+ "atletico-madrid": { location: "Madrid, Spain", league: "La Liga" },
41
+ "atletico-mineiro": { location: "Belo Horizonte, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
42
+ "atletico-san-luis": { location: "San Luis Potos\xED, Mexico", league: "Liga MX" },
43
+ "augsburg": { location: "Augsburg, Germany", league: "Bundesliga" },
44
+ "austin-fc": { location: "Austin, USA", league: "MLS" },
45
+ "auxerre": { location: "Auxerre, France", league: "Ligue 1" },
46
+ "avispa-fukuoka": { location: "Fukuoka, Japan", league: "J1 League" },
47
+ "az": { location: "Alkmaar, Netherlands", league: "Eredivisie" },
48
+ "bahia": { location: "Salvador, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
49
+ "banfield": { location: "Banfield, Argentina", league: "Argentine Primera Divisi\xF3n" },
50
+ "barcelona": { location: "Barcelona, Spain", league: "La Liga" },
51
+ "bayer-leverkusen": { location: "Leverkusen, Germany", league: "Bundesliga" },
52
+ "bayern-munich": { location: "Munich, Germany", league: "Bundesliga" },
53
+ "belgrano": { location: "C\xF3rdoba, Argentina", league: "Argentine Primera Divisi\xF3n" },
54
+ "benfica": { location: "Lisbon, Portugal", league: "Primeira Liga" },
55
+ "birmingham-legion": { location: "Birmingham, USA", league: "USL Championship" },
56
+ "boca-juniors": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
57
+ "bodo-glimt": { location: "Bod\xF8, Norway", league: "Eliteserien" },
58
+ "bordeaux": { location: "Bordeaux, France", league: "Championnat National" },
59
+ "borussia-dortmund": { location: "Dortmund, Germany", league: "Bundesliga" },
60
+ "botafogo": { location: "Rio de Janeiro, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
61
+ "bragantino": { location: "Bragan\xE7a Paulista, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
62
+ "brann": { location: "Bergen, Norway", league: "Eliteserien" },
63
+ "brest": { location: "Brest, France", league: "Ligue 1" },
64
+ "brommapojkarna": { location: "Stockholm, Sweden", league: "Allsvenskan" },
65
+ "brondby": { location: "Br\xF8ndby, Denmark", league: "Danish Superliga" },
66
+ "brooklyn-fc": { location: "Brooklyn, USA", league: "USL Championship" },
67
+ "bucheon": { location: "Bucheon, South Korea", league: "K League 2" },
68
+ "caen": { location: "Caen, France", league: "Ligue 2" },
69
+ "cambuur": { location: "Leeuwarden, Netherlands", league: "Eerste Divisie" },
70
+ "carmelita": { location: "Alajuela, Costa Rica", league: "Liga de Ascenso" },
71
+ "cartagines": { location: "Cartago, Costa Rica", league: "Liga FPD" },
72
+ "ceara": { location: "Fortaleza, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
73
+ "celtic": { location: "Glasgow, Scotland", league: "Scottish Premiership" },
74
+ "central-cordoba": { location: "Santiago del Estero, Argentina", league: "Argentine Primera Divisi\xF3n" },
75
+ "cerezo-osaka": { location: "Osaka, Japan", league: "J1 League" },
76
+ "cf-montreal": { location: "Montreal, Canada", league: "MLS" },
77
+ "charleston-battery": { location: "Charleston, USA", league: "USL Championship" },
78
+ "charlotte-fc": { location: "Charlotte, USA", league: "MLS" },
79
+ "chelsea": { location: "London, England", league: "Premier League" },
80
+ "chicago-fire": { location: "Chicago, USA", league: "MLS" },
81
+ "chivas": { location: "Guadalajara, Mexico", league: "Liga MX" },
82
+ "clermont": { location: "Clermont-Ferrand, France", league: "Ligue 2" },
83
+ "club-america": { location: "Mexico City, Mexico", league: "Liga MX" },
84
+ "cologne": { location: "Cologne, Germany", league: "Bundesliga" },
85
+ "colorado-rapids": { location: "Commerce City, USA", league: "MLS" },
86
+ "columbus-crew": { location: "Columbus, USA", league: "MLS" },
87
+ "corinthians": { location: "S\xE3o Paulo, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
88
+ "cruz-azul": { location: "Mexico City, Mexico", league: "Liga MX" },
89
+ "cruzeiro": { location: "Belo Horizonte, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
90
+ "daejeon": { location: "Daejeon, South Korea", league: "K League 1" },
91
+ "dc-united": { location: "Washington, D.C., USA", league: "MLS" },
92
+ "defensa-y-justicia": { location: "Florencio Varela, Argentina", league: "Argentine Primera Divisi\xF3n" },
93
+ "degerfors": { location: "Degerfors, Sweden", league: "Allsvenskan" },
94
+ "detroit-city": { location: "Detroit, USA", league: "USL Championship" },
95
+ "dijon": { location: "Dijon, France", league: "Championnat National" },
96
+ "djurgarden": { location: "Stockholm, Sweden", league: "Allsvenskan" },
97
+ "dundee": { location: "Dundee, Scotland", league: "Scottish Premiership" },
98
+ "dundee-united": { location: "Dundee, Scotland", league: "Scottish Premiership" },
99
+ "dynamo-kyiv": { location: "Kyiv, Ukraine", league: "Ukrainian Premier League" },
100
+ "eintracht-frankfurt": { location: "Frankfurt, Germany", league: "Bundesliga" },
101
+ "el-paso-locomotive": { location: "El Paso, USA", league: "USL Championship" },
102
+ "elfsborg": { location: "Bor\xE5s, Sweden", league: "Allsvenskan" },
103
+ "emmen": { location: "Emmen, Netherlands", league: "Eerste Divisie" },
104
+ "esbjerg": { location: "Esbjerg, Denmark", league: "Danish 1st Division" },
105
+ "estudiantes": { location: "La Plata, Argentina", league: "Argentine Primera Divisi\xF3n" },
106
+ "everton": { location: "Liverpool, England", league: "Premier League" },
107
+ "excelsior": { location: "Rotterdam, Netherlands", league: "Eerste Divisie" },
108
+ "fagiano-okayama": { location: "Okayama, Japan", league: "J1 League" },
109
+ "falkirk": { location: "Falkirk, Scotland", league: "Scottish Championship" },
110
+ "fc-cincinnati": { location: "Cincinnati, USA", league: "MLS" },
111
+ "fc-copenhagen": { location: "Copenhagen, Denmark", league: "Danish Superliga" },
112
+ "fc-dallas": { location: "Frisco, USA", league: "MLS" },
113
+ "fc-seoul": { location: "Seoul, South Korea", league: "K League 1" },
114
+ "fc-tokyo": { location: "Tokyo, Japan", league: "J1 League" },
115
+ "fc-tulsa": { location: "Tulsa, USA", league: "USL Championship" },
116
+ "feyenoord": { location: "Rotterdam, Netherlands", league: "Eredivisie" },
117
+ "flamengo": { location: "Rio de Janeiro, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
118
+ "fluminense": { location: "Rio de Janeiro, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
119
+ "fortaleza": { location: "Fortaleza, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
120
+ "fortuna-sittard": { location: "Sittard, Netherlands", league: "Eredivisie" },
121
+ "fredrikstad": { location: "Fredrikstad, Norway", league: "Eliteserien" },
122
+ "freiburg": { location: "Freiburg, Germany", league: "Bundesliga" },
123
+ "gais": { location: "Gothenburg, Sweden", league: "Allsvenskan" },
124
+ "galatasaray": { location: "Istanbul, Turkey", league: "S\xFCper Lig" },
125
+ "gamba-osaka": { location: "Osaka, Japan", league: "J1 League" },
126
+ "gangwon": { location: "Gangneung, South Korea", league: "K League 1" },
127
+ "gimcheon-sangmu": { location: "Gimcheon, South Korea", league: "K League 1" },
128
+ "gimnasia": { location: "La Plata, Argentina", league: "Argentine Primera Divisi\xF3n" },
129
+ "gladbach": { location: "M\xF6nchengladbach, Germany", league: "Bundesliga" },
130
+ "go-ahead-eagles": { location: "Deventer, Netherlands", league: "Eredivisie" },
131
+ "godoy-cruz": { location: "Mendoza, Argentina", league: "Argentine Primera Divisi\xF3n" },
132
+ "gremio": { location: "Porto Alegre, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
133
+ "groningen": { location: "Groningen, Netherlands", league: "Eredivisie" },
134
+ "guadalupe": { location: "Goicoechea, Costa Rica", league: "Liga de Ascenso" },
135
+ "guanacasteca": { location: "Nicoya, Costa Rica", league: "Liga FPD" },
136
+ "guingamp": { location: "Guingamp, France", league: "Ligue 2" },
137
+ "gwangju": { location: "Gwangju, South Korea", league: "K League 1" },
138
+ "hacken": { location: "Gothenburg, Sweden", league: "Allsvenskan" },
139
+ "halmstad": { location: "Halmstad, Sweden", league: "Allsvenskan" },
140
+ "hamburg": { location: "Hamburg, Germany", league: "2. Bundesliga" },
141
+ "hammarby": { location: "Stockholm, Sweden", league: "Allsvenskan" },
142
+ "hartford-athletic": { location: "Hartford, USA", league: "USL Championship" },
143
+ "haugesund": { location: "Haugesund, Norway", league: "Eliteserien" },
144
+ "hearts": { location: "Edinburgh, Scotland", league: "Scottish Premiership" },
145
+ "heerenveen": { location: "Heerenveen, Netherlands", league: "Eredivisie" },
146
+ "heidenheim": { location: "Heidenheim, Germany", league: "Bundesliga" },
147
+ "helsingborg": { location: "Helsingborg, Sweden", league: "Superettan" },
148
+ "heracles": { location: "Almelo, Netherlands", league: "Eredivisie" },
149
+ "herediano": { location: "Heredia, Costa Rica", league: "Liga FPD" },
150
+ "hibernian": { location: "Edinburgh, Scotland", league: "Scottish Premiership" },
151
+ "hoffenheim": { location: "Sinsheim, Germany", league: "Bundesliga" },
152
+ "horsens": { location: "Horsens, Denmark", league: "Danish 1st Division" },
153
+ "houston-dynamo": { location: "Houston, USA", league: "MLS" },
154
+ "huracan": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
155
+ "ifk-goteborg": { location: "Gothenburg, Sweden", league: "Allsvenskan" },
156
+ "norrkoping": { location: "Norrk\xF6ping, Sweden", league: "Allsvenskan" },
157
+ "incheon-united": { location: "Incheon, South Korea", league: "K League 1" },
158
+ "independiente": { location: "Avellaneda, Argentina", league: "Argentine Primera Divisi\xF3n" },
159
+ "indy-eleven": { location: "Indianapolis, USA", league: "USL Championship" },
160
+ "instituto": { location: "C\xF3rdoba, Argentina", league: "Argentine Primera Divisi\xF3n" },
161
+ "inter-miami": { location: "Fort Lauderdale, USA", league: "MLS" },
162
+ "inter-milan": { location: "Milan, Italy", league: "Serie A" },
163
+ "internacional": { location: "Porto Alegre, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
164
+ "jef-united": { location: "Chiba, Japan", league: "J2 League" },
165
+ "jeju-sk": { location: "Jeju, South Korea", league: "K League 1" },
166
+ "jeonbuk": { location: "Jeonju, South Korea", league: "K League 1" },
167
+ "juarez": { location: "Ciudad Ju\xE1rez, Mexico", league: "Liga MX" },
168
+ "juventude": { location: "Caxias do Sul, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
169
+ "juventus": { location: "Turin, Italy", league: "Serie A" },
170
+ "kalmar": { location: "Kalmar, Sweden", league: "Superettan" },
171
+ "kashima-antlers": { location: "Kashima, Japan", league: "J1 League" },
172
+ "kashiwa-reysol": { location: "Kashiwa, Japan", league: "J1 League" },
173
+ "kawasaki-frontale": { location: "Kawasaki, Japan", league: "J1 League" },
174
+ "kfum-oslo": { location: "Oslo, Norway", league: "Eliteserien" },
175
+ "kilmarnock": { location: "Kilmarnock, Scotland", league: "Scottish Premiership" },
176
+ "kristiansund": { location: "Kristiansund, Norway", league: "Eliteserien" },
177
+ "kyoto-sanga": { location: "Kyoto, Japan", league: "J1 League" },
178
+ "la-galaxy": { location: "Carson, USA", league: "MLS" },
179
+ "lafc": { location: "Los Angeles, USA", league: "MLS" },
180
+ "lanus": { location: "Lan\xFAs, Argentina", league: "Argentine Primera Divisi\xF3n" },
181
+ "las-vegas-lights": { location: "Las Vegas, USA", league: "USL Championship" },
182
+ "lazio": { location: "Rome, Italy", league: "Serie A" },
183
+ "le-havre": { location: "Le Havre, France", league: "Ligue 1" },
184
+ "le-mans": { location: "Le Mans, France", league: "Ligue 2" },
185
+ "leeds-united": { location: "Leeds, England", league: "Premier League" },
186
+ "leicester-city": { location: "Leicester, England", league: "Championship" },
187
+ "lens": { location: "Lens, France", league: "Ligue 1" },
188
+ "leon": { location: "Le\xF3n, Mexico", league: "Liga MX" },
189
+ "lexington-sc": { location: "Lexington, USA", league: "USL Championship" },
190
+ "liberia": { location: "Liberia, Costa Rica", league: "Liga FPD" },
191
+ "lille": { location: "Lille, France", league: "Ligue 1" },
192
+ "lillestrom": { location: "Lillestr\xF8m, Norway", league: "Eliteserien" },
193
+ "limon": { location: "Lim\xF3n, Costa Rica", league: "Liga de Ascenso" },
194
+ "liverpool": { location: "Liverpool, England", league: "Premier League" },
195
+ "livingston": { location: "Livingston, Scotland", league: "Scottish Championship" },
196
+ "lorient": { location: "Lorient, France", league: "Ligue 1" },
197
+ "loudoun-united": { location: "Leesburg, USA", league: "USL Championship" },
198
+ "louisville-city": { location: "Louisville, USA", league: "USL Championship" },
199
+ "lyngby": { location: "Kongens Lyngby, Denmark", league: "Danish Superliga" },
200
+ "lyon": { location: "Lyon, France", league: "Ligue 1" },
201
+ "machida-zelvia": { location: "Machida, Japan", league: "J1 League" },
202
+ "mainz": { location: "Mainz, Germany", league: "Bundesliga" },
203
+ "malmo": { location: "Malm\xF6, Sweden", league: "Allsvenskan" },
204
+ "manchester-city": { location: "Manchester, England", league: "Premier League" },
205
+ "manchester-united": { location: "Manchester, England", league: "Premier League" },
206
+ "marseille": { location: "Marseille, France", league: "Ligue 1" },
207
+ "mazatlan": { location: "Mazatl\xE1n, Mexico", league: "Liga MX" },
208
+ "metz": { location: "Metz, France", league: "Ligue 1" },
209
+ "miami-fc": { location: "Miami, USA", league: "USL Championship" },
210
+ "midtjylland": { location: "Herning, Denmark", league: "Danish Superliga" },
211
+ "minnesota-united": { location: "Saint Paul, USA", league: "MLS" },
212
+ "mirassol": { location: "Mirassol, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
213
+ "mito-hollyhock": { location: "Mito, Japan", league: "J2 League" },
214
+ "mjallby": { location: "H\xE4llevik, Sweden", league: "Allsvenskan" },
215
+ "molde": { location: "Molde, Norway", league: "Eliteserien" },
216
+ "monaco": { location: "Monaco", league: "Ligue 1" },
217
+ "monterey-bay": { location: "Monterey, USA", league: "USL Championship" },
218
+ "monterrey": { location: "Monterrey, Mexico", league: "Liga MX" },
219
+ "montpellier": { location: "Montpellier, France", league: "Ligue 2" },
220
+ "motherwell": { location: "Motherwell, Scotland", league: "Scottish Premiership" },
221
+ "grecia": { location: "Grecia, Costa Rica", league: "Liga de Ascenso" },
222
+ "nac-breda": { location: "Breda, Netherlands", league: "Eredivisie" },
223
+ "nagoya-grampus": { location: "Nagoya, Japan", league: "J1 League" },
224
+ "nancy": { location: "Nancy, France", league: "Ligue 2" },
225
+ "nantes": { location: "Nantes, France", league: "Ligue 1" },
226
+ "napoli": { location: "Naples, Italy", league: "Serie A" },
227
+ "nashville-sc": { location: "Nashville, USA", league: "MLS" },
228
+ "nec": { location: "Nijmegen, Netherlands", league: "Eredivisie" },
229
+ "necaxa": { location: "Aguascalientes, Mexico", league: "Liga MX" },
230
+ "new-england": { location: "Foxborough, USA", league: "MLS" },
231
+ "new-mexico-united": { location: "Albuquerque, USA", league: "USL Championship" },
232
+ "newcastle": { location: "Newcastle, England", league: "Premier League" },
233
+ "newells": { location: "Rosario, Argentina", league: "Argentine Primera Divisi\xF3n" },
234
+ "nice": { location: "Nice, France", league: "Ligue 1" },
235
+ "nimes": { location: "N\xEEmes, France", league: "Championnat National" },
236
+ "nordsjaelland": { location: "Farum, Denmark", league: "Danish Superliga" },
237
+ "ny-red-bulls": { location: "Harrison, USA", league: "MLS" },
238
+ "nycfc": { location: "New York City, USA", league: "MLS" },
239
+ "oakland-roots": { location: "Oakland, USA", league: "USL Championship" },
240
+ "ob-odense": { location: "Odense, Denmark", league: "Danish Superliga" },
241
+ "odd": { location: "Skien, Norway", league: "Norwegian First Division" },
242
+ "olympiacos": { location: "Piraeus, Greece", league: "Super League Greece" },
243
+ "orange-county-sc": { location: "Irvine, USA", league: "USL Championship" },
244
+ "orebro": { location: "\xD6rebro, Sweden", league: "Superettan" },
245
+ "orlando-city": { location: "Orlando, USA", league: "MLS" },
246
+ "pachuca": { location: "Pachuca, Mexico", league: "Liga MX" },
247
+ "palmeiras": { location: "S\xE3o Paulo, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
248
+ "paris-fc": { location: "Paris, France", league: "Ligue 1" },
249
+ "psg": { location: "Paris, France", league: "Ligue 1" },
250
+ "pec-zwolle": { location: "Zwolle, Netherlands", league: "Eredivisie" },
251
+ "perez-zeledon": { location: "San Isidro, Costa Rica", league: "Liga FPD" },
252
+ "philadelphia-union": { location: "Chester, USA", league: "MLS" },
253
+ "phoenix-rising": { location: "Phoenix, USA", league: "USL Championship" },
254
+ "pittsburgh-riverhounds": { location: "Pittsburgh, USA", league: "USL Championship" },
255
+ "platense": { location: "Florida, Argentina", league: "Argentine Primera Divisi\xF3n" },
256
+ "pohang-steelers": { location: "Pohang, South Korea", league: "K League 1" },
257
+ "portland-timbers": { location: "Portland, USA", league: "MLS" },
258
+ "porto": { location: "Porto, Portugal", league: "Primeira Liga" },
259
+ "psv": { location: "Eindhoven, Netherlands", league: "Eredivisie" },
260
+ "puebla": { location: "Puebla, Mexico", league: "Liga MX" },
261
+ "pumas": { location: "Mexico City, Mexico", league: "Liga MX" },
262
+ "puntarenas": { location: "Puntarenas, Costa Rica", league: "Liga FPD" },
263
+ "queretaro": { location: "Quer\xE9taro, Mexico", league: "Liga MX" },
264
+ "racing": { location: "Avellaneda, Argentina", league: "Argentine Primera Divisi\xF3n" },
265
+ "randers": { location: "Randers, Denmark", league: "Danish Superliga" },
266
+ "rangers": { location: "Glasgow, Scotland", league: "Scottish Premiership" },
267
+ "rb-leipzig": { location: "Leipzig, Germany", league: "Bundesliga" },
268
+ "real-madrid": { location: "Madrid, Spain", league: "La Liga" },
269
+ "real-salt-lake": { location: "Sandy, USA", league: "MLS" },
270
+ "red-star": { location: "Saint-Ouen, France", league: "Ligue 2" },
271
+ "reims": { location: "Reims, France", league: "Ligue 2" },
272
+ "rennes": { location: "Rennes, France", league: "Ligue 1" },
273
+ "rhode-island-fc": { location: "Pawtucket, USA", league: "USL Championship" },
274
+ "river-plate": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
275
+ "rkc": { location: "Waalwijk, Netherlands", league: "Eredivisie" },
276
+ "roma": { location: "Rome, Italy", league: "Serie A" },
277
+ "rosario-central": { location: "Rosario, Argentina", league: "Argentine Primera Divisi\xF3n" },
278
+ "rosenborg": { location: "Trondheim, Norway", league: "Eliteserien" },
279
+ "sacramento-republic": { location: "Sacramento, USA", league: "USL Championship" },
280
+ "saint-etienne": { location: "Saint-\xC9tienne, France", league: "Ligue 2" },
281
+ "san-antonio-fc": { location: "San Antonio, USA", league: "USL Championship" },
282
+ "san-carlos": { location: "Quesada, Costa Rica", league: "Liga FPD" },
283
+ "san-diego-fc": { location: "San Diego, USA", league: "MLS" },
284
+ "san-jose-earthquakes": { location: "San Jose, USA", league: "MLS" },
285
+ "san-lorenzo": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
286
+ "sanfrecce-hiroshima": { location: "Hiroshima, Japan", league: "J1 League" },
287
+ "santos": { location: "Santos, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
288
+ "santos-guapiles": { location: "Gu\xE1piles, Costa Rica", league: "Liga FPD" },
289
+ "santos-laguna": { location: "Torre\xF3n, Mexico", league: "Liga MX" },
290
+ "sao-paulo": { location: "S\xE3o Paulo, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
291
+ "saprissa": { location: "San Jos\xE9, Costa Rica", league: "Liga FPD" },
292
+ "sarpsborg": { location: "Sarpsborg, Norway", league: "Eliteserien" },
293
+ "schalke": { location: "Gelsenkirchen, Germany", league: "2. Bundesliga" },
294
+ "seattle-sounders": { location: "Seattle, USA", league: "MLS" },
295
+ "sevilla": { location: "Seville, Spain", league: "La Liga" },
296
+ "shakhtar": { location: "Donetsk, Ukraine", league: "Ukrainian Premier League" },
297
+ "shimizu-s-pulse": { location: "Shizuoka, Japan", league: "J1 League" },
298
+ "silkeborg": { location: "Silkeborg, Denmark", league: "Danish Superliga" },
299
+ "sirius": { location: "Uppsala, Sweden", league: "Allsvenskan" },
300
+ "sochaux": { location: "Montb\xE9liard, France", league: "Championnat National" },
301
+ "sonderjyske": { location: "Haderslev, Denmark", league: "Danish Superliga" },
302
+ "sparta-rotterdam": { location: "Rotterdam, Netherlands", league: "Eredivisie" },
303
+ "sport-recife": { location: "Recife, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
304
+ "sporting": { location: "Lisbon, Portugal", league: "Primeira Liga" },
305
+ "sporting-jax": { location: "Jacksonville, USA", league: "MLS Next Pro" },
306
+ "sporting-kc": { location: "Kansas City, USA", league: "MLS" },
307
+ "sporting-san-jose": { location: "San Jos\xE9, Costa Rica", league: "Liga FPD" },
308
+ "st-mirren": { location: "Paisley, Scotland", league: "Scottish Premiership" },
309
+ "st-louis-city": { location: "St. Louis, USA", league: "MLS" },
310
+ "st-pauli": { location: "Hamburg, Germany", league: "Bundesliga" },
311
+ "stabaek": { location: "B\xE6rum, Norway", league: "Norwegian First Division" },
312
+ "strasbourg": { location: "Strasbourg, France", league: "Ligue 1" },
313
+ "stromsgodset": { location: "Drammen, Norway", league: "Eliteserien" },
314
+ "stuttgart": { location: "Stuttgart, Germany", league: "Bundesliga" },
315
+ "switchbacks": { location: "Colorado Springs, USA", league: "USL Championship" },
316
+ "talleres": { location: "C\xF3rdoba, Argentina", league: "Argentine Primera Divisi\xF3n" },
317
+ "tampa-bay-rowdies": { location: "St. Petersburg, USA", league: "USL Championship" },
318
+ "tigre": { location: "Victoria, Argentina", league: "Argentine Primera Divisi\xF3n" },
319
+ "tigres": { location: "San Nicol\xE1s de los Garza, Mexico", league: "Liga MX" },
320
+ "tijuana": { location: "Tijuana, Mexico", league: "Liga MX" },
321
+ "tokyo-verdy": { location: "Tokyo, Japan", league: "J1 League" },
322
+ "toluca": { location: "Toluca, Mexico", league: "Liga MX" },
323
+ "toronto-fc": { location: "Toronto, Canada", league: "MLS" },
324
+ "tottenham": { location: "London, England", league: "Premier League" },
325
+ "toulouse": { location: "Toulouse, France", league: "Ligue 1" },
326
+ "tromso": { location: "Troms\xF8, Norway", league: "Eliteserien" },
327
+ "troyes": { location: "Troyes, France", league: "Ligue 2" },
328
+ "twente": { location: "Enschede, Netherlands", league: "Eredivisie" },
329
+ "ulsan-hd": { location: "Ulsan, South Korea", league: "K League 1" },
330
+ "union": { location: "Santa Fe, Argentina", league: "Argentine Primera Divisi\xF3n" },
331
+ "union-berlin": { location: "Berlin, Germany", league: "Bundesliga" },
332
+ "urawa-reds": { location: "Saitama, Japan", league: "J1 League" },
333
+ "utrecht": { location: "Utrecht, Netherlands", league: "Eredivisie" },
334
+ "v-varen-nagasaki": { location: "Nagasaki, Japan", league: "J2 League" },
335
+ "valencia": { location: "Valencia, Spain", league: "La Liga" },
336
+ "valerenga": { location: "Oslo, Norway", league: "Eliteserien" },
337
+ "vancouver-whitecaps": { location: "Vancouver, Canada", league: "MLS" },
338
+ "varnamo": { location: "V\xE4rnamo, Sweden", league: "Allsvenskan" },
339
+ "vasco": { location: "Rio de Janeiro, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
340
+ "vejle": { location: "Vejle, Denmark", league: "Danish Superliga" },
341
+ "velez": { location: "Buenos Aires, Argentina", league: "Argentine Primera Divisi\xF3n" },
342
+ "viborg": { location: "Viborg, Denmark", league: "Danish Superliga" },
343
+ "viking": { location: "Stavanger, Norway", league: "Eliteserien" },
344
+ "vissel-kobe": { location: "Kobe, Japan", league: "J1 League" },
345
+ "vitesse": { location: "Arnhem, Netherlands", league: "Eerste Divisie" },
346
+ "vitoria": { location: "Salvador, Brazil", league: "Brasileir\xE3o S\xE9rie A" },
347
+ "volendam": { location: "Volendam, Netherlands", league: "Eredivisie" },
348
+ "werder-bremen": { location: "Bremen, Germany", league: "Bundesliga" },
349
+ "west-ham": { location: "London, England", league: "Premier League" },
350
+ "willem-ii": { location: "Tilburg, Netherlands", league: "Eerste Divisie" },
351
+ "wolfsburg": { location: "Wolfsburg, Germany", league: "Bundesliga" },
352
+ "yokohama-marinos": { location: "Yokohama, Japan", league: "J1 League" }
353
+ };
354
+
16
355
  // src/git/teams.ts
17
- var FAMOUS_SOCCER_TEAMS = [
356
+ function withMeta(seed) {
357
+ const baseSlug = seed.slug.replace(/-\d+$/, "");
358
+ const meta = SOCCER_TEAM_META[baseSlug];
359
+ return {
360
+ name: seed.name,
361
+ slug: seed.slug,
362
+ location: meta?.location ?? "Unknown",
363
+ league: meta?.league ?? "Unknown league"
364
+ };
365
+ }
366
+ var FAMOUS_SOCCER_TEAM_SEEDS = [
18
367
  { name: "Aalborg", slug: "aalborg" },
19
368
  { name: "Aalesund", slug: "aalesund" },
20
369
  { name: "Aarhus", slug: "aarhus" },
@@ -351,12 +700,28 @@ var FAMOUS_SOCCER_TEAMS = [
351
700
  { name: "Wolfsburg", slug: "wolfsburg" },
352
701
  { name: "Yokohama Marinos", slug: "yokohama-marinos" }
353
702
  ];
703
+ var FAMOUS_SOCCER_TEAMS = FAMOUS_SOCCER_TEAM_SEEDS.map(withMeta);
704
+ function lookupSoccerTeam(titleOrSlug) {
705
+ const trimmed = titleOrSlug.trim();
706
+ if (!trimmed) return null;
707
+ const fromName = teamSlugFromName(trimmed);
708
+ const slug = fromName ?? normalizeTakenSlug(trimmed);
709
+ const baseSlug = slug.replace(/-\d+$/, "");
710
+ const seed = FAMOUS_SOCCER_TEAM_SEEDS.find((t) => t.slug === baseSlug);
711
+ if (!seed) return null;
712
+ const suffixMatch = slug.match(/-(\d+)$/) || trimmed.match(/\s+(\d+)$/);
713
+ const suffix = suffixMatch?.[1];
714
+ return withMeta({
715
+ name: suffix ? `${seed.name} ${suffix}` : seed.name,
716
+ slug: suffix ? `${seed.slug}-${suffix}` : seed.slug
717
+ });
718
+ }
354
719
  function teamNameFromSlug(slug) {
355
720
  const normalized = slug.toLowerCase().replace(/^thread\//, "");
356
721
  const suffixMatch = normalized.match(/^(.+)-(\d+)$/);
357
722
  const base = suffixMatch?.[1] ?? normalized;
358
723
  const suffix = suffixMatch?.[2];
359
- const team = FAMOUS_SOCCER_TEAMS.find((t) => t.slug === base);
724
+ const team = FAMOUS_SOCCER_TEAM_SEEDS.find((t) => t.slug === base);
360
725
  if (team) return suffix ? `${team.name} ${suffix}` : team.name;
361
726
  return normalized.split("-").filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
362
727
  }
@@ -366,7 +731,7 @@ function teamSlugFromName(name) {
366
731
  const suffixMatch = trimmed.match(/^(.+?)\s+(\d+)$/);
367
732
  const baseName = suffixMatch?.[1] ?? trimmed;
368
733
  const suffix = suffixMatch?.[2];
369
- const team = FAMOUS_SOCCER_TEAMS.find(
734
+ const team = FAMOUS_SOCCER_TEAM_SEEDS.find(
370
735
  (t) => t.name.toLowerCase() === baseName.toLowerCase()
371
736
  );
372
737
  if (!team) return null;
@@ -394,16 +759,16 @@ function allocateTeamName(taken, random = Math.random) {
394
759
  const takenSet = new Set(
395
760
  [...taken].map((s) => normalizeTakenSlug(s)).filter(Boolean)
396
761
  );
397
- const available = FAMOUS_SOCCER_TEAMS.filter((t) => !takenSet.has(t.slug));
762
+ const available = FAMOUS_SOCCER_TEAM_SEEDS.filter((t) => !takenSet.has(t.slug));
398
763
  if (available.length > 0) {
399
764
  const idx = Math.floor(random() * available.length);
400
- return available[idx];
765
+ return withMeta(available[idx]);
401
766
  }
402
767
  for (let n = 2; n < 1e3; n++) {
403
- for (const t of FAMOUS_SOCCER_TEAMS) {
768
+ for (const t of FAMOUS_SOCCER_TEAM_SEEDS) {
404
769
  const slug = `${t.slug}-${n}`;
405
770
  if (!takenSet.has(slug)) {
406
- return { name: `${t.name} ${n}`, slug };
771
+ return withMeta({ name: `${t.name} ${n}`, slug });
407
772
  }
408
773
  }
409
774
  }
@@ -492,6 +857,16 @@ function formatGhLandError(raw, opts) {
492
857
  return trimmed;
493
858
  }
494
859
  const detail = extractGhErrorDetail(raw);
860
+ if (/Head ref must be a branch|No commits between|Head sha can't be blank/i.test(
861
+ raw
862
+ ) || /Head ref must be a branch|No commits between|Head sha can't be blank/i.test(
863
+ detail
864
+ )) {
865
+ const target = opts?.targetedRepo ? ` Targeted ${opts.targetedRepo}` : "";
866
+ const head = opts?.headRef ? ` with head ${opts.headRef}` : "";
867
+ const hint = opts?.targetedRepo ? ` Branch was pushed to origin \u2014 confirm it exists on GitHub and differs from the base branch.${target}${head}.` : " Often `gh` targeted upstream instead of origin. Branch was pushed \u2014 retry in the latest Sideboard, or run: gh pr create -R <owner/name> --base main --head <branch>.";
868
+ return `Could not create the pull request.${hint}`;
869
+ }
495
870
  if (isGhRateLimitError(raw) || isGhRateLimitError(detail)) {
496
871
  const when = opts?.resetAt ? ` Try again ${formatRateLimitResetHint(opts.resetAt, opts.nowMs)}.` : " Wait a few minutes and try again.";
497
872
  const pushNote = opts?.pushed === false ? "" : " Your branch was already pushed.";
@@ -606,12 +981,19 @@ async function lookupGithubGraphqlReset(cwd) {
606
981
  return void 0;
607
982
  }
608
983
  }
609
- async function formatPrCreateFailure(raw, cwd) {
984
+ async function formatPrCreateFailure(raw, cwd, ctx) {
610
985
  if (!isGhRateLimitError(raw)) {
611
- return formatGhLandError(raw);
986
+ return formatGhLandError(raw, {
987
+ targetedRepo: ctx?.slug,
988
+ headRef: ctx?.head
989
+ });
612
990
  }
613
991
  const resetAt = await lookupGithubGraphqlReset(cwd);
614
- return formatGhLandError(raw, { resetAt });
992
+ return formatGhLandError(raw, {
993
+ resetAt,
994
+ targetedRepo: ctx?.slug,
995
+ headRef: ctx?.head
996
+ });
615
997
  }
616
998
  function slugify(input) {
617
999
  return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 48);
@@ -621,10 +1003,13 @@ async function resolveRepoRoot(cwd) {
621
1003
  return stdout.trim();
622
1004
  }
623
1005
  function parseGithubSlugFromRemoteUrl(url) {
624
- const trimmed = url.trim();
625
- const match = trimmed.match(/github\.com[:/]([^/]+)\/([^/.]+?)(?:\.git)?$/i) ?? trimmed.match(/github\.com[:/]([^/]+)\/([^/.]+)/i);
626
- if (!match?.[1] || !match[2]) return null;
627
- return `${match[1]}/${match[2]}`;
1006
+ const trimmed = url.trim().replace(/\.git$/i, "");
1007
+ if (!trimmed) return null;
1008
+ const github = trimmed.match(/github\.com[:/]([^/]+)\/([^/]+)$/i);
1009
+ if (github?.[1] && github[2]) return `${github[1]}/${github[2]}`;
1010
+ const sshAlias = trimmed.match(/^git@[^:]+:([^/]+)\/([^/]+)$/i);
1011
+ if (sshAlias?.[1] && sshAlias[2]) return `${sshAlias[1]}/${sshAlias[2]}`;
1012
+ return null;
628
1013
  }
629
1014
  async function slugFromGitRemote(repoPath, remote) {
630
1015
  const result = await git(["remote", "get-url", remote], repoPath, {
@@ -636,13 +1021,16 @@ async function slugFromGitRemote(repoPath, remote) {
636
1021
  async function resolveGithubRepoSlug(repoPath) {
637
1022
  const fromOrigin = await slugFromGitRemote(repoPath, "origin");
638
1023
  if (fromOrigin) return fromOrigin;
639
- const viaGh = await gh(
640
- ["repo", "view", "--json", "nameWithOwner", "--jq", ".nameWithOwner"],
641
- repoPath,
642
- { reject: false }
643
- );
644
- if (viaGh.exitCode === 0 && viaGh.stdout.trim()) {
645
- return viaGh.stdout.trim();
1024
+ const hasAlt = Boolean(await slugFromGitRemote(repoPath, "upstream")) || Boolean(await slugFromGitRemote(repoPath, "github"));
1025
+ if (!hasAlt) {
1026
+ const viaGh = await gh(
1027
+ ["repo", "view", "--json", "nameWithOwner", "--jq", ".nameWithOwner"],
1028
+ repoPath,
1029
+ { reject: false }
1030
+ );
1031
+ if (viaGh.exitCode === 0 && viaGh.stdout.trim()) {
1032
+ return viaGh.stdout.trim();
1033
+ }
646
1034
  }
647
1035
  for (const remote of ["upstream", "github"]) {
648
1036
  const slug = await slugFromGitRemote(repoPath, remote);
@@ -650,15 +1038,35 @@ async function resolveGithubRepoSlug(repoPath) {
650
1038
  }
651
1039
  return null;
652
1040
  }
1041
+ function ghRepoSelectArgs(slug) {
1042
+ return ["-R", slug];
1043
+ }
1044
+ function ghHeadRef(slug, branch) {
1045
+ const owner = slug.split("/")[0];
1046
+ const head = branch.trim().replace(/^refs\/heads\//, "");
1047
+ if (!owner || !head) return head || branch;
1048
+ if (head.includes(":")) return head;
1049
+ return `${owner}:${head}`;
1050
+ }
1051
+ async function ensureGhPreferOrigin(cwd) {
1052
+ const originSlug = await slugFromGitRemote(cwd, "origin");
1053
+ if (!originSlug) return;
1054
+ const hasAlt = Boolean(await slugFromGitRemote(cwd, "upstream")) || Boolean(await slugFromGitRemote(cwd, "github"));
1055
+ if (!hasAlt) return;
1056
+ const view = await gh(["repo", "set-default", "--view"], cwd, {
1057
+ reject: false
1058
+ });
1059
+ const current = `${view.stdout}
1060
+ ${view.stderr}`;
1061
+ if (view.exitCode === 0 && current.includes(originSlug)) return;
1062
+ await gh(["repo", "set-default", "origin"], cwd, { reject: false });
1063
+ }
1064
+ async function originGhRepoEnv(cwd) {
1065
+ await ensureGhPreferOrigin(cwd);
1066
+ const slug = await resolveGithubRepoSlug(cwd);
1067
+ return slug ? { GH_REPO: slug } : {};
1068
+ }
653
1069
  async function resolveDefaultBranch(repoPath) {
654
- const viaGh = await gh(
655
- ["repo", "view", "--json", "defaultBranchRef", "--jq", ".defaultBranchRef.name"],
656
- repoPath,
657
- { reject: false }
658
- );
659
- if (viaGh.exitCode === 0 && viaGh.stdout.trim()) {
660
- return viaGh.stdout.trim();
661
- }
662
1070
  const viaOrigin = await git(
663
1071
  ["symbolic-ref", "refs/remotes/origin/HEAD"],
664
1072
  repoPath,
@@ -667,6 +1075,31 @@ async function resolveDefaultBranch(repoPath) {
667
1075
  if (viaOrigin.exitCode === 0 && viaOrigin.stdout.trim()) {
668
1076
  return viaOrigin.stdout.trim().replace(/^refs\/remotes\/origin\//, "");
669
1077
  }
1078
+ const slug = await resolveGithubRepoSlug(repoPath);
1079
+ const viaGh = await gh(
1080
+ [
1081
+ "repo",
1082
+ "view",
1083
+ ...slug ? ["--repo", slug] : [],
1084
+ "--json",
1085
+ "defaultBranchRef",
1086
+ "--jq",
1087
+ ".defaultBranchRef.name"
1088
+ ],
1089
+ repoPath,
1090
+ { reject: false }
1091
+ );
1092
+ if (viaGh.exitCode === 0 && viaGh.stdout.trim()) {
1093
+ return viaGh.stdout.trim();
1094
+ }
1095
+ for (const candidate of ["main", "master"]) {
1096
+ const check = await git(
1097
+ ["show-ref", "--verify", "--quiet", `refs/remotes/origin/${candidate}`],
1098
+ repoPath,
1099
+ { reject: false }
1100
+ );
1101
+ if (check.exitCode === 0) return candidate;
1102
+ }
670
1103
  for (const candidate of ["main", "master"]) {
671
1104
  const check = await git(
672
1105
  ["show-ref", "--verify", "--quiet", `refs/heads/${candidate}`],
@@ -1072,6 +1505,7 @@ async function createThreadWorktree(opts) {
1072
1505
  if (existsSync(worktreePath)) {
1073
1506
  throw new Error(`Worktree already exists at ${worktreePath}`);
1074
1507
  }
1508
+ await ensureGhPreferOrigin(opts.repoPath);
1075
1509
  await git(["fetch", "origin", "--prune"], opts.repoPath, { reject: false });
1076
1510
  if (!opts.sourceRef.startsWith("origin/") && !opts.sourceRef.startsWith("refs/")) {
1077
1511
  await git(["fetch", "origin", opts.sourceRef], opts.repoPath, {
@@ -1100,6 +1534,7 @@ ${add.stdout}`;
1100
1534
  );
1101
1535
  if (retry.exitCode === 0) {
1102
1536
  branchName = alt;
1537
+ await ensureGhPreferOrigin(worktreePath);
1103
1538
  return { branchName, worktreePath };
1104
1539
  }
1105
1540
  }
@@ -1108,6 +1543,7 @@ ${add.stdout}`;
1108
1543
  `Failed to create worktree: ${add.stderr.trim() || add.stdout.trim() || `exit ${add.exitCode}`}`
1109
1544
  );
1110
1545
  }
1546
+ await ensureGhPreferOrigin(worktreePath);
1111
1547
  return { branchName, worktreePath };
1112
1548
  }
1113
1549
  async function removeWorktree(repoPath, worktreePath, opts) {
@@ -1208,8 +1644,18 @@ async function mergePr(cwd, selector, opts) {
1208
1644
  return { url, state: "MERGED" };
1209
1645
  }
1210
1646
  async function createOrUpdatePr(worktreePath, opts) {
1647
+ await ensureGhPreferOrigin(worktreePath);
1648
+ const slug = await resolveGithubRepoSlug(worktreePath);
1649
+ if (!slug) {
1650
+ throw new Error(
1651
+ "Could not resolve the origin GitHub repo (owner/name) for this worktree. Check that `git remote get-url origin` points at github.com."
1652
+ );
1653
+ }
1654
+ const repoArgs = ghRepoSelectArgs(slug);
1655
+ const headRef = ghHeadRef(slug, opts.head);
1656
+ const branchOnly = opts.head.trim().replace(/^refs\/heads\//, "");
1211
1657
  const existing = await gh(
1212
- ["pr", "view", opts.head, "--json", "url", "--jq", ".url"],
1658
+ [...repoArgs, "pr", "view", branchOnly, "--json", "url", "--jq", ".url"],
1213
1659
  worktreePath,
1214
1660
  { reject: false }
1215
1661
  );
@@ -1217,9 +1663,10 @@ async function createOrUpdatePr(worktreePath, opts) {
1217
1663
  const url2 = existing.stdout.trim();
1218
1664
  await gh(
1219
1665
  [
1666
+ ...repoArgs,
1220
1667
  "pr",
1221
1668
  "edit",
1222
- opts.head,
1669
+ branchOnly,
1223
1670
  "--title",
1224
1671
  opts.title,
1225
1672
  "--body",
@@ -1232,6 +1679,7 @@ async function createOrUpdatePr(worktreePath, opts) {
1232
1679
  }
1233
1680
  if (opts.web) {
1234
1681
  const args2 = [
1682
+ ...repoArgs,
1235
1683
  "pr",
1236
1684
  "create",
1237
1685
  "--web",
@@ -1242,18 +1690,19 @@ async function createOrUpdatePr(worktreePath, opts) {
1242
1690
  "--base",
1243
1691
  opts.base,
1244
1692
  "--head",
1245
- opts.head
1693
+ headRef
1246
1694
  ];
1247
1695
  if (opts.draft) args2.push("--draft");
1248
1696
  await gh(args2, worktreePath, { reject: false });
1249
1697
  const again = await gh(
1250
- ["pr", "view", opts.head, "--json", "url", "--jq", ".url"],
1698
+ [...repoArgs, "pr", "view", branchOnly, "--json", "url", "--jq", ".url"],
1251
1699
  worktreePath,
1252
1700
  { reject: false }
1253
1701
  );
1254
1702
  return again.stdout.trim() || "";
1255
1703
  }
1256
1704
  const args = [
1705
+ ...repoArgs,
1257
1706
  "pr",
1258
1707
  "create",
1259
1708
  "--title",
@@ -1263,13 +1712,13 @@ async function createOrUpdatePr(worktreePath, opts) {
1263
1712
  "--base",
1264
1713
  opts.base,
1265
1714
  "--head",
1266
- opts.head
1715
+ headRef
1267
1716
  ];
1268
1717
  if (opts.draft) args.push("--draft");
1269
1718
  const created = await gh(args, worktreePath, { reject: false });
1270
1719
  if (created.exitCode !== 0) {
1271
1720
  const raw = created.stderr.trim() || created.stdout.trim() || "gh pr create failed";
1272
- throw new Error(await formatPrCreateFailure(raw, worktreePath));
1721
+ throw new Error(await formatPrCreateFailure(raw, worktreePath, { slug, head: headRef }));
1273
1722
  }
1274
1723
  const url = created.stdout.trim().split("\n").find((l) => l.startsWith("http")) ?? created.stdout.trim();
1275
1724
  return url;
@@ -1325,6 +1774,7 @@ function allocateTeamSlug(repoPath) {
1325
1774
 
1326
1775
  export {
1327
1776
  FAMOUS_SOCCER_TEAMS,
1777
+ lookupSoccerTeam,
1328
1778
  teamSlugFromName,
1329
1779
  takenSlugsFromThread,
1330
1780
  allocateTeamName,
@@ -1344,6 +1794,10 @@ export {
1344
1794
  resolveRepoRoot,
1345
1795
  parseGithubSlugFromRemoteUrl,
1346
1796
  resolveGithubRepoSlug,
1797
+ ghRepoSelectArgs,
1798
+ ghHeadRef,
1799
+ ensureGhPreferOrigin,
1800
+ originGhRepoEnv,
1347
1801
  resolveDefaultBranch,
1348
1802
  resolveDiffBaseRef,
1349
1803
  listBranches,