Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Translation sync: improve result when no Pull Request is necessary

Open david-allison opened this issue 7 months ago • 4 comments

Currently this fails with an 'error'

Run git add docs/marketing/localized_description AnkiDroid/src/main/res
On branch i18n_sync
nothing to commit, working tree clean
Error: Process completed with exit code 1.

https://github.com/ankidroid/Anki-Android/actions/runs/24928497735


It would be better to terminate this check with a 'neutral' result

The check run completed with a neutral result. This is treated as a success for dependent checks in GitHub Actions.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks#:~:text=check%20run%20failed.-,neutral,-The%20check%20run

david-allison avatar Apr 25 '26 10:04 david-allison

To address the 'neutral' requirement, I plan to use github-script to check for staged changes. If the tree is clean, I will call github.rest.checks.create with a neutral conclusion to ensure the gray status icon appears instead of a green 'success'. Is this the preferred way to handle the neutral implementation?

DoomsCoder avatar Apr 25 '26 19:04 DoomsCoder

Sounds reasonable, thanks!


Just to check: is your comment LLM-generated? I'm uncertain.

If so, it should be avoided: https://github.com/ankidroid/Anki-Android/blob/main/AI_POLICY.md#contributors - it's demotivating for people to converse with LLMs and contributes to maintainer burnout

david-allison avatar Apr 26 '26 19:04 david-allison

@david-allison Sorry for that 🙏 I'll make sure to use my own comments from now on.

DoomsCoder avatar Apr 27 '26 06:04 DoomsCoder

Thanks! I'll get the PR ready soon.

DoomsCoder avatar Apr 27 '26 07:04 DoomsCoder