Skip to content

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

Merged
aduth merged 1 commit into
masterfrom
update/pm-automation-fail-loudly-2
Feb 3, 2020
Merged

Project Management Automation: Call core setFailed with error message#20012
aduth merged 1 commit into
masterfrom
update/pm-automation-fail-loudly-2

Conversation

@aduth
Copy link
Copy Markdown
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
Copy Markdown
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