Skip to content

Feature/issue 1094 weblate block - #1161

Draft
JaminShanti wants to merge 3 commits into
jamulussoftware:releasefrom
JaminShanti:feature/issue-1094-weblate-block
Draft

Feature/issue 1094 weblate block#1161
JaminShanti wants to merge 3 commits into
jamulussoftware:releasefrom
JaminShanti:feature/issue-1094-weblate-block

Conversation

@JaminShanti

Copy link
Copy Markdown

Short description of changes
Adds a new GitHub Actions workflow (check-weblate-prs.yml) that triggers on pull requests modifying English documentation. It uses the GitHub CLI to query if there are any open PRs authored by the Weblate bot. If an active Weblate PR is found, the workflow intentionally fails the status check to block the merge and prevent po4a translation conflicts.

Context: Fixes an issue? Related issues
Fixes #1094

Status of this Pull Request
Working implementation (Draft / Testing pipeline execution).

What is missing until this pull request can be merged?
Because I am a first-time contributor, a maintainer will likely need to click "Approve and run" on the Actions tab so the CI pipeline can execute. I want to verify that the Bash script correctly identifies the exact Weblate bot author name used in this repository before marking this as ready for review.

Does this need translation?
NO.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I'm sure that this Pull Request goes to the correct branch

@JaminShanti
JaminShanti force-pushed the feature/issue-1094-weblate-block branch from affba80 to 447931f Compare July 27, 2026 22:13
@JaminShanti

Copy link
Copy Markdown
Author

Hi everyone, this is ready for review.

To resolve #1094, I've added a new GitHub Actions workflow (check-weblate-prs.yml) that acts as a status check on PRs modifying English documentation.

Implementation details:

  • The job triggers only when files in doc-related paths (**/*.md, _pages/**, _posts/**) are modified.
  • It uses the built-in gh CLI to query the repository for any open pull requests authored by weblate.
  • If an active Weblate PR is detected, it outputs a clear GitHub ::error:: annotation explaining the conflict and exits with code 1 to block the merge.

Testing & Evidence:
I verified the logic directly in this draft PR by temporarily pushing a dummy doc commit to trigger the paths filter. The runner successfully detected an active Weblate PR currently open on the repo and failed the pipeline exactly as expected. Here is the output from that runner job:

Checking jamulussoftware/jamuluswebsite for open PRs from weblate...
Error: Found 1 open Weblate PR(s). Merging changes to English documentation is blocked to prevent po4a translation conflicts.
Error: Process completed with exit code 1.

@ann0see
ann0see requested a review from ignotus666 July 30, 2026 17:25
@ignotus666

ignotus666 commented Jul 30, 2026

Copy link
Copy Markdown
Member

It looks ok, but the only files that need to be checked for changes that affect translation are in 'wiki/en/**' (see paths in this workflow) - these are the ones that will trigger a po4a update. Anything else won't.

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.

Block merging of EN docs if Weblate PR open

2 participants