Fix logs and variable

This commit is contained in:
Andrea Maria Piana 2020-12-29 10:01:58 +01:00
parent 0884539c91
commit 6be1284736
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
1 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@ const zh = require("../zh-client"),
{ INPUT_REVIEW_COLUMN, INPUT_INPROG_COLUMN, INPUT_NEXT_COLUMN } = process.env;
exports.milestoned = async function handleMilestonedIssue(tools) {
tools.log.info("Handling assigned issue...");
tools.log.info("Handling milestoned issue...");
const failures = [],
{ payload } = tools.context;
@ -23,16 +23,16 @@ exports.milestoned = async function handleMilestonedIssue(tools) {
}
// Move it to the NEXT column
try {
tools.log.info(`Moving issue #${issueNo} to in progress...`);
tools.log.info(`Moving issue #${issueNo} to next...`);
await zh.issues.moveIssueBetweenPipelines(payload.repository.id, issueNo, {
pipeline_id: NEXT_INPROG_COLUMN,
pipeline_id: INPUT_NEXT_COLUMN,
position: "top",
});
tools.log.info(`Moved #${issueNo} to in progress.`);
tools.log.info(`Moved #${issueNo} to in next.`);
} catch (e) {
failures.push(`Failed to move #${issueNo} to in progress: ${e}`);
failures.push(`Failed to move #${issueNo} to in next: ${e}`);
}
};