Skip to content

Commit

Permalink
Prevent pull requests modifying translations
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdoming committed Jan 4, 2025
1 parent a517b10 commit 0ddc6ca
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ yarn.lock text eol=lf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary

# Mark translation files as generated
packages/desktop-client/locale/*.json linguist-generated=true
14 changes: 14 additions & 0 deletions .github/workflows/auto-close-translation-prs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 🔒 Auto-close Pull Requests that modify translations

on:
pull_request_target:
types: [opened]
paths: 'packages/desktop-client/locale/*.json'

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: superbrothers/close-pull-request@v3
with:
comment: "👋 This repository does not accept pull requests for translations. Please contribute on [Weblate](https://hosted.weblate.org/projects/actualbudget/) instead."
2 changes: 2 additions & 0 deletions packages/desktop-client/locale/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> [!CAUTION]
> Please do not open Pull Requests changing this directory! Pull Requests with changes to this directory will be automatically closed. Instead, contribute to the [Weblate project](https://hosted.weblate.org/projects/actualbudget/).

0 comments on commit 0ddc6ca

Please sign in to comment.