Skip to content

Fix automated workflows - #960

Merged
hiletmis merged 3 commits into
mainfrom
fix-ci
Sep 9, 2026
Merged

Fix automated workflows#960
hiletmis merged 3 commits into
mainfrom
fix-ci

Conversation

@hiletmis

@hiletmis hiletmis commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Three related fixes to the changeset pipeline: logo updates were never producing a release, empty changesets were producing spurious ones, and the changelog entries themselves were awkward and hard to read.

The release that never happened

scripts/version-check.js writes .changeset/changeset.md after pulling updated logos from Dropbox, but the workflow's commit step only staged raw/. The changeset stayed on the runner's disk — which is why gh pr create --body-file kept working and the PR body looked correct — and never reached control-branch.

Downstream, auto-release.yml gates the entire release on find ./.changeset -name "*.md", so with no changeset ever landing on main, every scheduled run short-circuited to files_exists=false and nothing was published.

This regressed in 23d274d, which narrowed git add . to git add raw/. The commit step now also stages the changeset, guarded with -f so a missing file can't abort the step under bash -e.

The release that shouldn't have happened

createChangeset() in scripts/release.js had no empty guard, unlike its counterpart in version-check.js. getDetails() swallows the ENOENT from a missing .changeset/details.txt and returns '', so the changeset was written anyway — table header, zero rows:

---
"@api3/logos": patch
---

Some changes have been made to the `logos`.

|Logo|Name|Category|
|---|---|---|

That file gets committed by the Commit changeset step in deployfe.yml (git add .details.txt is gitignored, changeset.md isn't), and auto-release cuts a release for it, since it only counts .md files and never looks inside them.

The two diverge because changes_detected is gated on an unscoped git status --porcelain — any dirty tree — while details.txt is only written when a genuinely new logo is downloaded. Added the !details.trim() guard, so an empty changeset can't be written regardless of which path leaves the tree dirty.

Also fixed the existing-changeset check, which used file.match(/changeset.md$/). That only matched files literally ending in changeset.md, so a hand-added changeset with a generated name (smooth-groups-turn.md) went undetected and got a redundant auto changeset written alongside it. Now matches any .md except README.md, consistent with what auto-release looks for.

Changelog wording

Script Before After
version-check.js Following logos has been updated: Updated the following logos:
release.js Some changes have been made to the `logos`. Added the following logos:

The first was ungrammatical. The more useful change is that the two now say different things, matching what each script does: fetch-missing.js downloads logos with no file on disk yet (additions), while version-check.js downloads only on a content-hash mismatch against a file already present (updates to artwork that already shipped). Readers can now tell a brand-new logo from a redrawn one, which matters because an updated logo can change how existing UI renders and a new one can't.

Chain aliases instead of ids

Chain rows read 42161, because the row label came from the Dropbox filename. New getLogoLabel(name, mode) helper in helpers/utils.js resolves the id to its alias, used by both row builders:

Input Name column
chain / 42161.svg arbitrum
chain / 146-light.svg sonic-light
chain / 1030.svg 1030 (fallback)
symbol / doge.svg doge (unchanged)

Light variants keep their suffix — both 146.svg and 146-light.svg can appear in one changeset, and stripping it would produce two identical sonic rows with different images.

Unknown ids fall back to the id: getChains() returns 63 chains but raw/chains/ holds 185 files, so ids like 1030 and 196 have no alias in the current @api3/dapi-management. Downloads are driven by getSupportedChains(), a subset of the alias source, so misses should be rare — the fallback means a chain dropped from the list mid-run degrades to today's output rather than emitting undefined.

Testing

  • Reproduced the empty header with the pre-fix release.js and confirmed the guard suppresses it, while details.txt present still produces the full changeset with its rows.
  • Verified getLogoLabel across chain/symbol/api-provider, light variants, and unknown ids.
  • prettier --check and eslint pass on all changed files.

The workflow changes are not exercised until the next scheduled run.

Note

Logo updates from the last several months are merged but unreleased, since no changeset ever landed. The next successful run will produce a single patch changeset covering only that run's logos, not the backlog — earlier updates would need a hand-written changeset to appear in the changelog.

🤖 Generated with Claude Code

@hiletmis
hiletmis merged commit 0e00a9b into main Sep 9, 2026
2 checks passed
@hiletmis
hiletmis deleted the fix-ci branch September 9, 2026 13:54
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.

1 participant