Commit graph

20 commits

Author SHA1 Message Date
Eberhard Beilharz
44116b70dd
chore(common): detect ssh remotes in git hooks
Sometime ago we lost the ability to detect git remotes that use ssh
(git@github.com:keymanapp/keyman.git) and we only detect remotes that
use https (https://github.com/keymanapp/keyman.git). This change restores
this ability.

Also add some empty lines between the different parts of the error message.

# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
#     Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
#     Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
2024-09-17 11:38:41 +02:00
Marc Durdin
b3385e4d69
chore: Apply suggestions from code review
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2024-05-30 12:30:33 +10:00
Marc Durdin
222ff6a182 change(common): add extra commit message hints
These changes come out of discussion in the team; we want to make use of
git trailers and improve the quality of our commit messages. Starting by
adding more hints to the commit suggestions. Includes some minor cleanup
of the hooks, and hopefully also improves tests so that they don't
interfere with interactions with non-Keyman repos.

Note: the scopes list may need maintenance as the list still includes
sub-scopes and 'oem'.
2024-05-28 10:57:46 +07:00
Marc Durdin
3005a82a8f chore: update docs and non-standard readlink refs 2023-02-22 10:41:54 +07:00
Eberhard Beilharz
7e245bcef3
chore(common): Don't check for conventional commit for fixups
This change allows to add fixup commits by running the command
`git commit --fixup=<sha>` without complaining about the commit
message not being in conventional commit format. (Running the
git command will result in the commit title of the referenced
commit with `fixup!` prepended. It will later be squashed with
the referenced commit in a git rebase.)
2021-10-28 10:56:28 +02:00
Marc Durdin
b69490ea39 fix(common/resources): allow custom commit-msg-defs 2020-05-20 12:25:58 +10:00
Marc Durdin
c60df18ee0 chore(common/resources): add documentation for scopes 2020-05-19 17:31:17 +10:00
Marc Durdin
13b44a7e30 chore(common/resources): use shared scopes definition
This starts the shared scope definition. First cab off the rank is commit-msg
2020-05-19 17:08:57 +10:00
Eberhard Beilharz
30e48ab29c
chore: Allow to override hook defs
This change allows a different project to override the definitions
by providing a local `commit-msg-defs` file while still sharing the
`commit-msg` hook. Other projects might have a different set of
scopes.
2020-05-08 11:46:35 +02:00
Eberhard Beilharz
35c6208273 refactor(common): Simplify and improve getting hook directory 2020-02-20 21:44:46 +01:00
jahorton
3c4679ae6f feat(common): Proper docs, extra tweak 2020-02-06 11:01:08 +07:00
jahorton
c81729fbe0 feat(common): creates common type/scope defn script for inclusion 2020-02-06 10:56:39 +07:00
Marc Durdin
e2b287768c chore(ci): tweak scopes 2020-02-06 10:42:58 +07:00
Marc Durdin
f4c205e9fc chore(ci): tweak commit hook 2020-02-06 10:42:54 +07:00
jahorton
714198c777 feat(common): Autogenerates commit prefixes from branch name 2020-02-04 12:42:58 +07:00
jahorton
886e7d294d feat(common): basic prepare-commit-msg setup, link 2020-02-04 10:48:17 +07:00
Eberhard Beilharz
830c31eece fix: Fix commit-msg hook
Make commit-msg hook executable. Also use bash - Ubuntu has `dash`
linked as `/bin/sh` which doesn't support some of the features we use
in the hook.
2019-10-29 13:30:03 +07:00
Marc Durdin
e5514a4c21 chore: test only keymanapp/ (for git protocol) 2019-10-29 14:01:20 +11:00
Marc Durdin
55b115f97d chore: disable debugging code 2019-10-29 12:59:24 +11:00
Marc Durdin
b35f263335 chore: Add Conventional commits Git message hook
Adds support for conventional commit style validation of all commit
messages and makes configuration against all Keyman repos
straightforward with the configure-repo.sh script.
2019-10-28 16:50:55 +11:00