Upsource connector
var UpsourceClient = require('upsource-connector');
var upsource = new UpsourceClient({
host: '192.168.1.1',
basic_auth: {
username: 'my-username',
password: 'my-password'
}
});
upsource.project.refresh('projectId', function (err, data) {
if (err) {
console.log('Error', err);
} else {
console.log(data);
}
});
upsource.project.getAllProjects(function (err, data) {
if (err) {
console.log('Error', err);
} else {
console.log(data.result);
}
});
upsource.review.createReview('projectId', 'Test review', null, 'branch-name', function (err, data) {
if (err) {
console.log('Error', err);
} else {
console.log(data);
}
});
upsource.review.removeReview('projectId', 'reviewId', function (err, data) {
if (err) {
console.log('Error', err);
} else {
console.log(data);
}
});
upsource.user.getUsersForReview('projectId', 'reviewId', function (err, data) {
if (err) {
console.log('Error', err);
} else {
console.log(data);
}
});
upsource.review.addParticipant('projectId', 'reviewId', 'userId', function (err, data) {
if (err) {
console.log('Error', err);
} else {
console.log(data);
}
});