No project description provided
Project description
Welcome to the commit message generator!
This script allows you to generate a summary of commit messages made by you in the specified number of days, organized by date and repository.
Requirements
- Python 3.6 or later
- Git
Installation
To install the commitcollector
package using pip, you can use the following command:
pip install `commitcollector
This will install the latest version of the commitcollector
package from PyPI (the Python Package Index). Once the installation is complete, you can use the commitcollector
command from the command-line to run the script and collect commit messages from your Git repositories.
If you want to install a specific version of the commitcollector
package, you can specify the version number using the == operator, like this:
pip install commitcollector==0.1.0
This will install version 0.1.0 of the commitcollector
package.
How to use
To use this script, you will need to have Python installed on your system. You will also need to have git configured with your username.
To run the script, open your terminal and navigate to the directory where the script is located. Then, run the following command:
python commit_message_generator.py [days]
Replace [days]
with the number of days you want to filter the commit messages by. For example, to get a summary of commit messages made by you in the past 7 days, you would run:
python commit_message_generator.py 7
The script will then generate a text file called commit_messages.txt
in an output
directory, which will contain the commit messages organized by date and repository.
Additional features
The script also allows you to specify the time range for the commit messages using the --since
flag. For example, to get a summary of commit messages made by you in the past month, you could run:
python commit_message_generator.py --since='1 month ago'
Optional Flags
--jira: Use this flag to parse and collect only the JIRA ticket number from the commit messages. The ticket number is typically formatted as PROJECT-123 where PROJECT is the JIRA project key and 123 is the ticket number. --verbose: Use this flag to make the collector more talkative and print the names of the repositories as it processes them.
Config File
The commit collector uses a file called config.txt in a .commitcollector directory in your home directory. If it does not exist it gets created for you. The config file should contain two lines: OUTPUT_DIRECTORY and OUTPUT_FILE_NAME.
OUTPUT_DIRECTORY specifies the directory where the output file should be saved. You can set this to either working_directory to save the output file in the current working directory, or you can specify an absolute or relative path to save the output file in a different directory.
OUTPUT_FILE_NAME specifies the name of the output file. The file will be saved with this name in the specified output directory.
Here is an example of what the config file might look like:
OUTPUT_DIRECTORY = /home/user/documents
OUTPUT_FILE_NAME = commit_messages.txt
Notes
- The script will only consider commit messages made by the user who is currently logged in to git.
- The script will only consider commit messages made on branches, not tags.
Output
The commit messages are written to a text file in the following format:
YYYY-MM-DD
repository-name
commit message
commit message
...
YYYY-MM-DD
repository-name
commit message
commit message
...
We hope you find this script helpful in organizing and summarizing your commit messages!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file commitcollector-2.0.2.tar.gz
.
File metadata
- Download URL: commitcollector-2.0.2.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82e1612ab83831e418a90d813bb07a5f8e81b03555e9c9048fdc50647cbdc948 |
|
MD5 | 94dd97f2fa2b361fde11e03ffd60d555 |
|
BLAKE2b-256 | 37a659fbfdddf55299f0282bb4bc103394e4c73443bd17440a014778459b061d |