-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: added format support to the changelog mode #56
base: main
Are you sure you want to change the base?
Conversation
@@ -66,6 +66,7 @@ Additional arguments: | |||
|
|||
| CLI | Action input | Default | | |||
| --------------------- | ------------------- | ------- | | |||
| --format | format | yaml | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think default should be the same as cli (text
)
|
||
echo "running oasdiff changelog base: $base, revision: $revision, include_path_params: $include_path_params, exclude_elements: $exclude_elements, composed: $composed, output_to_file: $output_to_file" | ||
|
||
# Build flags to pass in command | ||
flags="" | ||
if [ "$format" != "yaml" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would validate format here. I was actually about to open a PR that achieves the same where I did something like:
validate_format() {
local -a output_formats=(githubactions html json junit markup singleline text yaml)
for f in "${output_formats[@]}"; do
[[ "${f}" == "${1}" ]] && return 0
done
return 1
}
validate_format $format || { echo "Invalid format: ${format}" >&2; exit 1; }
Left some comments; I didn't check open PRs before I attempted to achieve the same. My commit is here: jbergstroem@22a8d89 |
No description provided.