Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/388686 )

Change subject: Fix "install" command via commit-message-validator
......................................................................

Fix "install" command via commit-message-validator

The entry_point for the commit-message-validator command is the
main() function, which didn't check whether the install subcommand
is provided.

Change-Id: Iaee8633ca1bcd513ec2d7c8a3fed8ec78ffa80db
---
M commit_message_validator/__init__.py
1 file changed, 7 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/commit-message-validator 
refs/changes/86/388686/1

diff --git a/commit_message_validator/__init__.py 
b/commit_message_validator/__init__.py
index a552cbb..17c5bc3 100644
--- a/commit_message_validator/__init__.py
+++ b/commit_message_validator/__init__.py
@@ -253,7 +253,7 @@
     return subprocess.check_output(args).decode("utf8")
 
 
-def main(commit_id='HEAD'):
+def validate(commit_id='HEAD'):
     """Validate the current HEAD commit message."""
     # First, we need to check if HEAD is a merge commit
     # We do this by telling if it has multiple parents
@@ -301,8 +301,12 @@
     return 0
 
 
-if __name__ == '__main__':
+def main():
     if sys.argv[-1] == 'install':
         sys.exit(install())
     else:
-        sys.exit(main())
+        sys.exit(validate())
+
+
+if __name__ == '__main__':
+    main()

-- 
To view, visit https://gerrit.wikimedia.org/r/388686
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaee8633ca1bcd513ec2d7c8a3fed8ec78ffa80db
Gerrit-PatchSet: 1
Gerrit-Project: integration/commit-message-validator
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to