Description
I'd like the ability to specify some filter criteria for the commits that get published as a notification. If we were to use conventional commits, I'd like only feat
and fix
commits to result in a notification. Other commits (including those in-between, when multiple commits are present) should be ignored (excluded from the notification payload).
One way to provide this would be a way to specify regular expressions that must match the subject line of each commit (I'd expect multiple regular expressions to be OR
'd together):
- name: Discord Commits
uses: Sniddl/discord-commits@v1.6
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
template: simple-link
include-extras: true
include-commits:
- '^fix:'
- '^feat:'
So if I have three commits in a single push:
fix: I fixed a thing
refactor: I fixed some whitespace
feat: I implemented a new thing
The only commits I'd expect to see in my discord notification are:
- fix: I fixed a thing
- feat: I implemented a new thing
I can't think of a way to do this outside of the action itself. I suspect this may need to be implemented.