summaryrefslogtreecommitdiff
path: root/app/models/commit.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-08-06 12:20:31 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2015-08-21 14:49:36 +0100
commit1ba150e1cf346239eafec3d530b3de3325501893 (patch)
treead4dabdd78669894eb2f3597b6805c4992d7bd70 /app/models/commit.rb
parent1fdd1fa6ae7bd1bda3235bfa8685463fb5597646 (diff)
downloadgitlab-ci-1ba150e1cf346239eafec3d530b3de3325501893.tar.gz
Add committed_at to commits to properly order last commit (the force push issue)
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r--app/models/commit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb
index 68057b7..a27c86b 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -245,6 +245,10 @@ class Commit < ActiveRecord::Base
commits.present? && commits.last[:message] =~ /(\[ci skip\])/
end
+ def update_committed!
+ update!(committed_at: DateTime.now)
+ end
+
private
def save_yaml_error(error)