forked from the-distro/ofborg
Add more details to the build job
This commit is contained in:
parent
cb899fd322
commit
da0d9c816e
|
@ -82,8 +82,26 @@ function runner($msg) {
|
||||||
'attrs' => [],
|
'attrs' => [],
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
|
$client = gh_client();
|
||||||
|
$pr_deets = $client->api('pull_request')->show(
|
||||||
|
$in->repository->owner->login,
|
||||||
|
$in->repository->name,
|
||||||
|
$in->issue->number);
|
||||||
|
|
||||||
$forward = [
|
$forward = [
|
||||||
'payload' => $in,
|
'original_payload' => $in,
|
||||||
|
'repo' => [
|
||||||
|
'owner' => $in->repository->owner->login,
|
||||||
|
'name' => $in->repository->name,
|
||||||
|
'full_name' => $in->repository->full_name,
|
||||||
|
'clone_url' => $in->repository->clone_url,
|
||||||
|
],
|
||||||
|
'pr' => [
|
||||||
|
'number' => $in->issue->number,
|
||||||
|
'target_branch' => $pr_deets['base']['ref'],
|
||||||
|
'patch_url' => $pr_deets['patch_url'],
|
||||||
|
'head_sha' => $pr_deets['head']['sha'],
|
||||||
|
],
|
||||||
'build_default' => false,
|
'build_default' => false,
|
||||||
'attrs' => $tokens,
|
'attrs' => $tokens,
|
||||||
];
|
];
|
||||||
|
|
|
@ -23,7 +23,7 @@ $queueName = 'build-inputs-' . NIX_SYSTEM;
|
||||||
function runner($msg) {
|
function runner($msg) {
|
||||||
echo "got a job!\n";
|
echo "got a job!\n";
|
||||||
$body = json_decode($msg->body);
|
$body = json_decode($msg->body);
|
||||||
$in = $body->payload;
|
$in = $body->original_payload;
|
||||||
|
|
||||||
$co = new GHE\Checkout(WORKING_DIR, "builder");
|
$co = new GHE\Checkout(WORKING_DIR, "builder");
|
||||||
$pname = $co->checkOutRef($in->repository->full_name,
|
$pname = $co->checkOutRef($in->repository->full_name,
|
||||||
|
|
Loading…
Reference in a new issue