[openstreetmap/openstreetmap-website] Add authorship check for config/locales (#2740)

Grant notifications at github.com
Tue Jul 28 22:47:16 UTC 2020


@Firefishy commented on this pull request.



> +#
+cd `dirname $0`
+
+# Look at just a specific commit range, expressed as "SHA1...SHA2"
+COMMIT_RANGE=$1
+
+# Assume everything will be fine
+STATUS=0
+
+for FILE in *.yml; do
+  # Don't check authorship of en.yml
+  if [ $FILE != en.yml ]; then
+    HUMAN_AUTHOR=`git log --format='%ae' $COMMIT_RANGE -- $FILE | grep -v @translatewiki.net | head -n1`
+    if [ $HUMAN_AUTHOR ]; then
+      # Mark for failure if changes were made by anyone other than translatewiki.net
+      echo Found $HUMAN_AUTHOR in $FILE

Likely a good idea to add more output here to explain the policy reason for the failure.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2740#pullrequestreview-457080817
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200728/be892479/attachment.htm>


More information about the rails-dev mailing list