labeler
labeler copied to clipboard
Errors from yaml syntax errors doesn't fail the action
Hi, we are using the v3-preview branch and accidentally had some incorrect yaml syntax in our configuration for this action:
"t: docs 📚":
- docs/*
- docs/**/*
- ./**/*.md
"a: test"
- api/api/**/*
(note the missing : after "a: test".
This led to the following logged out failure from the action:
(node:29872) UnhandledPromiseRejectionWarning: TypeError: (s || "").replace is not a function
at escapeData (/home/actions/actions-runner/_work/_actions/EmbarkStudios/labeler/v3-preview/dist/index.js:6253:10)
at Command.toString (/home/actions/actions-runner/_work/_actions/EmbarkStudios/labeler/v3-preview/dist/index.js:6247:35)
at issueCommand (/home/actions/actions-runner/_work/_actions/EmbarkStudios/labeler/v3-preview/dist/index.js:6210:30)
at Object.issue (/home/actions/actions-runner/_work/_actions/EmbarkStudios/labeler/v3-preview/dist/index.js:6214:5)
at Object.error (/home/actions/actions-runner/_work/_actions/EmbarkStudios/labeler/v3-preview/dist/index.js:9985:15)
at /home/actions/actions-runner/_work/_actions/EmbarkStudios/labeler/v3-preview/dist/index.js:12393:18
at Generator.throw (<anonymous>)
at rejected (/home/actions/actions-runner/_work/_actions/EmbarkStudios/labeler/v3-preview/dist/index.js:12350:65)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:29872) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:29872) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
But the action itself didn't report that it failed, it was green, which was unexpected.
The action itself should really fail and report a failure if it runs into such a fatal error
Had the same issue when specifying actions/labeler@master instead of actions/labeler@v2 to use the any and all functionality stated https://github.com/actions/labeler/issues/73#issuecomment-639034278
My configuration looks like this
repo:
- any: [./*]
Result Action passed, no labels added and the unhandled promise message.
Hello everyone! This issue has been open for a year without any activity, so I'm going to close it as stale. Please feel free to contact us if the issue is still relevant to you and we will reopen it. Thanks!