You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The push event handler function is only awaited and not returned. The function itself doesn't return anything anyway, so it would need to be modified to return something to fix this issue.
Since it's not returned, this causes the throw to be hit when processing a push event, since the result is undefined.
if (Array.isArray(result)) {
logger.info("More than one result, using first result for action output");
singleResult = result[0];
} else if (result != null) {
singleResult = result;
} else {
throw new Error("invalid result!");
}
I am attempting to create pull requests to develop/staging when I merge to main, and then immediately merge all prs labeled auto-merge, but it seems like this step doesn't find all prs with the given label and merge them, it needs to be triggered by an event which would pass in the pullrequest number into the process. Is that correct or is there a way to just auto merge all the prs labeled automerge with this?
I also I have recently stumbled across this error:
2025-02-05T15:30:55.708Z INFO Action result: undefined
2025-02-05T15:30:55.713Z Error: invalid result!
at executeGitHubAction (/home/runner/work/_actions/pascalgn/automerge-action/v0.16.4/dist/index.js:89:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async main (/home/runner/work/_actions/pascalgn/automerge-action/v0.16.4/dist/index.js:40828:5)
After looking at the code (before noticing this issue), I concur this error is due to the fact on the push event it doesn't return anything to the parent function. Therefore, it errors out, and no PRs are merged. This is probably just a missed line when it was refactored in PR #186.
automerge-action/lib/api.js
Line 97 in 7961b8b
The push event handler function is only awaited and not returned. The function itself doesn't return anything anyway, so it would need to be modified to return something to fix this issue.
Since it's not returned, this causes the throw to be hit when processing a push event, since the result is undefined.
I am attempting to create pull requests to develop/staging when I merge to main, and then immediately merge all prs labeled auto-merge, but it seems like this step doesn't find all prs with the given label and merge them, it needs to be triggered by an event which would pass in the pullrequest number into the process. Is that correct or is there a way to just auto merge all the prs labeled automerge with this?
Here's what I'm trying to do atm
The text was updated successfully, but these errors were encountered: