Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattlqx/pre-commit-sign
A plugin for pre-commit to sign commit messages with a hash.
https://github.com/mattlqx/pre-commit-sign
pre-commit
Last synced: 17 days ago
JSON representation
A plugin for pre-commit to sign commit messages with a hash.
- Host: GitHub
- URL: https://github.com/mattlqx/pre-commit-sign
- Owner: mattlqx
- License: mit
- Created: 2018-06-13T15:47:47.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-03-23T18:48:08.000Z (8 months ago)
- Last Synced: 2024-04-23T20:54:26.805Z (7 months ago)
- Topics: pre-commit
- Language: Ruby
- Size: 25.4 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# pre-commit-sign
This is a plugin for [pre-commit](https://pre-commit.com) that will sign your commit messages with a sha256 hash to allow for other systems to verify pre-commit has been run. This is not meant as a high-barrier to ensure pre-commit was run with a specific set of rules, only as a simple way to ensure committers are aware they need to run pre-commit prior to pushing.
### Usage
To sign commits as part of your pre-commit flow, just run the sign-commit hook of this repo. Note that you **must** have pre-commit installed as a commit-msg hook in order for this to run.
- repo: https://github.com/mattlqx/pre-commit-sign
rev: v1.2.0
hooks:
- id: sign-commitIf you would like to verify the signature of a commit, you can use the gem:
require 'pre-commit-sign'
pcs = PrecommitSign.from_message(commit_message)
pcs.date = Time.at(12345678)
pcs.valid_signature?