Code submission for review

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

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

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

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.)

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

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.

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.

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.]

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

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

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.)

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

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.)

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

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

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

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

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

631 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot