1. Go to this page and download the library: Download mdeloughry/gcm-gen library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mdeloughry / gcm-gen example snippets
return [
'provider' => 'chatgpt', // or 'ollama'
'ignore_files' => [
'vendor',
'node_modules',
'package-lock.json',
'yarn.lock',
'composer.lock',
'dist',
'build',
'public',
'storage',
],
'ollama' => [
'model' => 'llama3.2', // Default model
],
'chatgpt' => [
'model' => 'gpt-4', // Default model
'api_key' => 'your-api-key-here',
],
'prompt' => <<<EOL
Generate a git commit message based on the following rules:
1. First line:
- Use imperative mood (Add not Added)
- Max 50 characters
- Format: [type] - [ticket] [description]
- [ticket] is optional and can be built from the branch name look for the pattern '/(?:#(\d+)|([A-Z]+-\d+))/i'
- [type] from branch patterns using emojis only (no branch pattern match):
feature/* → ✨
bugfix/hotfix/* → 🐛
release/* → 🔖
default → 🤖
2. Optional body (if changes are complex):
- Leave one blank line after subject
- Create a new line at 72 characters
- Explain the type of change in the first line
- Explain what and why, not how
- Add BREAKING CHANGE: for breaking changes
EOL,
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.