Comment Filters
Full version only.
By default, when someone posts a comment on a linked issue or work item, Git-Zen sends the comment to every Zendesk ticket linked to it. Most teams want this. Support agents see the engineering discussion as it happens.
Sometimes you want more control. Your engineers may want internal notes that stay on the platform. Or you may want to keep noisy automated comments out of your tickets. Git-Zen has these ways to filter comments:
- The
gz#skipkeyword: keeps one comment out. - Include pattern: a regular expression that a comment must match to be sent.
- Exclude pattern: a regular expression that stops matching comments from being sent.
Where filters apply
Section titled “Where filters apply”The filters apply in both directions:
- Incoming: comments from your platform to Zendesk, on GitHub, GitLab, Azure DevOps, Jira, and Linear. Git-Zen also checks commit comments against the filters.
- Outgoing: Zendesk comments that Git-Zen sends automatically to linked issues. Direct comments that an agent sends from the sidebar are not filtered.
Git-Zen checks the comment text only. It does not check the author’s name.
The gz#skip keyword
Section titled “The gz#skip keyword”Add gz#skip anywhere in a comment. Git-Zen does not send it, in either direction. gz#skip always wins over the patterns.
To hide the keyword in the rendered comment on your platform, see Ticket comments.
Set the patterns
Section titled “Set the patterns”- Click Settings on the Git-Zen menu bar.
- Find Comment sync filters.
- Enter a regular expression in Include pattern, Exclude pattern, or both.
- Click Save Changes.
Git-Zen checks the patterns in this order:
- If the comment contains
gz#skip, Git-Zen does not send it. - If the comment matches the exclude pattern, Git-Zen does not send it.
- If you set an include pattern, Git-Zen sends the comment only if it matches.
An empty pattern has no effect.
Matching always ignores case. You do not need (?i). The . character also matches line breaks.
Example patterns
Section titled “Example patterns”| Field | Pattern | Effect |
|---|---|---|
| Include | ^\[support\] |
Send only comments that start with [support] |
| Include | bug|regression |
Send only comments that contain “bug” or “regression” |
| Exclude | \[bot\] |
Do not send comments that contain [bot] |
| Exclude | ^internal: |
Do not send comments that start with internal: |
Status change comments
Section titled “Status change comments”Git-Zen can also post a message to the linked Zendesk ticket when an issue changes, for example from open to closed. The Upon change to issue property setting in Ticket comments controls this. The filters do not apply to these messages.
Recommendations
Section titled “Recommendations”- Start with no filter. See which comments are noisy before you add one.
- Prefer
gz#skipfor single cases. A pattern is a blunt tool.gz#skiplets developers decide for each comment. - Test your pattern in a tool such as regex101.com before you save. Use the .NET flavor. A pattern that matches too much can block every comment.