8000 Filter out commits by some regular expression · Issue #26 · Sniddl/discord-commits · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
Filter out commits by some regular expression #26
Open
@rcdailey

Description

@rcdailey

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:

  1. fix: I fixed a thing
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0