It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do you track revisions on a pull request? Edited

Israel Tsadok Nov 14, 2017

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

Aron Gombas [Midori] Community Leader Nov 15, 2017

 

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 in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,964 views 1 19
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you