You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a PR with changes to (translatable) EN docs is merged while there is a Weblate PR open, it leads to conflicts that make Weblate lock up.
One way to address this might be to automatically add a "Check for Weblate PR" label to PRs that involve translatable EN docs. Merging would be blocked unless this label is removed. Of course this could be bypassed by removing the label and merging regardless of whether there's a Weblate PR, but I think that's improbable - we just need a reminder.
would this work,
.github/workflows/block-weblate-conflicts.yml
name: Weblate Conflict Check
# Only run this when someone opens or updates a PR
on:
pull_request:
# Target the specific folders where English docs live.
# (You may need to adjust these paths based on the exact repo structure)
paths:
- 'en/**'
- '_pages/en/**'
- '_docs/en/**'
jobs:
check-weblate-status:
name: Check for open Weblate PRs
runs-on: ubuntu-latest
steps:
- name: Query GitHub API for Weblate PRs
env:
# Use the built-in token to authenticate the gh cli
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Check for any open PRs created by the Weblate bot/user
# Note: Verify the exact username Weblate uses in this repo (e.g., 'weblate', 'jamulus-weblate')
WEBLATE_AUTHOR="weblate"
echo "Checking for open PRs from author: $WEBLATE_AUTHOR..."
OPEN_PRS=$(gh pr list --state open --author "$WEBLATE_AUTHOR" --json number --jq 'length')
if [ "$OPEN_PRS" -gt 0 ]; then
echo "::error title=Weblate Conflict Detected::There are currently $OPEN_PRS open Weblate translation PR(s)."
echo "Merging English documentation changes right now will cause Weblate to lock up."
echo "Please wait until the Weblate PR is merged before proceeding."
exit 1
else
echo "No open Weblate PRs detected. The coast is clear to merge!"
exit 0
fi
I'd had a go at this using labels but that involved using external actions. I like this approach as it seems much simpler but effective. @JaminShanti have you tested it?
Activity
pljones commentedon Sep 24, 2025
Yeah, good idea.
JaminShanti commentedon May 14, 2026
would this work,
.github/workflows/block-weblate-conflicts.yml
ignotus666 commentedon Jun 10, 2026
I'd had a go at this using labels but that involved using external actions. I like this approach as it seems much simpler but effective. @JaminShanti have you tested it?
JaminShanti commentedon Jun 10, 2026
I didn't. Mock up but seemed to fit what you wanted to check for while not adding burdon to commiters
pljones commentedon Jul 19, 2026
@JaminShanti you should be able to test it in your own Github fork.