new PluginResult(config)
Initializes a new instance of a plugin result object.
Note: this object is JSON serializable see serialize method.
Parameters:
Name | Type | Description |
---|---|---|
config |
deserializes an existing configuration to this object. |
Extends
- PluginResultBase
Methods
-
addCommit(commitData)
-
Parameters:
Name Type Description commitData
object Properties
Name Type Description commitHash
string hash of the commit.
status
string storage.constants./SYNCED/FORKED/MERGED
branchName
string name of branch that got updated with the commitHash.
-
getError()
-
Gets error if any error occured during execution. FIXME: should this be an Error object?
Returns:
- Type
- string
-
getFinishTime()
-
Gets the ISO 8601 representation of the time when the plugin finished its execution.
Returns:
- Type
- string
-
getStartTime()
-
Gets the ISO 8601 representation of the time when the plugin started its execution.
Returns:
- Type
- string
-
serialize()
-
Serializes this object to a JSON representation.
Returns:
- Type
- Object
-
setError(time)
-
Sets the error string if any error occured during execution. FIXME: should this be an Error object?
Parameters:
Name Type Description time
string -
setFinishTime(time)
-
Sets the ISO 8601 representation of the time when the plugin finished its execution.
Parameters:
Name Type Description time
string -
setPluginId(pluginName)
-
Sets the name of the plugin to which the result object belongs to.
Parameters:
Name Type Description pluginName
string name of the plugin
-
setPluginName(pluginName)
-
Sets the name of the plugin to which the result object belongs to.
Parameters:
Name Type Description pluginName
string name of the plugin
-
setProjectId(projectId)
-
Sets the name of the projectId the result was generated from.
Parameters:
Name Type Description projectId
string id of the project
-
setStartTime(time)
-
Sets the ISO 8601 representation of the time when the plugin started its execution.
Parameters:
Name Type Description time
string