Skip to content

Automated Commit Conventions

This guide ensures automated commits are properly detected and excluded from Discord notifications.

Auto-Detection (No Action Required)

The following are automatically detected by checking committer metadata:

  • ✅ GitHub merge commits (committer: web-flow)
  • ✅ GitHub Actions (actor: github-actions[bot])
  • ✅ Dependabot (committer: dependabot[bot])
  • ✅ Renovate bot (committer: renovate[bot])
  • ✅ Snyk bot (committer: snyk-bot)

Manual Tagging (When Required)

For custom automation that doesn't use bot accounts, add one of these tags to your commit message:

Supported Tags

TagUse Case
[automated]General automation/CI commits
[bot]Bot-generated commits
[docs-editor]Docs editor tool commits
[skip ci]Skip CI + notifications
[skip notify]Skip notifications only

Examples

bash
# GitHub Action that updates a file
git commit -m "chore: update lockfile [automated]"

# Doc editing tool
git commit -m "docs: update API reference [docs-editor] [skip ci]"

# Release automation
git commit -m "chore: bump version to 1.2.3 [automated]"

Implementation in GitHub Actions

Example Workflow

yaml
- name: Commit changes
  run: |
    git config user.name "github-actions[bot]"
    git config user.email "github-actions[bot]@users.noreply.github.com"
    git commit -m "chore: automated update [automated]"
    git push

Note: Using github-actions[bot] as the committer is sufficient for auto-detection, but adding [automated] provides clarity.

Existing Workflows to Update

Check these files and add [automated] tags if they commit without bot credentials:

bash
# Find workflows that make commits
grep -r "git commit" .github/workflows/

Testing Detection

To verify a commit will be skipped:

bash
# Simulate the grep check
echo "feat: add feature [automated]" | grep -qiE '\[automated\]|\[bot\]|\[skip ci\]' && echo "SKIP" || echo "NOTIFY"

Why This Matters

  • Reduces noise in Discord for routine automation
  • Preserves signal for human-authored commits
  • Prevents false positives (e.g., features about "automated testing")

Migration Notes

Previous implementation matched the word "automated" anywhere in commit messages, causing false positives for feature commits like:

❌ "feat: implement encryption canary for automated corruption detection"

The new implementation requires explicit tags ([automated]) or bot committers, avoiding this issue.

Built with VitePress