Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Code submission for review

anil kumar March 25, 2014

Hi All,

I have to capture the below when my code submitted for review.

name of the dev

Files changed

commit id

Date

Reviewers

So which Pre hook plugin is enough to do this?

Regards

Anil

7 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.
March 31, 2014

Hi,

About the data in the merge check: I have never done this, but once you get the pull request object, it looks like you can query all the parameters from it: https://developer.atlassian.com/static/javadoc/stash/latest/api/reference/com/atlassian/stash/pull/PullRequest.html

anil kumar April 6, 2014

Hi Balazs,

I able to configure the mail and after adding the reviewer I able to get the mails.

with some hook I need to capture the

name of the developer who gievn the pullrequest,

Files changed,

commit id,

Date,

Reviewers,

I need to capture.

I have gone through RepositoryMergeRequestCheck and MergeRequestCheck.

Able to get the reviewers names and updated date and other above details I didnt get.

How can I achive all the details.

Regards

Anil

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.
April 6, 2014

As said earlier, I have never done this before. I don't know to this level of detail.

anil kumar April 6, 2014

Ok Balazs...

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.
March 30, 2014

Hi,

A pull request is not only a tool for code review, it is also a tool for discussion. It can be created as soon as the branch has at least one commit in it (and it gets updated each time there are additional commits). So if you need the reviewer to come into the picture earlier than the finishing of the task/feature, you can instruct the developers to create it at an earlier point.

(I leave this up to them. Most of the time they only want CR when done, but they are informend that they can create the pull request before as well, if they need advice/discussion.)

anil kumar March 30, 2014

Il check the mail configuration and upon reviewing able to get the details or not.. Then I'l get back to you.

Thank you so much for your all suggestions.

Regards

Anil

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.
March 30, 2014

Evrybody who is added as a reviewer to a pull request, will receive an e-mail with the following:

- Name of the pull request

- Who created it

- Which branch will eventually be merged to which other branch

- List of commits (with links to each)

- A button to view all details of the pull request on the web interface.

I think this is exactly what you want. :)

[You can test the whole workflow if you create two test users and create a pull request with one, assign the other as reviewer.]

anil kumar March 30, 2014

Oh is it, Actually now I'm having local stash server but I didn't configured the e-mail.

earlier this [You can test the whole workflow if you create two test users and create a pull request with one, assign the other as reviewer.] test case I did.

I'l try to configure the email locally and il tell u.

One doubt reviewer will come to the picture with pull-request only?..

Thanks

Anil

anil kumar March 31, 2014

Hi Balazs,

Once reviewd by reviewer I need to update the details to my ticket portals.

So If I get the mail. I need to read the mail content for all details and i need to capture the content. How can I read all the mail content.

Thanks&Regards

Anil

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.
March 31, 2014

If you want to update the ticket when the review is done, you could write a merge check (link further up) to process the pull request when it is merged. (Should happen right after the reviewer approves.)

anil kumar March 31, 2014
So with merge check plugin...gone through this example i.e., veto mesaage..admin can only merge the pull request..so with that plugin how can I get required details..i.e., Name of the pull request - Who created it - Which branch will eventually be merged to which other branch - List of commits (with links to each) etc., Thanks & Regards Anil
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.
March 30, 2014

The pull request contains all these and a very nice interface to handle the review on the server, no plug-ins needed. What do you want to do with this data?

As far as I can see here, there is no plugin for analysing pull requests, other than the merge check, which runs when the pull request is merged.

anil kumar March 30, 2014

Because,As I pushed to server once it is reviewed by reviewer then I want to update to the user& others with name of the dev,Files changed,commit id,Date,Reviewers.

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.
March 26, 2014

Hi,

The way to do this properly would be to have your developers do their work in feature branches and for each branch there is a pull request which is approved by someone who then merges it back to master. (Most developers would not have push rights to master, set this in branch permissions.)

anil kumar March 27, 2014

So When a pull request being created for review,

How can I get these

name of the dev,Files changed,commit id,Date,Reviewers

So which Pre hook plugin is enough to do this?

Thanks in advance.

Anil

0 votes
anil kumar March 26, 2014

For suppose

$git push origin "branchname"

For the branch If it has a reviewer. If he reviewes then only it should push to server. In that scenario.

Regards

Anil

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.
March 26, 2014

What do you mean by "submitted for review"? A pull request being created?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events