Giter Club home page Giter Club logo

commity's Introduction

Commity

language: python license: GPL python: 3.7 Commity CI/CD

Commity is a script that print the commits from a git branch in a user-friendly way using Markdown format, inspired from default pull-requests templates in BitBucket.

Getting Started

Prerequisites

You need Python 3.7 to execute this script.

Here is the command to install all necessary packages:

With pip:

pip install --no-cache-dir -r requirements.txt

With conda (and its environment):

conda install --name myenv -c conda-forge --file requirements.txt

Installing

To install this script, you first need to clone this project, and then execute commity.py.

Usage

To execute Commity, you might need to specify some arguments:

  • -r or --repo: The path to the git directory. By default, the current folder is taken.
  • -b or --branch: The name of the branch where to get the commits. By default, the current branch is taken.
  • -i or --issue: If given, the first line will contain all the issues that have been marked as "fixed" in the commits messages of the given branch.

Example:

python commity.py -r C:\Users\Foo\MyProject -b feat/gui-buttons -i

Run with Docker ๐Ÿณ

It is possible to run commity from the given Dockerfile.

To execute commity using docker, please refer to the example below:

With Makefile:

cd path/to/commity
make docker-build
docker run -it -v "C:\Users\Foo\myproject:/myproject" cynnexis/commity run -r /myproject -b master --issue

Without Makefile:

cd path/to/commity
docker build -t cynnexis/commity .
docker run -it -v "C:\Users\Foo\myproject:/myproject" cynnexis/commity run -r /myproject -b master --issue

Alias

If your using bash, you can setup an alias to call commity:

First, let's create a conda environment if you have not done iet yet:

cd path/to/commity
conda create --name commity python=3.7.6
conda install --name commity -c conda-forge --file requirements.txt

Then, activate the environment:

conda activate commity

Get the path to your Python environment:

which python

For this tutorial, let's assume the path is /home/user/anaconda3/envs/commity/bin/python. Create an alias with the following command:

echo alias commity="/home/user/anaconda3/envs/commity/bin/python /absolute/path/to/commity/commity.py" >> ~/.bash_aliases

And it's ready! To get all the commits messages of a local repository, go to your project folder, and execute the commity command such as:

commity -i

The command will assume the current working directory is the repository, and will analyze the current branch. The fixed issues will be printed with the -i option.

Built With

Contributing

Contribution are not permitted yet, because this project is really simple and should not be a real problem. You noticed a bug in the script or in the source code? Feel free to post an issue about it.

Author

License

This project is under the GNU Affero General Public License v3.0. Please see the LICENSE.txt file for more detail (it's a really fascinating story written in there!)

Acknowledgments

  • Git team ; what a flawless system they created!

commity's People

Contributors

cynnexis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.