Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git: automatically insert issue into git commit message #513

Closed
bschmalhofer opened this issue Oct 3, 2020 · 2 comments
Closed

Git: automatically insert issue into git commit message #513

bschmalhofer opened this issue Oct 3, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

The commit message can be prepared via the prepare-commit-msg git hook. See https://git-scm.com/docs/githooks. A suggestion is:

  1. When the branch is e.g. named issue-Review code of the migration modules #500-blabla then the commit message is prepended by: Issue Review code of the migration modules #500;
  2. When the branch is e.g. name _issue-rotheross/otobo#500-blubber, then the commit message is prepended by: Issue otheross/otobo#500:

The naming convention should enable automatic linking of the commits to the mentioned issue.
The hooks should be installable with the command: bin/otobo.Console.pl Dev::Git::InstallHooks .

@bschmalhofer bschmalhofer added the enhancement New feature or request label Oct 3, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.1 milestone Oct 3, 2020
@bschmalhofer bschmalhofer self-assigned this Oct 3, 2020
@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Oct 4, 2020

Ah, found that input files, e.g. skeletons, are stored in Kernel/System. E.g. Kernel/System/Console/Command/Dev/Code/Generate/ConsoleCommand/ConsoleCommand.pm.skel
TODO:

  • move the prepare-commit-msg.dist file
  • add the Console command

@bschmalhofer
Copy link
Contributor Author

Let's claim that it works, because it worked once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant