How do you track revisions on a pull request? Edited

I'm trying to find a good workflow, and I don't know if there's a recommended way for this, or even a way to do this at all. (We're using the Forking Workflow, by the way).

Here's the scenario:

  • Bob makes a commit on his fork, and creates a pull request to the main repository.
  • Alice reviews his code and points out a couple of typos and style violations.
  • Bob makes the suggested changes and amends his commit, then does a push -f to his repository.

At this point, the pull request gets updated with the new commit, (the PR feed actually says "Bob removed commit ABC, and added commit XYZ"), and if Alice review it again, she will approve.

The problem is, there's no easy way for Alice to find out what changes Bob made to his code, and it's really hard to verify that all the comments have been addressed. On the other hand, I don't want Bob to add another commit just to fix a typo that hasn't made it to the main repository yet.

As I'm writing this, it occurs to me that perhaps the best course of action would be for Bob to fix the issues with a new commit, and once Alice approves the PR, to squash all the fixup commits into the main ones, and only then merge.

Is this the best way to handle the situation? Are there plugins that make the process more smooth? What do you do?

1 comment

 

The problem is, there's no easy way for Alice to find out what changes Bob made to his code, and it's really hard to verify that all the comments have been addressed. 

First subproblem: how to avoid re-reviewing a large PR if only some parts of that got updated by the new commit?

This is fairly simple because Bitbucket helps with it!

If you look at the "diff" view of the PR and click the files in the left-side tree control, then Bitbucket will automagically remember that you have seen the modifications in a given file. It turns the filename from bold to normal font weight. Then, if there is a new change on file "A", and you look at the diff again, then all other filenames will be displayed with normal font-weight, but "A" will be displayed in bold again!

In other words: only verify the changes in the files with bold filenames.

Second subproblem:  how to verify if all critics were handled?

We are very pragmatic with this. Add a marker (which can either be a TODO tag in the code or a Bitbucket comment on PR) and wait until the marker gets a confirmation (TODO tag gets removed or there is a reply to the comment) after that critic was handled.

It is dead simple.

Comment

Log in or Sign up to comment
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

2,367 views 9 12
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