Comment 2 for bug 1947772

Revision history for this message
Giuseppe Petralia (peppepetra) wrote :

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