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

Hook errors#665 #666

Merged
merged 5 commits into from
May 5, 2023
Merged

Hook errors#665 #666

merged 5 commits into from
May 5, 2023

Conversation

purplecabbage
Copy link
Member

@purplecabbage purplecabbage commented May 2, 2023

Closes #665

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@purplecabbage purplecabbage marked this pull request as ready for review May 3, 2023 00:31
@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Merging #666 (ba10a8a) into master (4d44bd0) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #666   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           54        54           
  Lines         2840      2849    +9     
  Branches       534       538    +4     
=========================================
+ Hits          2840      2849    +9     
Impacted Files Coverage Δ
src/TemplatesCommand.js 100.00% <ø> (ø)
src/commands/app/deploy.js 100.00% <100.00%> (ø)
src/lib/deploy-actions.js 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

const hookResults = await this.config.runHook('pre-deploy-event-reg', { appConfig: config })
if (hookResults?.failures?.length > 0) {
// output should be "Error : <plugin-name> : <error-message>\n" for each failure
this.error(hookResults.failures.map(f => `${f.plugin.name} : ${f.error.message}`).join('\nError: '), { exit: 1 })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to extract this into a function in the class? Since it is duplicated thrice

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its not exactly the same all 3 times
if we need to write it 5 times I'll consider it, or if it expands into more than 1 line.

@sangeetha5491
Copy link
Contributor

LGTM

@purplecabbage purplecabbage merged commit af0612f into master May 5, 2023
@purplecabbage purplecabbage deleted the HookErrors#665 branch May 5, 2023 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugin hook errors are ignored
3 participants