Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

A pre-commit hook for enforcing that a specific files have been updated within the current branch.

License

Notifications You must be signed in to change notification settings

speshak/pre-commit-versions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pre-commit-version

A pre-commit hook for enforcing that a specific file has been updated within the current branch.

By convention, many projects keep a version and/or changelog file. I created this hook so that I don't forget to update those files at least once within a branch before creating pull requests.

This repo defines two hooks:

check-version-change

Checks for a commit that changes a file named VERSION in the root of the repository.

check-changelog-change

Checks for a commit that changes a file named CHANGELOG.md in the root of the repository.

Other files could be checked by overriding the args. The check_file_change script takes checked file as its first argument.

Usage

- repo: https://github.com/speshak/pre-commit-versions.git
  rev: master
  hooks:
    - id: check-version-change
    - id: check-changelog-change

About

A pre-commit hook for enforcing that a specific files have been updated within the current branch.

Topics

Resources

License

Stars

Watchers

Forks

Languages