lindell / multi-gitter

Update multiple repositories in with one command
Apache License 2.0
866 stars 64 forks source link

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

Open jtgrohn opened 10 months ago

jtgrohn commented 10 months ago

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