Specific events causes error logs
See original GitHub issueI understand this is the current approach for handling events but I think it should end without a failure.
if present, the action will exit with a failing status code for any event that is not allowed.
This causes some confusion in the following scenario:
{
event: [ 'issues.opened' ],
}
In GitHub we cannot specify to run an action on issues.opened
we can only run an action on issues
. This means that all the actions that run on issues
are going to get an error log. Which causes confusion like seen in this issue: https://github.com/alex-page/add-new-issue-project/issues/3
✖ error Event `issues.assigned` is not supported by this action.
I think these actions should log with a neutral state if the user is using a specific action and they are using the parent event.
I can do a simple work around which is nice:
if( tools.context.payload.action !== 'opened' ){
tools.exit.neutral( `Event ${ action } is not supported by this action.` )
}
Let me know if you think this is an issue, happy to close it if there is some functionality I don’t understand or reasoning for this approach.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Yeah definitely, thanks @JasonEtco
I think that’s the behavior right now - if I make an Action with this:
It will exit with a failure whenever I push the the PR (kicking off a
pull_request.synchronize
). It should instead exit neutral, otherwise it’ll report a failing status. Does that help clarify things?