diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-05-01 18:09:33 +0300 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-05-07 17:56:08 +0300 |
commit | 698a0c479858b5d76f0ce18934a23c4ea5a1e332 (patch) | |
tree | 6fd6add8b6c259fccf344b6203b21600446a8945 /app/models/ci | |
parent | bdc20840aaf5165e654498d011e6273d5e0fd240 (diff) |
Add a CI_COMMIT_MESSAGE predefined variable
Diffstat (limited to 'app/models/ci')
-rw-r--r-- | app/models/ci/pipeline.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 434b9b64c65..b44012ddc59 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -284,6 +284,14 @@ module Ci commit.try(:title) end + def git_commit_full_title + commit.try(:full_title) + end + + def git_commit_description + commit.try(:description) + end + def short_sha Ci::Pipeline.truncate_sha(sha) end @@ -491,6 +499,9 @@ module Ci .append(key: 'CI_PIPELINE_ID', value: id.to_s) .append(key: 'CI_CONFIG_PATH', value: ci_yaml_file_path) .append(key: 'CI_PIPELINE_SOURCE', value: source.to_s) + .append(key: 'CI_COMMIT_MESSAGE', value: git_commit_message) + .append(key: 'CI_COMMIT_TITLE', value: git_commit_full_title) + .append(key: 'CI_COMMIT_DESCRIPTION', value: git_commit_description) end def queued_duration |