[openstreetmap/openstreetmap-website] Added workflow for PR labeling using Danger (PR #4988)
Nenad Vujicic
notifications at github.com
Tue Aug 27 12:03:54 UTC 2024
@nenad-vujicic commented on this pull request.
> + is_good_pr = false
+else
+ auto_label.remove("Big PR")
+end
+
+# Get list of translation files (except en.yml) which are modified
+modified_yml_files = git.modified_files.select do |file|
+ file.start_with?("config/locales") && File.extname(file) == ".yml" && File.basename(file) != "en.yml"
+end
+
+# Report if some translation file (except en.yml) is modified
+if modified_yml_files.empty?
+ auto_label.remove("Compromised Translations")
+else
+ modified_files_str = modified_yml_files.map { |file| "`#{file}`" }.join(", ")
+ warn("The following YAML files other than `en.yml` have been modified: #{modified_files_str}. Only `en.yml` is allowed to be changed.")
Added, thanks!
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4988#discussion_r1732716114
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4988/review/2263112488 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240827/6f6246db/attachment.htm>
More information about the rails-dev
mailing list