Skip to content

Commit

Permalink
Merge pull request #6427 from Rdatatable/08-29-skip_checking_.po_file…
Browse files Browse the repository at this point in the history
…_if_it_s_not_edited_on_the_current_branch

Skip checking .po file if it's not edited on the current branch
  • Loading branch information
MichaelChirico authored Aug 31, 2024
2 parents eb29893 + e944c44 commit 9fe0168
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 9fe0168

Please sign in to comment.