The new parser repeats part of the comment in its error messages so it can highlight the syntax error. This is great, except for the fact that in production the comment posted by Hoff also comes in as a webhook event. And since the error message contains the repeated merge command, Hoff would enter a feedback loop where it complains about parsing errors in its own comments. The tests now also simulate this webhook event to make sure this doesn't happen again.
Hoff being able to respond to itself is a feature since it's used to automate deployments in certain repositories. This approach uses a simple HTML comment that is added to parser error messages. If the comment is found in any message, Hoff won't try to parse it for commands. This is also useful in other situations where Hoff may post arbitrary output that could contain its command prefix.
The new parser repeats part of the comment in its error messages so it can highlight the syntax error. This is great, except for the fact that in production the comment posted by Hoff also comes in as a webhook event. And since the error message contains the repeated merge command, Hoff would enter a feedback loop where it complains about parsing errors in its own comments. The tests now also simulate this webhook event to make sure this doesn't happen again.
Hoff being able to respond to itself is a feature since it's used to automate deployments in certain repositories. This approach uses a simple HTML comment that is added to parser error messages. If the comment is found in any message, Hoff won't try to parse it for commands. This is also useful in other situations where Hoff may post arbitrary output that could contain its command prefix.
This fixes #223.