[sysadmin-bin] Use module name in Subject



commit 189088f662fb8f05944bda4cc47454bf5912667a
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Tue Jul 14 15:12:08 2020 +0200

    Use module name in Subject

 git/post-receive-mirror-github | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/git/post-receive-mirror-github b/git/post-receive-mirror-github
index 5409723..b2bafa5 100755
--- a/git/post-receive-mirror-github
+++ b/git/post-receive-mirror-github
@@ -224,7 +224,7 @@ def main():
     if github_settings['homepage'] != doap_settings['homepage']:
         gh.update_github_repo(repo_name, 'homepage', doap_settings["homepage"])
 
-    command = "git push git github com:{}/{} {}".format(gh.organization, github_repo_name, 
doap_settings['default_branch'])
+    command = "git push --force git github com:{}/{} {}".format(gh.organization, github_repo_name, 
doap_settings['default_branch'])
     run_command(command)
     gh.update_github_repo(repo_name, 'default_branch', doap_settings['default_branch'])
 
@@ -240,7 +240,7 @@ if __name__ == "__main__":
         main()
     except Exception as e:
         msg = MIMEText(str(e))
-        msg['Subject'] = "[GITHUB HOOK] ERROR trying to push %s" %  os.getcwd()
+        msg['Subject'] = "[GITHUB HOOK] ERROR trying to push {}".format(get_module_name())
         msg['From']    = "noreply gnome org"
         msg['To']      = "gnome-sysadmin gnome org"
         msg['X-GNOME-SERVICE'] = "github-mirror"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]