Merged
Conversation
4 tasks
eyalbe4
suggested changes
Aug 26, 2024
lib/utils.js
Outdated
| } | ||
| catch (error) { | ||
| throw new Error('failed to read section file: ' + fullPath + ' ' + error); | ||
| core.debug("No markdown file found in the job's output directory."); |
Contributor
There was a problem hiding this comment.
- It is best to add the error message to the log message. The same goes for logging in the
isHeaderPngAccessiblefunction. - Since the error can be thrown for a variety of reasons, and not just in case the file doesn't exist, perhaps it would be better to add a specific check for the existence of the file before reading it. That is, if our code actually expects a scenario where the file shouldn't exist. If the code doesn't expect such a scenario, then the logging here should an error log and not a debug one.
Contributor
Author
There was a problem hiding this comment.
I'm not sure we should fail the entire build by this post-cleanup errors. Maybe i'm wrong, but it's an extra feature that is nice to have but if something goes wrong i'm not sure i want to effect the entire build, let's discuss it.
About isHeaderPngAccessible , this is purely optional and i'd rather display the fallback banner then to fail the entire build.
9b9ddc4 to
494abd9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm run formatfor formatting the code before submitting the pull request.This PR removes the logic to combine each markdown section from the setup-cli to the CLI itself, because of the newly introduced command
jf generate-command-summaryIt uses an unreleased CLI command so the tests will fail until the new command will be released.
Depends on jfrog/jfrog-cli#2653