Skip to content

Commit

Permalink
dist
Browse files Browse the repository at this point in the history
  • Loading branch information
Logerfo committed Oct 25, 2019
1 parent 948c921 commit 1b8e4a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ async function run() {

case "check_run":
if (auto_merge) {
context.payload.check_run.pull_requests.forEach(async function (element) {
for (const element of context.payload.check_run.pull_requests) {
const pullResponse = await client.pulls.get({
owner,
pull_number: element.number,
Expand All @@ -464,7 +464,7 @@ async function run() {
else {
core.info(`Pull request #${element.number} does not have the label ${label}. Skipping...`);
}
});
}
}
else {
core.info("Auto merge is disabled. You should remove the `check_run` event from the action configuration. Skipping...");
Expand All @@ -475,6 +475,7 @@ async function run() {
catch (err) {
//Even if it's a valid situation, we want to fail the action in order to be able to find the issue and fix it.
core.setFailed(err.message);
core.debug(JSON.stringify(err));
}
}

Expand All @@ -496,7 +497,7 @@ async function push() {
repo,
state: "open",
});
core.debug(pulls.data);
core.debug(JSON.stringify(pulls.data));
let pull_number;
if (pulls.data.length == 1) {
const data = pulls.data[0];
Expand Down Expand Up @@ -524,7 +525,7 @@ async function push() {
issue_number: pull_number,
labels: [label],
owner,
repo
repo,
});
core.info(`Label ${label} added to #${pull_number}.`);
core.debug(JSON.stringify(labelsResponse.data));
Expand Down

0 comments on commit 1b8e4a7

Please sign in to comment.