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

Project Management Automation: Call core setFailed with error message #20012

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

aduth
Copy link
Member

@aduth aduth commented Feb 3, 2020

Previously: #20009

This pull request seeks to reintroduce error handling removed as part of #20009. This time, it seeks to report the error using setFailed from the @actions/core package. This is also consistent with other usage a few lines above where a failure of a missing token is reported using this means.

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-a-javascript-action#write-the-action-code

const token = getInput( 'github_token' );
if ( ! token ) {
setFailed( 'main: Input `github_token` is required' );
return;
}

@aduth aduth added [Type] Bug An existing feature does not function as intended [Type] Project Management Meta-issues related to project management of Gutenberg labels Feb 3, 2020
@aduth aduth requested a review from epiqueras February 3, 2020 19:28
@aduth aduth merged commit 0b491a9 into master Feb 3, 2020
@aduth aduth deleted the update/pm-automation-fail-loudly-2 branch February 3, 2020 19:46
@aduth
Copy link
Member Author

aduth commented Feb 3, 2020

This time it failed, as expected (in other words, "works as expected"):

https://github.com/WordPress/gutenberg/runs/423916394?check_suite_focus=true

I'll now merge #20011 to fix the existing issue with the add-milestone task.

@ellatrix ellatrix added this to the Gutenberg 7.5 milestone Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended [Type] Project Management Meta-issues related to project management of Gutenberg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants