repo init: Invoke automagically

From now on the user does not have to call repo init manually, although the
option is still there. In app.Init, it is checked whether the repo is
initialised, and when it is not, repo init is invoked automatically. So the
repository is initialised when the user runs the first SalsaFlow command.

Change-Id: 81f01eab05
Story-Id: SF-26
version: Fix code review issues

Change-Id: 5521f0add2
repo: Make git version check more robust

Change-Id: fc4f7f7408
jira/client: Change JIRA base URL config handling

Right now the URL path of 'api/2/' is hard-coded in modules/jira/client. This
patch makes the whole path configurable. That means that the full path must be
specified in the config file and the library itself is not appending 'api/2/'
any more.

Change-Id: ac5c4243f3
Implement a new command: version

This new command just prints salsaflow version and exits.

Change-Id: ea29de505a
Add CircleCI support

Change-Id: c14edc6c98
Story-Id: SF-29
main: Fix some renaming leftovers

Change-Id: 976516d0db
Implement new commands: pkg install, pkg upgrade

pkg install allows the user to install particular version of SalsaFlow. The
executables are downloaded from the relevant GitHub release and the current
executables are replaced.

pkg upgrade works in a similar way, it just automatically finds the most recent
release and upgrades the executables in case the detected release is more recent
than what is installed.

Change-Id: a3866677ed
Story-Id: SF-25
pkg: Save one roundtrip to GitHub API

Discovered that the GitHub API actually returns the release assets as
part of the release resource. Just the Go GitHub client was not using
it. Sent a pull request to go-github, added Assets field to
RepositoryResource, so now we can save one roundtrip, no need to call
ListReleaseAssets.

Change-Id: de70ecde8b
Story-Id: SF-25
salsaflow.yml: Add code_review_tool key

[ci skip]

Change-Id: ccbc7a6f19
review post: Pull the RB code into a module

This patch pulls the Review Board-specific code behind CodeReviewTool
interface into modules/reviewboard. The code review tool must be from
now on configured in the local config and the implementation is
accessible at runtime using modules.GetCodeReviewTool.

Change-Id: f72ee146aa
Story-Id: SF-8
modules/reviewboard: Check rbt version on init

Review Board module now ensures that the RBTools installed are of the
right version.

Implemented support for hooks into repo init. Any part of the code base
regiter a callback that will be run during repo init (app.Init) to check
some requirements. The hooks are registered via repo.AddInitHook

Change-Id: 3bdf7e2197
Story-Id: SF-11
repo init: Fix weird output

The message saying that the repo has been initialised was being printed
twice. This is fixed now and also some formatting is improved.

Change-Id: 8aab95d805
git/errors: Fix code review issues

Panic in case ErrDirtyFile.relativePath is not set.

Change-Id: 08697dfa2b
salsaflow-commit-msg: Fix empty message handling

The tags were being inserted even though the commit message was empty so
it was impossible to cancel a commit by leaving the message empty.

Change-Id: 6479d90f63
Story-Id: SF-30
repo init: Fix formatting

Change-Id: 4532c62a41
hook/salsaflow-pre-push: Implement the hook

Implement a pre-push hook that makes sure that the Story-Id tag is in
every commit that is being pushed. Push is rejected in case the tag is
missing in one of more of the commits.

Change-Id: 1918f86013
Story-Id: SF-32
story start: Make the output less verbose

Drop the message saying that we are remembering the current branch.

Change-Id: 26d403ee41
Story-Id: unassigned
hooks/salsaflow-pre-push: Skip merge commits

Merge commits are not supposed to be checked for Story-Id.

Change-Id: 723208c325
Story-Id: SF-32
hooks/salsaflow-pre-push: Skip refs to be deleted

In case a ref is being deleted, the associated sha is all zeros. This special
case was not being handled, resulting in the hook failing when it should not.

Change-Id: 594777b359
Story-Id: SF-32