GithubHelp home page GithubHelp logo

yantonov / tracker-git-commit-message Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 3 KB

Automatically add ticket number to commit messages.

Shell 100.00%
tracker git hook commit commit-hooks connect

tracker-git-commit-message's Introduction

[Deprecated]

Use this more general tool

Tool to simplify git development with yandex.tracker

Purpose

Automatically add ticket number (id) (or number and summary) to commit messages.

Installation

prerequisites
  1. get oauth token
  2. save OAuth token at /path-to-this-repo/oauth_token file (ignored by git for security reasons)
  3. add this repository to $PATH
  4. install commit hook by

install-tracker-commit-hook.sh

usage
scenatio 1 - create new branch
  1. go to your git repository
  2. branch.sh ISSUEID
    branch 'ISSUEID' will be created with meta info obtained from st
  3. commit
    1. with descriptive message
      git commit -m "descriptive message"
      Your actual commit message will be: ISSUEID - descriptive message
    2. with empty message
      git commit
      Your actual commit message will be: ISSUEID - summary from st
scenario 2 - save issue description for existing branch
  1. go to your git repository
  2. checkout existing branch
  3. ticket.sh ISSUEID
    meta info from st is saved into git config
  4. commit
    1. with descriptive message
      git commit -m "descriptive message"
      Your actual commit message will be: ISSUEID - descriptive message
    2. with empty message
      git commit
      Your actual commit message will be: ISSUEID - summary from st
custom branch name prefixes

Sometimes fixed prefix must be added to branch name (due to team convention, for example).
You can achieve this:

/path-to-this-repo/bin/set-branch-name-prefix.sh feature/

After that, if you create branch by

branch.sh ISSUEID

name of newly create branch will be equal to 'feature/ISSUEID'
Custom prefix name is defined at repository level.

tracker-git-commit-message's People

Contributors

yantonov avatar

Watchers

 avatar  avatar  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.