Open abid-mujtaba opened 10 months ago
at first glance, it seems like the bot is trying to create a merge action on a PR that is still a draft. adding a check in Merge action to skip on PR that are draft might work
Indeed. I am wondering, however, if the app crashing here is expected behavior?
it's is not the desirable behavior, this is most likely caused by changes to github api over the year that the code is not built to handle.
Thanks. Let me start investigating that.
This started to happen when I switched the app's underlying node from v14 to v18. I think the app has started crashing on these errors because in v15 the default behavior for unhandled promise rejection was switched to crashing the app.
To address this I added the following to the start of my index.js
:
process.on('unhandledRejection', (reason, promise) => {
console.log('WARNING: Ignoring unhandled promise rejection at:', promise, 'reason:', reason);
});
Do we want to add this for everyone, perhaps controlled by an IGNORE_UNHANDLED_PROMISE_REJECTION
env var?
The app makes a request to the Github (enterprise) API using
'user-agent': 'probot/12.3.3 octokit-core.js/3.6.0 Node.js/18.18.2 (linux; x64)'
the merge request is rebuffed because the PR is still a draft. This causes the app to crash:Does anyone have any idea what might be causing this?