Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve exception handling #23

Merged
merged 7 commits into from
Feb 18, 2021
Merged

Improve exception handling #23

merged 7 commits into from
Feb 18, 2021

Conversation

jesusvasquez333
Copy link
Owner

@jesusvasquez333 jesusvasquez333 commented Feb 18, 2021

This PR removed the raise of exceptions to avoid generating stack tracebacks on the console output. Instead, error messages are printed and the script exits on an error code. Error messages are also prefixed with ERROR: for clarify, and they are send to stderr. stdin, stdout and stderr are forced to be totally unbuffered, to preserve the order of messages in the logs.

The handling of input argument is improved as well. The scripts makes sure that the GitHub token is not empty, and the list of labels are converted to python list, using , as delimiter and stripping white spaces.

Additionally, this PR clarifies the use of the pull-request-numer input, which is mandatory when the action is trigger using pull_request_target.

This resolves #19

@jesusvasquez333 jesusvasquez333 added the enhancement New feature or request label Feb 18, 2021
@jesusvasquez333 jesusvasquez333 self-assigned this Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception when event does not have a pull request number
1 participant