diff options
Diffstat (limited to 'firehose/plugin')
-rw-r--r-- | firehose/plugin/firehose_plugin.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/firehose/plugin/firehose_plugin.py b/firehose/plugin/firehose_plugin.py index 05460f8..b1ddad6 100644 --- a/firehose/plugin/firehose_plugin.py +++ b/firehose/plugin/firehose_plugin.py @@ -90,6 +90,7 @@ class FirehosePlugin(cliapp.Plugin): firehose_git(self.app): self.base_path = tfs.getsyspath("/") self.make_workspace() + self.setup_git() self.make_branch(confs[0].landing) self.log_sha(os.path.basename(fname.replace('.yaml',''))) self.insert_githook() @@ -106,6 +107,13 @@ class FirehosePlugin(cliapp.Plugin): def make_workspace(self): self.app.subcommands['init']([self.make_path("ws")]) + def setup_git(self): + git_username = self.app.settings['git-username'] + git_email = self.app.settings['git-email'] + if (len(git_username) > 1) and (len(git_email) > 1): + self.app.runcmd(['git', 'config', '--global', 'user.name', git_username]) + self.app.runcmd(['git', 'config', '--global', 'user.email', git_email]) + def make_branch(self, root): os.chdir(self.make_path("ws")) try: |