koenrh / dnscontrol-action

Deploy your DNS configuration using GitHub Actions using DNSControl.
ISC License
80 stars 38 forks source link

Filter the "Pull request comment" output #52

Closed tlimoncelli closed 3 years ago

tlimoncelli commented 3 years ago

If you have many domains, the comment posted to the PR is very long. I've found it better if the GHA log shows all the output, but what gets posted as a comment is filtered heavily.

We use this script immediately after the echo "$OUTPUT" line.

(this is from memory)

OUTPUT=$(echo "$OUTPUT" | bin/filter-preview.sh)

Here's the filter-preview.sh script:

$ cat bin/filter-preview.sh
#!/bin/bash

grep -v -e '\.\.\.0 corrections$' |\
  grep -v -e '\.\.\. (skipping)' |\
  grep -v -e '----- Getting nameservers from:'
koenrh commented 3 years ago

Yeah, noticed that as well. Good suggestion!

Quickly added something based on your suggestion in https://github.com/koenrh/dnscontrol-action/pull/57. Will do some testing later today.