Skip to content

fix: submit translations against the branch the repo actually uses - #391

Merged
JarbasAl merged 1 commit into
devfrom
fix/submission-target-branch
Aug 25, 2026
Merged

fix: submit translations against the branch the repo actually uses#391
JarbasAl merged 1 commit into
devfrom
fix/submission-target-branch

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

🤖 Auto-generated by Claude Opus 5 (claude-opus-5) via Claude Code — NOT human-reviewed. Verify before acting.

Translations submitted for a skill repo that has no dev branch were silently lost.

The SPA hardcoded dev as the submission target. Skill repos do not agree on a branch name: OVOS repos use dev, many community repos use main or master. When the branch did not exist, actions/checkout could not fetch the ref and the job died. The issue still told the translator "A bot will create a PR automatically", no PR appeared, and nothing reported the failure.

This is not hypothetical. Three Kabyle translations submitted to OscillateLabsLLC/skill-homeassistant (default branch main) failed this way, while same-day submissions to OpenVoiceOS repos succeeded.

What changed

RepoScanner.clone_or_pull already fell back devmainmaster, but threw away which branch won. It now returns that branch, and the branch travels with the skill data into repos.json, the per-skill JSON, and the editor. Submissions and "edit on GitHub" links target a ref that exists.

Both workflows now verify the requested branch against the remote and fall back to the repository's default branch, so an old or hand-edited issue cannot reintroduce the failure. Both also comment on the originating issue when the job fails, so a broken submission is visible rather than silent. These are automation-authored comments designed into the workflow.

The "edit on GitHub" links were wrong for the same reason and are fixed by the same change.

Verification

Clean venv on Python 3.14.6:

  • The seven new tests fail on the unfixed source and pass on the fixed source. Verified by reverting only ovos_localize/sync/github.py and scripts/generate_data.py while keeping the tests: 7 failed, then 7 passed once restored.
  • Affected modules: 16 passed before, 23 passed after — no regression.
  • Both workflow files parse as valid YAML.

The full suite also reports ten failures from ast.Str on Python 3.14, unrelated to this change and present on dev. Fixed separately in #390.

Not yet verified: the live end-to-end submission, which needs this deployed to Pages. Re-driving issues #387, #388 and #389 is the acceptance test.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: deade768-46a9-4530-b177-410e6b56cd02


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.

@JarbasAl
JarbasAl force-pushed the fix/submission-target-branch branch 2 times, most recently from 820bdfc to 9ddc149 Compare August 25, 2026 20:50
Skill repos do not agree on a branch name. OVOS repos use dev, many
community repos use main or master. The SPA assumed dev everywhere, so a
submission to a repo without a dev branch could not be checked out and the
run died. The issue told the translator "a bot will create a PR
automatically", no PR appeared, and nothing reported the failure -- the
translation was lost in silence.

The scanner already falls back dev -> main -> master when it clones, but
discarded which branch won. It now records that branch, and the branch
travels with the skill data into repos.json and the editor, so submissions
and "edit on GitHub" links target a ref that exists.

Both workflows verify the requested branch against the remote and fall back
to the repository default, and both now comment on the issue when they fail,
so a broken submission is visible instead of silent.
@JarbasAl
JarbasAl marked this pull request as ready for review August 25, 2026 21:30
@JarbasAl
JarbasAl force-pushed the fix/submission-target-branch branch from 9ddc149 to ac3b802 Compare August 25, 2026 21:30
@JarbasAl
JarbasAl merged commit 1cb7b90 into dev Aug 25, 2026
1 check was pending
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