In this tutorial following points are being covered
Link JIRA to GIT
Smart-Commit command
After linking JIRA to GIT account, with help of Smart-Commit developer can work with JIRA ticket transition states even without opening JIRA account.
2. JIRA-GIT Linking
Introduction:
In this tutorial following points are being covered
1. Link JIRA to GIT
2. Smart-Commit command
Required Access:
1. User must have admin access on JIRA & GIT.
2. Email id must be same on JIRA & GIT.
Uses:
After linking JIRA to GIT account, with help of Smart-Commit developer can work with
JIRA ticket transition states even without opening JIRA account.
3. JIRA-GIT Linking
Create OAuth access token for your GIT account
1. Login to GitHub & select settings under Profile.
2. Select Developer Settings and add a ‘New OAuth App’.
3. Enter Application name as a unique name.
4. In ‘Homepage URL’ & ‘Authorization callback URL’, enter BASE user of your JIRA
account e.g. https://myjiracloud.atlassian.net.
5. Click ‘Register Application’
4. JIRA-GIT Linking
Create OAuth access token for your GIT account Cont.…
6. Copy client-ID & Client secret from GIT account to be used in JIRA.
5. JIRA-GIT Linking
JIRA Configuration for GIT
1. Log into JIRA account as Administrator.
2. Select Applications from right hand Cog (Setting icon).
3. Under Applications tab select ‘DVCS Accounts’.
4. Click on ‘Link on BitBucket cloud or Git Account’ and select GIT
6. JIRA-GIT Linking
JIRA Configuration for GIT Cont…
5. Enter your GIT team-name or your GIT user name in first field.
6. Enter copied GIT Client- ID in OAuth Key field.
7. Enter GIT client secret under OAuth Secret field.
8. Leave both check mark selected.
9. Click on ‘Add’. JIRA will navigate ask access to GIT account access. Provide
your GIT access.
10. Once success JIRA will reload previous page & will start pulling your
repos.
11. Just wait here, as syncing may took some time.
12. Once syncing completed, Now you have linked JIRA to GIT.
7. SMART-COMMIT
Once linking completed between JIRA & GIT, a developer can change JIRA
ticket’s status without opening JIRA account.
Create a ticket on your JIRA board say TA-2286.
Commands:
1. Comment: For adding comment on JITA from Terminal/command prompt
git commit –m “JIRA-ID #comment your comment”
Example: commit -m “TA-2286 #comment Added from GIT Commit command”
Open your JIRA ticket & look for comment. If comment is not then please refresh your DVCS
account from JIRA application tab.
Once refreshed comment would be available on JIRA ticket.
8. SMART-COMMIT
Commands Cont…:
1. Time Log: For adding Time log on JIRA from Terminal/command prompt
git commit -m “JIRAID #time w d h m Total work logged”
where
w: weeks
d: days
h: hours
m: minutes
Example: git commit -m “TA-2286 #time 1w 2d 4h 30m Total work logged”
Open your JIRA ticket and you can see your time log on the given ticket.
9. SMART-COMMIT
Commands Cont…:
1. Status: This field depends on the status available for your JIRA Ticket. You
can find your available JIRA ticket status as below screen shot
I have To Do, Dev In Progress, Code Review, Ready for Testing etc. status for a
ticket.
10. SMART-COMMIT
Commands Cont…:
git commit –m “JIRA-ID #<TransitionState>”
Examples:
git commit -m “TA-2286 #Ready for Testing”
git commit -m “TA-2286 #Testing In Progress”
git commit -m “TA-2286 #Done”
Open your JIRA ticket & you can see status change for given ticket.