Giter Site home page Giter Site logo

jolly-roger's Introduction

Version 0.1

Clone the repository and set an enviroment variable to the directory

export MASTERBRANCH_HOME=/path/Jolly-Roger

make the script executable

chmod +x $MASTERBRANCH_HOME/git/masterbranch.sh

Git hook setup

  • Git global configuration.

Your private token is under Settings -> Account admin Token section

git config --global --add masterbranch.token TOKEN
git config --global --add masterbranch.email EMAIL

*Project configuration.

For each project yo would like to push to masterbranch you need to activate your post-commit hook.

mv post-commit.sample post-commit
echo $MASTERBRANCH_HOME/git/masterbranch.sh >> post-commit

Commit formating and further hooks

The payload parameter is a url safe base64 encoed string to avoid issues sending the data.
As you could see in log2json.pl the data sent is a json list with a map for each commit. e.g:

[
	{"revision":"5c5afa47cf7cd15d5366aca5c0fb40607e5288f2",
 	"author":"Juan Luis Belmonte <[email protected]>",
	"timestamp":"1322532384",
	"message":"removed bashisms",
 	"added":[],
	"modified":["git/masterbranch.sh"],
 	"deleted":[],
 	"other":[]},
	{"revision":"d6d2b3258cb0e38b900a593b6a176d8907ce1ccd",
 	"author":"Juan Luis Belmonte <[email protected]>",
 	"timestamp":"1322102399",
 	"message":"testing issues with with escape characters  / ",
 	"added":[],
 	"modified":["git/masterbranch.sh"],
 	"deleted":[],
 	"other":[]}
]

The hook just clears the backslashes present in the string but other problematic characters like double quotes are handled in the server.

regarding to this format and the safe url base64 encoding you can write your own hook or fork this one.

jolly-roger's People

Stargazers

murrico avatar

Watchers

murrico avatar

Forkers

piranna

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.