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

Feature request: Add --output-format option to multi-gitter run #441

Open
jtgrohn opened this issue Dec 7, 2023 · 0 comments
Open

Feature request: Add --output-format option to multi-gitter run #441

jtgrohn opened this issue Dec 7, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jtgrohn
Copy link

jtgrohn commented Dec 7, 2023

The feature request
Similar to --log-format, add --output-format for formatting output.

My use case
I want to programmatically examine the output to see if multi-gitter failed on any repositories.

Right now my method is to use the --output flag with an output file, then look for output before the line Repositories with a successful run: in the output file. If there is output before that line, then I assume there were errors, which is fragile. It would be great if I could parse structured output to check for errors.

e.g.

first_line=$(head -n 1 output)
if [ "$first_line" != "Repositories with a successful run:" ]
then
  echo "Failed to create PRs in some repositories. See below:"
  cat output
  exit 1
fi
@jtgrohn jtgrohn added the enhancement New feature or request label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant