Search Gerrit for commits previously rejected by a reviewer - gerrit

Question
How do you search for commits which have ever received CodeReview-2 in the past from a given reviewer?
Context
Basically I want to do a retrospective on every commits I've ever rejected so that I can share those the comments to more people.
It's very easy to get the commits I'm currently rejecting using the search terms reviewer:self label:CodeReview-2.
But once the owner of the commit fixes the issue with a new patchset and I put a +2 on it, I won't be able to search for that commit anymore.
So I'm looking for something like had-label:CodeReview-2.

At our local installation we get an email from gerrit at each scoring.
Thus, as a workaround, you can search for emails from gerrit containing "< your login > has posted comments on this change." and "Code-Review-2".

Related

BitBucket: Allow reviews post merge (a la GitHub)

In Bitbucket, on any Pull Request, reviews are disabled after the PR is merged.
I'd like to continue to allow reviews after a PR is merged. Is this possible?
NOTE: I am not asking about requiring review approval pre-merge, though I may or may not have those requirements as well. I want post-merge reviews.
In Github, by way of comparison, it is possible to "review" a PR even after it is merged.
I tried clicking the greyed-out "review" button after merging, which obviously did nothing. If the page is reloaded the "review" button is entirely gone.
I have been in contact with a wonderful Product Manager at Atlassian, and he let me know that this used to be an accidental "feature" of BitBucket, which they considered a bug, and fixed as of several months ago. This is why people have a memory of post-merge reviews, which seem to no longer be possible (because, they indeed are no longer possible).
He explained that once they "fixed" the bug they heard from users who had built workflows around it, and wanted the "bug/feature" back.
There is a public issue tracker for this if you are interested in weighing in on it!
https://jira.atlassian.com/browse/BCLOUD-22396
Atlassian has not yet decided if/when/how they will bring the "bug/feature" back.

How to do a good code review in Bitbucket

I have used a few code review programs. I am now using pull requests in Bitbucket. I am expecting a certain process:
Create review (ie pull request)
Comments are added by reviewers. ( am used to a graded system where someone can mark the change as a bug which needs to be fixed before being merged)
The review is sent back to the originator who fixes any problems that are marked
(!!)The originator pushes their changes to their branch and then the code review is done again by all reviewers who then approve or reject the new changes.
With all things being good, the review is approved and then merged.
What I am wondering about are steps 3 and 4. There seems no grading to the comments and there seems to be no way for the originator to see quickly the comments (in some condensed format). Also, how do new changes update a pull request? Is this just missing from the Bitbucket system or is there a way to achieve this?
"there seems to be no way for the originator to see quickly the comments (in some condensed format)". Open a pull request, and look over on the right hand side. I see 3 tabs: Details / Files / Activity. Under "Activity", I can filter to "All Comments".
"how do new changes update a pull request?" When creating a pull request, you are requesting approval from your colleagues to pull code from some source branch to some target branch. So, when the source branch is updated with changes, the pull request should automatically reflect that. In other words, you shouldn't have to take any extra action.
"There seems no grading to the comments" A reviewer can check a box that says "merge not allowed until the 'issue fixed' box is checked." The repo admin has some latitude to set how strict the PR / merge policies will be, including whether approval is needed from anyone or from specific individuals.

Auto-approve commits in Bitbucket

I recently moved to the new Bitbucket interface and what I remarked is that I need to approve commits after pushing them.
It's a good feature, but it's inconvenient for my work-flow. Is there an option to disable it and have the commits automatically approved?
Edit: I uploaded an image of the Approve button.
"Approve" is not necessary, is an extra feature to know who reviewed the commit. From Bibucket's blog post:
Giving the green light
Bitbucket has a light-weight approval process that allows participants
to Approve a commit or pull request – this signifies that a user has
reviewed a change and that it LGTM.
Later, when browsing the list of commits or pull requests, Bitbucket
displays the total number approvals for a particular change as a gray
circle.
A gray badge shows how many reviewers have approved a particular
change – now, for those commits or pull requests that you personally
have approved, the badge is now green giving you a quick summary of
changes that are yet to be reviewed by you.

TFS 2012 - How can I tell if a changeset was code-reviewed?

We recently started using Team Foundation Server 2012 and are using the code-review feature to have other developers review code changes. It seems to work great; however, as a project lead I would like to be able to see that a given changeset has been reviewed by someone else.
For example, say Developer Bob makes changes and requests a review on those changes. This generates a shelveset for the changes and creates a code-review work item for the requested review. Developer Alice reviews the changes, makes some comments, and finishes the review. Bob incorporates Alice's suggestions and checks in the changeset.
As a project lead, I search for changesets and see that Bob checked in changeset 123. If I look at this changeset, there is an associated work item for the task Bob was working on, but no indication that the changeset was reviewed by anyone else.
If I look at code-review work items, I can find the things that have been reviewed and see the comments. This is cumbersome as I have to sift through work items and find the one that happens to be related.
How can I tell from a given changeset that it was reviewed, as well as see the review comments?
Changesets can be linked to any kind of Work Item, including Code Reviews. When you request a review on a set of pending changes, they are automatically associated to the new review Work Item. When you double click on the changeset you should be able to see under Related Work Items something like this:
In this case there were 2 reviews for this changeset, the second one was automatically there when it was requested. The first one had to be manually linked, just like the Task.
If you double click on the review item, you can see all the comments.
Tip: If you want to do a review post-checkin: go to the History view --> double click on the changeset --> Actions --> Request Review.
Tip2: It is a bit annoying that you have to manually check that each changeset has a review. If lack of review is really a problem for your team, I would suggest setting up a check-in policy.
You can make queries searching for code review work items and you will find associated changesets on the field Associated Context (Changeset id or Shelveset Name)
Inside the Code Review, you can check the changeset via the link at the top of the work item view.
Of course, there is another option that is querying directly to TFS Database (Warehouse) but it's tricky and requires access to that database and knowledge on the schema.
from work item history u can check out all the change sets ....changeset was reviewed by anyone else this functionality TFS does Not provide!
may be i have lost Something but i don't see any answer regarding to change set that is was reviewed.
but you can check the change through (history , and sort the source control by date ).
good luck!

Bitbucket users left organisation, I want to know implications on code if i delete users from my account

I have some users in bit bucket cloud who left organisation, I want to remove them from my account so I can save billing.
My question is if I remove access will there be any problem with commits and work they have contributed to the projects or repositories over the time?
I have already tried checking on their site, but there is nothing mentioned specifically.
Commit history will not be affected (unless you, or somebody else on your team, rewrites it). The users in question will still have any previous copies of the repo they'd cloned or downloaded, but they will no longer be able to connect to push or pull or read code in the GUI.

Resources