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

Filter the "Pull request comment" output #52

Closed
tlimoncelli opened this issue May 13, 2021 · 1 comment · Fixed by #57
Closed

Filter the "Pull request comment" output #52

tlimoncelli opened this issue May 13, 2021 · 1 comment · Fixed by #57

Comments

@tlimoncelli
Copy link

tlimoncelli commented May 13, 2021

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:'
  • The multiple grep's can probably be combined
  • It probably doesn't need to be a separate script, but it is easier to debug that way. It also permits me to use the script on the command line when I'm making changes outside of GHA.
@koenrh
Copy link
Owner

koenrh commented Jul 13, 2021

Yeah, noticed that as well. Good suggestion!

Quickly added something based on your suggestion in #57. Will do some testing later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants