summaryrefslogtreecommitdiff
path: root/app/models/generic_commit_status.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/generic_commit_status.rb')
-rw-r--r--app/models/generic_commit_status.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/models/generic_commit_status.rb b/app/models/generic_commit_status.rb
new file mode 100644
index 00000000000..fa54e3540d0
--- /dev/null
+++ b/app/models/generic_commit_status.rb
@@ -0,0 +1,15 @@
+class GenericCommitStatus < CommitStatus
+ before_validation :set_default_values
+
+ # GitHub compatible API
+ alias_attribute :context, :name
+
+ def set_default_values
+ self.context ||= 'default'
+ self.stage ||= 'external'
+ end
+
+ def tags
+ [:external]
+ end
+end