hobbs / jirret

Gerrit hooks to update JIRA
42 stars 20 forks source link

Overview

Gerrit hooks.

Installation Steps

username for jira user

user=admin

passowrd for jira user

pass=admin

URL to jira instance api calls (http://)

url=http://localhost:8080

the command that is used to ssh into the gerrit sshd

gerritcmd=ssh -p 29418 admin@localhost gerrit

If you create a custom field for "Gerrit status", put the numeric ID

here. The ID is found from the URL when editing that custom field.

if set, it will set it to "pending" when a patch is uploaded, and "merged"

when it is merged

custom_field=

optional comma separated list of jira projects

two or more projects seperate with ","

projects=HELLOWORLD

Set to 'true' if you'd like Jirret to search for Gerrit tracking IDs rather

than in the subject line for your issue IDs

use_trackingid=false

Set to false to disable {quote} markers surrounding comments

enable_quotes=true


### 2. Create a single user in JIRA and permit it  to create comment on JIRA Issues.
### 3.  Check gerrit permission.(add user’s pub key to Gerrit)

ssh -p 29418 admin@localhost gerrit

### 4. In the user-end, the operation should like this:

git add .

git commit -s

    ## remember change prjkey-id to real issue's id.
    add new feature.
    JIRA:prjkey-id

git push origin HEAD:refs/for/master

### 5. All log saves in “hooks.log”, make it writable!

chmod 755 hooks.log



## More Links Related:
* [Gerrit Code Review - Searching Changes](https://review.openstack.org/Documentation/user-search.html)