in azure-pipelines-wrapper/conflict_detect.js [15:52]
async function check_create(app, context, uuid, owner, repo, url, commit, check_name, result, status, output_title, output_summary){
if (! result) {
app.log.error(`[ CONFLICT DETECT ] [${uuid}] check_create: result=BLANK`)
result = SUCCESS
}
param={
owner: owner,
repo: repo,
head_sha: commit,
name: check_name,
status: status,
conclusion: result,
output: {
title: output_title,
summary: output_summary,
},
}
app.log.info([`[ CONFLICT DETECT ] [${uuid}] check_create`, result, status, output_title, output_summary].join(" "))
let check = await context.octokit.rest.checks.create(param);
let eventDatas = [];
let dateString = new Date().toISOString()
let payload = {
"action": status,
"pr_url": url,
"output": output_summary,
"result": result,
};
let eventData = {
body: {"Timestamp": dateString, "Name": check_name, "Action": status, "Payload": payload}
};
eventDatas.push(eventData);
eventhub.sendEventBatch(eventDatas, app);
if (check.status/10 >= 30 || check.status/10 < 20){
app.log.error([`[ CONFLICT DETECT ] [${uuid}] check_create`, util.inspect(check, {depth: null})].join(" "))
} else {
app.log.info([`[ CONFLICT DETECT ] [${uuid}] check_create`, check.status].join(" "))
}
}