How to get the full url of commit Id

anil kumar June 11, 2014

Hi All,

After commit and pushing the code in server it will show Author , Commit , Message.

For Commit, it is showing the display id on placing on this it will show the full url..

Is it possible to get this url with stash pre/post hook. Is there any serivce to get it..

Could you suggest me.

Regards

Anil

4 answers

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 12, 2014

Hi,

The NavBuilder class can give you URL's to all sorts of pages. For commits you need something like

navBuilder.repo(repository).changeset(hash).buildAbsolute();

0 votes
Accounting Go2Group June 11, 2014

You should be able to get the info using Stash hooks (https://developer.atlassian.com/stash/docs/latest/how-tos/repository-hooks.html).

0 votes
anil kumar June 11, 2014

Any suggestion please

0 votes
anil kumar June 11, 2014

And If I clone the repository how to get the cloned path with hook..

Thansk in advance

Anil Kumar R

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events