Skip to content

Fix wrong ESPN team codes in pickers and help text - #234

Merged
ChuckBuilds merged 1 commit into
mainfrom
fix/team-code-corrections
Jul 31, 2026
Merged

Fix wrong ESPN team codes in pickers and help text#234
ChuckBuilds merged 1 commit into
mainfrom
fix/team-code-corrections

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

What

Several plugins documented — or in one case offered in a picker — team abbreviations that ESPN does not actually use. Because favorite-team matching is by abbreviation, copying a documented example matched no team and the plugin silently showed nothing, with no indication the code was the problem.

Found while investigating a user report that MUN for Manchester United wasn't matching in the soccer plugin (fixed separately in #233); I audited every other plugin that matches teams by abbreviation.

The one real bug: odds-ticker's NHL picker

This is the only case a user could not work around, since it's a checkbox-group picker rather than free text:

  • UTA was listed — a retired code, and labelled with the club's former name "Utah Hockey Club" instead of "Utah Mammoth". ESPN uses UTAH.
  • The Seattle Kraken were missing entirely, so that team could not be selected at all.

The enum and labels are now generated from ESPN's team endpoint and match it exactly at 32 teams (enum keys == labels keys).

Description-only corrections

Plugin League Was Now Team
basketball-scoreboard NBA GSW GS Golden State Warriors
basketball-scoreboard WNBA NYL NY New York Liberty
basketball-scoreboard WNBA LAS LA Los Angeles Sparks
basketball-scoreboard NCAAW UCONN CONN UConn Huskies
basketball-scoreboard NCAAW SCAR SC South Carolina Gamecocks
football-scoreboard NCAA FB BAMA ALA Alabama Crimson Tide
hockey-scoreboard NCAAW hockey WISC WIS Wisconsin Badgers

Each description now also notes that these are ESPN's codes and aren't always the ones you'd guess, since that's the actual trap — BAMA and GSW are what a fan would reach for first.

Verification

Every code was checked against site.api.espn.com/apis/site/v2/sports/{sport}/{league}/teams?limit=1000.

The limit=1000 matters. Without it the default page size truncates the NCAA responses (362 of 755 teams), which made several valid codes look wrong — an earlier pass of this audit produced false positives that way.

Deliberately not changed

  • lacrosse-scoreboardWISC/MINN/OSU and BU/BC/MICH: ESPN's mens-college-lacrosse and womens-college-lacrosse team endpoints both return 0 teams.
  • baseball-scoreboard — MiLB DUR/SWB/NOR: that endpoint 404s.

Unverifiable either way, so flagged rather than guessed at.

Testing

No rendering code changed. Still ran the full safety harness for all four plugins — all sizes PASS. check_module_collisions.py clean across 42 plugins. The fill warn: extent 0%x0% notes in harness output are offseason no-data and are present on main too.

Several plugins documented — or in one case offered in a picker — team
abbreviations that ESPN does not use, so copying them matched no team and
the plugin silently showed nothing.

odds-ticker's NHL picker was the only one where the user could not work
around it: it listed UTA (a retired code, labelled with the club's former
name "Utah Hockey Club" rather than "Utah Mammoth") and omitted the
Seattle Kraken entirely, so that team could not be selected at all. The
enum and labels are now generated from ESPN's team endpoint and match it
exactly at 32 teams.

The rest are description-only corrections to the favorite_teams examples:

  basketball  NBA    GSW   -> GS     (Golden State Warriors)
  basketball  WNBA   NYL   -> NY     (New York Liberty)
  basketball  WNBA   LAS   -> LA     (Los Angeles Sparks)
  basketball  NCAAW  UCONN -> CONN   (UConn Huskies)
  basketball  NCAAW  SCAR  -> SC     (South Carolina Gamecocks)
  football    NCAAFB BAMA  -> ALA    (Alabama Crimson Tide)
  hockey      NCAAWH WISC  -> WIS    (Wisconsin Badgers)

Each description now also says these are ESPN's codes and are not always
the ones you would guess, since that is the underlying trap.

Every code here was verified against
site.api.espn.com/apis/site/v2/sports/{sport}/{league}/teams?limit=1000.
The limit matters: without it the default page size truncates the NCAA
responses (362 of 755 teams) and makes valid codes look wrong.

Left alone deliberately: lacrosse-scoreboard's WISC/MINN/OSU and
BU/BC/MICH examples, and baseball-scoreboard's MiLB DUR/SWB/NOR, because
ESPN's lacrosse team endpoints return zero teams and the MiLB one 404s.
Unverifiable, so not guessed at.

No rendering code changed; the safety harness passes for all four plugins
at every size.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ChuckBuilds, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 23ab7452-687d-4aaf-b0e4-c1191eb7c66e

📥 Commits

Reviewing files that changed from the base of the PR and between 8d33894 and 42a82cc.

📒 Files selected for processing (10)
  • plugins.json
  • plugins/basketball-scoreboard/config_schema.json
  • plugins/basketball-scoreboard/manifest.json
  • plugins/football-scoreboard/CHANGELOG.md
  • plugins/football-scoreboard/config_schema.json
  • plugins/football-scoreboard/manifest.json
  • plugins/hockey-scoreboard/config_schema.json
  • plugins/hockey-scoreboard/manifest.json
  • plugins/odds-ticker/config_schema.json
  • plugins/odds-ticker/manifest.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

ChuckBuilds pushed a commit that referenced this pull request Jul 30, 2026
Two issues flagged by Codacy on the previous commit:

- Dropped an unused 're' import left over from an earlier draft.
- Pinned the URL scheme to https before opening it. The league path is
  interpolated into the URL, and urlopen would honour file:// or a custom
  scheme if a path ever arrived from somewhere less trustworthy than the
  hardcoded table. Bandit's B310 is a syntactic blacklist rule so it still
  fires on the call itself; annotated with the reason rather than left to
  look unexamined.

Verified: bandit clean, the guard rejects a file:// URL, and the checker
still fetches all 32 NHL teams and still exits 1 against main (which is
correct until #234 lands).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ
MSG
@ChuckBuilds
ChuckBuilds merged commit 26c2412 into main Jul 31, 2026
4 checks passed
@ChuckBuilds
ChuckBuilds deleted the fix/team-code-corrections branch July 31, 2026 19:32
ChuckBuilds pushed a commit that referenced this pull request Jul 31, 2026
hockey 1.5.1->1.6.0, basketball 1.8.1->1.9.0; odds-ticker moves to 1.1.9
(main took 1.1.8). plugins.json regenerated via update_registry.py.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FgbA8SMutQQpXkMG8LMmC4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants