This can be done with:
``` - repo: local hooks: - id: launchpad-bug name: Commit message should contain "Closes-Bug" or "Trivial-Change" language: pygrep entry: '\A((?!((Closes-Bug: #[0-9]+)|(Trivial-Change))).)*\Z' args: [--multiline] stages: [commit-msg] ```
Tests: https://pastebin.canonical.com/p/mymT7MgZnt/
Output is also quite explicit re why it is failing
This can be done with:
``` ((Closes- Bug: #[0-9]+ )|(Trivial- Change) )).)*\Z'
- repo: local
hooks:
- id: launchpad-bug
name: Commit message should contain "Closes-Bug" or "Trivial-Change"
language: pygrep
entry: '\A((?!
args: [--multiline]
stages: [commit-msg]
```
Tests: https:/ /pastebin. canonical. com/p/mymT7MgZn t/
Output is also quite explicit re why it is failing