Skip to content

Commit

Permalink
Skip checking .po file if it's not edited on the current branch
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Aug 29, 2024
1 parent 3c55cbd commit 416474f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ jobs:
linter_env = new.env()
for (f in list.files('.ci/linters/po', full.names=TRUE)) sys.source(f, linter_env)
for (po_file in list.files(pattern = "[.]po$", full.names=TRUE)) {
# only pay attention to files edited in the current PR, otherwise we can get
# a situation like after #6424 where some untranslated messages were added
# as part of non-translation maintenance, but this GHA would go red repeatedly
# until a translation is added or the blank/fuzzy translations removed. We'd
# rather only have the failure on one PR, then ignore these files later.
diff_v_master = system2("git", c("diff", "master", po_file), stdout=TRUE)
if (!length(diff_v_master)) next
for (linter in ls(linter_env)) linter_env[[linter]](po_file)
}
shell: Rscript {0}
Expand Down

0 comments on commit 416474f

Please sign in to comment.