public class DifferentialClient
extends java.lang.Object
Constructor and Description |
---|
DifferentialClient(java.lang.String diffID,
ConduitAPIClient conduit) |
Modifier and Type | Method and Description |
---|---|
protected net.sf.json.JSONObject |
callConduit(java.lang.String methodName,
net.sf.json.JSONObject params) |
net.sf.json.JSONObject |
fetchDiff()
Fetch a differential from Conduit
|
java.lang.String |
getCommitMessage(java.lang.String revisionID)
Fetch the commit message for the revision.
|
net.sf.json.JSONObject |
postComment(java.lang.String revisionID,
java.lang.String message)
Post a comment on the differential
|
net.sf.json.JSONObject |
postComment(java.lang.String revisionID,
java.lang.String message,
boolean silent,
java.lang.String action)
Posts a comment to a differential
|
net.sf.json.JSONObject |
sendHarbormasterMessage(java.lang.String phid,
HarbormasterClient.MessageType messageType,
UnitResults unitResults,
java.util.Map<java.lang.String,java.lang.String> coverage,
LintResults lintResults)
Sets a sendHarbormasterMessage build status
|
net.sf.json.JSONObject |
sendHarbormasterUri(java.lang.String phid,
java.lang.String buildUri)
Uploads a uri as an 'artifact' for Harbormaster to display
|
public DifferentialClient(java.lang.String diffID, ConduitAPIClient conduit)
public net.sf.json.JSONObject postComment(java.lang.String revisionID, java.lang.String message, boolean silent, java.lang.String action) throws java.io.IOException, ConduitAPIException
revisionID
- the revision ID (e.g. "D1234" without the "D")message
- the content of the commentsilent
- whether or not to trigger an emailaction
- phabricator comment action, e.g. 'resign', 'reject', 'none'java.io.IOException
- if there is a network error talking to ConduitConduitAPIException
- if any error is experienced talking to Conduitpublic net.sf.json.JSONObject fetchDiff() throws java.io.IOException, ConduitAPIException
java.io.IOException
- if there is a network error talking to ConduitConduitAPIException
- if any error is experienced talking to Conduitpublic net.sf.json.JSONObject sendHarbormasterMessage(java.lang.String phid, HarbormasterClient.MessageType messageType, UnitResults unitResults, java.util.Map<java.lang.String,java.lang.String> coverage, LintResults lintResults) throws ConduitAPIException, java.io.IOException
phid
- Phabricator object IDmessageType
- type of message to send; either 'pass', 'fail' or 'work'unitResults
- the results from the unit testscoverage
- the results from the coverage providerjava.io.IOException
- if there is a network error talking to ConduitConduitAPIException
- if any error is experienced talking to Conduitpublic net.sf.json.JSONObject sendHarbormasterUri(java.lang.String phid, java.lang.String buildUri) throws ConduitAPIException, java.io.IOException
phid
- Phabricator object IDbuildUri
- Uri to display, presumably the jenkins buildsjava.io.IOException
- if there is a network error talking to ConduitConduitAPIException
- if any error is experienced talking to Conduitpublic net.sf.json.JSONObject postComment(java.lang.String revisionID, java.lang.String message) throws ConduitAPIException, java.io.IOException
revisionID
- the revision ID (e.g. "D1234" without the "D")message
- the string message to postjava.io.IOException
- if there is a network error talking to ConduitConduitAPIException
- if any error is experienced talking to Conduitpublic java.lang.String getCommitMessage(java.lang.String revisionID) throws ConduitAPIException, java.io.IOException
revisionID
- The ID of the revision, e.g. for "D123" this would be "123"ConduitAPIException
java.io.IOException
protected net.sf.json.JSONObject callConduit(java.lang.String methodName, net.sf.json.JSONObject params) throws ConduitAPIException, java.io.IOException
ConduitAPIException
java.io.IOException