Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Rebert2015-03-04 09:58:17 +0000
committerChris Rebert2015-03-04 09:58:17 +0000
commit7f02b89a2a6bb78942c695317657c081e5b310ce (patch)
treecb4392bafd131d250b26252eb8b0a022168a0303 /org.eclipse.egit.github.core/src
parentf1d59a3fbc06d7df00910d84eaff988cd8b12ea4 (diff)
downloadegit-github-7f02b89a2a6bb78942c695317657c081e5b310ce.tar.gz
egit-github-7f02b89a2a6bb78942c695317657c081e5b310ce.tar.xz
egit-github-7f02b89a2a6bb78942c695317657c081e5b310ce.zip
Added `context` field to the CommitStatus class
Relevant GitHub API docs: https://developer.github.com/v3/repos/statuses/ This field is used to indicate the service that provided the commit status in question. Its value is an (apparently arbitrary) string with a default value of "default". Conventionally, the value should be of the form "generic-category/specific-service", as in "continuous-integration/jenkins" or "security/brakeman". Bug: 461351 Change-Id: Ifef4e369c4d602ac6a5d1f12c399d059052b8abc Signed-off-by: Chris Rebert <eclipse@rebertia.com>
Diffstat (limited to 'org.eclipse.egit.github.core/src')
-rw-r--r--org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/CommitStatus.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/CommitStatus.java b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/CommitStatus.java
index fde7bdbb..b6df83e4 100644
--- a/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/CommitStatus.java
+++ b/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/CommitStatus.java
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2012 GitHub Inc.
+ * Copyright (c) 2012, 2015 GitHub Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -48,6 +48,8 @@ public class CommitStatus implements Serializable {
private long id;
+ private String context;
+
private String description;
private String state;
@@ -107,6 +109,22 @@ public class CommitStatus implements Serializable {
}
/**
+ * @return context
+ */
+ public String getContext() {
+ return context;
+ }
+
+ /**
+ * @param context
+ * @return this status
+ */
+ public CommitStatus setContext(final String context) {
+ this.context = context;
+ return this;
+ }
+
+ /**
* @return description
*/
public String getDescription() {

Back to the top