use of com.palantir.stash.stashbot.persistence.PullRequestMetadata in project stashbot by palantir.
the class ConfigurationPersistenceImpl method setPullRequestMetadata.
// Allows fromHash and toHash to be set by the caller, in case we are referring to older commits
/* (non-Javadoc)
* @see com.palantir.stash.stashbot.config.ConfigurationPersistenceService#setPullRequestMetadata(com.atlassian.stash.pull.PullRequest, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.Boolean, java.lang.Boolean, java.lang.Boolean)
*/
@Override
public void setPullRequestMetadata(PullRequest pr, String fromHash, String toHash, Boolean buildStarted, Boolean success, Boolean override, Boolean failed) {
PullRequestMetadata prm = getPullRequestMetadata(pr.getToRef().getRepository().getId(), pr.getId(), fromHash, toHash);
if (buildStarted != null) {
prm.setBuildStarted(buildStarted);
}
if (success != null) {
prm.setSuccess(success);
}
if (override != null) {
prm.setOverride(override);
}
if (failed != null) {
prm.setFailed(failed);
}
prm.save();
publisher.publish(new StashbotMetadataUpdatedEvent(this, pr));
}
Aggregations