Skip to content

Commit 45c4266

Browse files
committed
Fix missing ref
1 parent a9a8db0 commit 45c4266

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const shell = require('shelljs');
1212

1313
const config = require('./config/config').settings;
1414
const Coverage = require('./coverage');
15-
const { request } = require('@octokit/request');
1615
const queue = new (require('./queue.js'))(); // The queue object for our app to use
1716

1817

@@ -342,12 +341,18 @@ function startJobTimer(job, kill_children = false) {
342341
* @param {Object} job - The Job with an associated process in the data field.
343342
*/
344343
async function initCoveralls(job) {
345-
log.extend('pipeline')('Setting COVERALLS env variables');
344+
const debug = log.extend('pipeline');
345+
debug('Setting COVERALLS env variables');
346346
process.env.COVERALLS_SERVICE_NAME = job.data.context;
347+
debug('COVERALLS_SERVICE_NAME = %s', job.data.context);
347348
process.env.COVERALLS_GIT_COMMIT = job.data.sha;
349+
debug('COVERALLS_GIT_COMMIT = %s', job.data.sha);
348350
process.env.COVERALLS_SERVICE_JOB_ID = job.id;
351+
debug('COVERALLS_SERVICE_JOB_ID = %i', job.id);
349352
process.env.COVERALLS_GIT_BRANCH = job.data.branch;
353+
debug('COVERALLS_GIT_BRANCH = %s', job.data.branch);
350354
process.env.CI_PULL_REQUEST = job.data.pull_number;
355+
debug('CI_PULL_REQUEST = %s', job.data.pull_number);
351356
}
352357

353358
/**

serve.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,10 +479,11 @@ async function eventCallback(event) {
479479
default: // Shouldn't get this far
480480
throw new TypeError(`event "${event.event}" not supported`);
481481
}
482+
ref = job_template['branch'];
482483

483484
// Log the event
484485
console.log('Received a %s event for %s to %s',
485-
eventType.replace('_', ' '), job_template['repo'], job_template['branch']);
486+
eventType.replace('_', ' '), job_template['repo'], ref);
486487

487488
// Determine what to do from settings
488489
if (!(eventType in config.events)) {

0 commit comments

Comments
 (0)