Skip to content

fix(release): cap Play Store changelog at 500 characters - #219

Merged
ErikBjare merged 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:fix/changelog-500-char-cap
Aug 10, 2026
Merged

fix(release): cap Play Store changelog at 500 characters#219
ErikBjare merged 1 commit into
ActivityWatch:masterfrom
TimeToBuildBob:fix/changelog-500-char-cap

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Problem

Build run 31387869696 failed at the Play Store upload step:

[!] Google Api Error: Invalid request - The release created has notes in language
    en-US with length 1004, which is too long (max: 500).

Google Play caps release notes at 500 characters per language. The changelog auto-generation added in #194 emits an unbounded git log since the previous tag, so it exceeds the cap whenever a release spans more than a handful of commits. v0.14.0dev20260810 spanned 13 → 1004 characters.

The failure mode is worse than a plain build break: release.yml commits the changelog and pushes the tag before build.yml uploads, so the error surfaces after the release has effectively been cut.

Fix

Trim in release.yml, on whole-line boundaries, so a half-written entry never ships. When entries are dropped, append a pointer to the GitHub release:

- fix: add prominent disclosure before accessibility settings redirect (#215)
- build: bump NDK to r28 for 16 KB page-size compliance (conflict resolution) (#217)
- build: bump compileSdk/targetSdk to 36 (Android 16) (#214)
- feat(sync): bridge SAF-granted URI to aw-sync output (Phase 2) (#209)
- fix: replace Material attrs with AppCompat in settings activities (#211)

Full changelog: https://github.com/ActivityWatch/aw-android/releases/tag/v0.14.0

453 bytes. Note that Play Store "What's new" is plain text — the URL is readable but not clickable. Still better than dropping the remainder silently.

Details:

  • The bound is measured in bytes. For UTF-8 that is >= the character count Google measures, so the check can only ever be conservative, never over-permissive.
  • The cap runs after both branches, so a hand-written changelog that is too long is also caught — that path was previously unchecked and would have failed identically.
  • If not even the first entry fits, it falls back to - Bug fixes and stability improvements rather than emitting an empty file.
  • The link is only added when truncation actually happened; short changelogs are left clean. Say the word if you'd rather it were always present.

Also in this PR

fastlane/metadata/android/en-US/changelogs/38.txt is committed on master at 1008 bytes. Trimmed to 453 — without this, any re-run of the v0.14.0dev20260810 build fails the same way.

Verification

Ran the capping logic against the real 1008-byte changelog and the edge cases:

Input Result
The actual 1008-byte 38.txt 453 bytes, 5 whole entries + release link
Short changelog (12 bytes) unchanged, no link appended
Single entry longer than the budget falls back to the generic note + link
499 bytes (just under) unchanged
Empty unchanged (the existing ! -s guard fills it first)

shellcheck -s bash clean on the extracted step; release.yml parses as valid YAML.

Context

This is the last thing between master and a stable v0.14.0 — the foreground-service declaration cleared review, and this run got all the way to the upload step. Tracked in #189.

Google Play rejects release notes longer than 500 characters per language.
The auto-generated changelog is an unbounded git log since the previous tag,
so it grows past the limit whenever a release spans more than a handful of
commits. Build run 31387869696 failed at the upload step with:

    Google Api Error: Invalid request - The release created has notes in
    language en-US with length 1004, which is too long (max: 500).

By then release.yml had already committed the changelog and pushed the tag,
so the failure surfaced after the release was effectively cut.

Trim in release.yml on whole-line boundaries, and when entries are dropped
append a pointer to the GitHub release for the full list. Play Store 'What's
new' is plain text, so the URL is readable but not clickable — still better
than silently omitting the rest.

The bound is measured in bytes, which for UTF-8 is >= the character count
Google measures, so the check can only be conservative. It runs after both
branches so a hand-written changelog is covered too, and falls back to the
generic note if not even the first entry fits.

Also trims the already-committed 38.txt (1008 bytes), which would otherwise
keep failing on any re-run of the v0.14.0dev20260810 build.
@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown

Greptile Summary

The PR prevents Google Play uploads from failing on release notes over 500 characters by trimming changelogs at whole-line boundaries and linking to the full GitHub release.

  • Applies the cap to both generated and pre-existing changelogs.
  • Preserves short changelogs unchanged and uses a generic fallback when no entry fits.
  • Trims the existing version-code 38 changelog to a compliant release-note body.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

The new workflow logic bounds long release notes before tagging and uploading while preserving whole entries and leaving already compliant changelogs unchanged.

Important Files Changed

Filename Overview
.github/workflows/release.yml Adds a shared whole-line changelog cap after both metadata-generation branches, with fallback text and a full-release URL when truncation occurs.
fastlane/metadata/android/en-US/changelogs/38.txt Removes excess release-note entries and replaces them with a link to the complete GitHub changelog.

Sequence Diagram

sequenceDiagram
    participant Maintainer
    participant Release as release.yml
    participant Metadata as Fastlane metadata
    participant Build as build.yml
    participant Play as Google Play
    Maintainer->>Release: Dispatch with version
    Release->>Metadata: Generate or load changelog
    Release->>Release: Check byte length
    alt Changelog exceeds limit
        Release->>Metadata: Keep whole entries and append release URL
    else Changelog fits
        Release->>Metadata: Leave unchanged
    end
    Release->>Release: Commit and push tag
    Release->>Build: Trigger tagged build
    Build->>Play: Upload bundle and bounded release notes
Loading

Reviews (1): Last reviewed commit: "fix(release): cap Play Store changelog a..." | Re-trigger Greptile

@TimeToBuildBob

TimeToBuildBob commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

CI is fully green and Greptile reviewed the current head at 5/5 with no findings. This is ready to merge.

I cannot merge it myself: this account has pull-only repository access, and the self-merge gate also correctly classifies the workflow change as sensitive. After merge, the existing tagged build still needs to be retriggered (or a stable 0.14.0 release cut) so Play gets the now-compliant 38.txt.

@ErikBjare
ErikBjare merged commit 4c220f4 into ActivityWatch:master Aug 10, 2026
8 checks passed
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