multi-gitter icon indicating copy to clipboard operation
multi-gitter copied to clipboard

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

Open jtgrohn opened this issue 6 months ago • 0 comments

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 avatar Dec 07 '23 20:12 jtgrohn