Skip to content

Block merging of EN docs if Weblate PR open #1094

Open

Description

@ignotus666

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.

Activity

  1. pljones commented on Sep 24, 2025

    @pljones
    Contributor

    Yeah, good idea.

  2. added this to the Release 4.0.0 milestone on Apr 26, 2026
  3. JaminShanti commented on May 14, 2026

    @JaminShanti

    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
    
  4. ignotus666 commented on Jun 10, 2026

    @ignotus666
    MemberAuthor

    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?

  5. JaminShanti commented on Jun 10, 2026

    @JaminShanti

    I didn't. Mock up but seemed to fit what you wanted to check for while not adding burdon to commiters

  6. pljones commented on Jul 19, 2026

    @pljones
    Contributor

    @JaminShanti you should be able to test it in your own Github fork.

  7. moved this from Triage to In Progress in Trackingon Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

release processChanges to the release process

Type

No type

Projects

  • Status
    In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions