Translation sync: improve result when no Pull Request is necessary
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
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?
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 Sorry for that 🙏 I'll make sure to use my own comments from now on.
Thanks! I'll get the PR ready soon.