Skip to content
aperture

GitHub Action

CommitHawk

v1.1 Latest version

CommitHawk

aperture

CommitHawk

Notify when watched file(s) change in a GitHub repo

Installation

Copy and paste the following snippet into your .yml file.

              

- name: CommitHawk

uses: jesalg/[email protected]

Learn more about this action in jesalg/commit-hawk-action

Choose a version

GitHub Action: Commit Hawk 🦅

javscript-action status

WHY?

Watching a repository on GitHub tells you about social activity (e.g. PRs, issues, etc.), but it doesn't notify you about file-level changes that you and your team might care about.

For example, when an external vendor merges in their work, or when a critical part of the codebase is changed, or when new dependencies are added, etc

Commit Hawk Action fills that gap.

Usage

Install the Incoming Slack Webhook app to your Slack workspace. Reference that webhook URL in slack_webhook_url param in your action's yml as shown below.

Actions can be setup to run conditionally when a specific file(s) on a particular branch are changed.

The paths keywords accept glob patterns that use the * and ** wildcard characters to match more than one path name. For more information, see the documentation.

name: hawk
on:
  push:
    branches:
      - main
    paths:
      - '/some/important/file'

jobs:
  hawk:
    name: hawk
    runs-on: ubuntu-latest
    
    steps:
    - name: CommitHawk
      uses: jesalg/[email protected]
      with:
        slack_webhook_url: 'https://hooks.slack.com/services/XYZ'
        slack_message: 'Contents of some important file were changed on main'