diff options
Diffstat (limited to 'qa/qa/git/repository.rb')
-rw-r--r-- | qa/qa/git/repository.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qa/qa/git/repository.rb b/qa/qa/git/repository.rb index e0fcb9b0599..035946b8471 100644 --- a/qa/qa/git/repository.rb +++ b/qa/qa/git/repository.rb @@ -118,6 +118,10 @@ module QA run(%Q{git config user.signingkey #{@gpg_key_id} && git config gpg.program $(command -v gpg) && git commit -S -m "#{message}"}).to_s end + def current_branch + run("git rev-parse --abbrev-ref HEAD").to_s + end + def push_changes(branch = 'master') run("git push #{uri} #{branch}", max_attempts: 3).to_s end |