Bitbucket (pull request) comment deleted after update - bitbucket

My team and I just start with bitbucket. Also, we review our code now.
Now we noticed that after someone add a comment on a line (for example, "change code...") and the code is changed by the author like the comment said, the comment is deleted in the overview section.
Why is that? We only can find the comment back in the activity section.
We like to have a confirmation reply from the author after he changed his code.

Right now this appears to be common behaviour (at least in the Bitbucket Server version).
You can find an open issue for that in the Bitbucket Issue Tracker. I guess we need to vote for it to get its priority pushed: https://jira.atlassian.com/browse/BSERV-7534

Related

How to add descption to a given patchset in Gerrit?

I can create new patchset to a given Gerrit without issues.
However, I would like to describe what the patchset is about. I have been doing that as part of the commit message, as I commit -amend and push the new patchset with the revised comment.
Is there a well defined way of describing the patchset in the commit message, so Gerrit can automatically set its description? The only mentioning of the description I found so far was from this page:
https://gerrit-review.googlesource.com/Documentation/concept-patch-sets.html#_description
Heh, looks like I found a potential answer for my own question. :)
If I encode the push command with a %m= I seem to be able to set the description for the patchset. It feels a little hacky, in that I need to replace
spaces with _ and percent encode characters as well.
That is described gerrit's documentation for code review.
Example:
git push ssh://john.doe#git.example.com:29418/kernel/common HEAD:refs/for/experimental%m=This_is_a_rebase_on_master%21
Any other/better way that you may know about?

How to promote a Gerrit draft submission to a regular code-review submission

A colleague sent me a Gerrrit code review "draft" (I suppose via "refs/drafts/master" instead of "refs/for/master") and then left on holiday. Without downloading the patch and submitting it myself, how can I promote his draft to a full regular code-review so I can approve it & submit it for merging?
I think this is a similar question, but it's for git-review, not Gerrit. Also I'm interested in doing it from the Gerrit web GUI if at all possible. And I don't see a "Publish" button on my Gerrit web GUI for that draft. (And currently it doesn't say anything about merge conflicts, as long as I hurry....)
If I click on the "Patch Sets" link in the top right of the GUI, this is what I see:
In the top left it says "Change 58358 - Draft", and in the middle of the window it shows this:
Only the change owner can publish a draft patch set. Using the UI's cherry-pick option as described in other answers won't work because the cherry-pick implementation preserves the draft status on the new change or patch set.
As far as I know the only way to force the change into NEW state is to manually download the commit and push a new patch set using refs/for/master instead of refs/drafts/master.
Note that if you're not rebasing the change onto a new parent at the same time, you might need to slightly edit the commit message to make gerrit accept it. Otherwise it'll reject with no new changes.
If your colleague add you as reviewer, you can. You can cherry-pick this commit.
Click on download link at the right-top corner, and there are aliases for commands above.
But as you updated your question, you don't want to check out and manually push or cherry pick to master branch. You can use cherry-pick\merge button on ui, if you are confident in this mr, and it should be on master branch. Also you can publish this commit for other reviewers.
p.s. updated (you can cherry-pick, merge, publish via UI)
Do the following procedure:
1) Go to the draft change page
2) Click on Cherry Pick button
3) Write "master" in the Cherry Pick to Branch field
4) Adjust the Cherry Pick Commit Message if needed
5) Click on Cherry Pick Change button
It'll be created a NEW CHANGE cherry-picked from the draft change. Go to the new change page and follow the regular Gerrit process (review, approve, submit). The original draft change can be abandoned or deleted.

Leave a repository on bitbucket

Last year, I was working with some other people on a computer science project. So, I created a bitbucket repository and invited everybody. As we know each other very well, everybody is an administrator of the repository and I'm the owner.
Today, I would like to clean up my bitbucket repository list. But, I can't find how to leave a repository. When I go in the settings menu, the only thing that I can do is "deleting a repository". It's not what I want to do because I want to leave the repository for the other people.
For some repository (when I'm not the owner), I can revoke myself, but for the other, I can't. Do you know how can I do that? I would like to find a solution without needing to make a ownership transfer as it involves making a transfer request and then, waiting some time to get the answer.
Thank you
Go to 'Your profile and Settings' left bottom corner & Tap 'All work spaces'
Tap 'Leave'
I would like to find a solution without needing to make a ownership transfer as it involves making a transfer request and then, waiting some time to get the answer.
Somebody must own the repository, and you can't leave a repository that you own.
You could create a team and transfer the repository there, then invite the other users to the team. Transferring your repo to a team you create should be instantaneous.
Or you can transfer the repository to an existing user and wait for them to respond, as you have suggested.
Workaround:
Disable "New source browser experience" in here: https://bitbucket.org/account/user//features/
Then click "revoke" in here: https://bitbucket.org///overview

Unpublish gerrit change

I have accidentally pushed a change to gerrit that should have been pushed as a draft. Now I'd like to unpublish the change back to a draft.
Pushing it again to refs/drafts/* doesn't work as it isn't changed.
Update:
I followed the suggestions of mvp and HiB; I abandoned the change, amended the commit message (removing the change-id, letting the post-commit hook generate a new change-id) and pushed it again. This resulted in a 'new' draft change. At first it looks OK, but history etc. isn't preserved of course. Not a big issue, but not the clean solution I'm looking for.
Once a change is published you cannot set it back to draft, but you may create new draft patch sets for a published change.

link to other system issue number in gerrit code review page based on commit message

I used to write commit message to connect issue system like issue #9548, redmine start page is fixed, and wonder whether it can be written in hook or plugin in gerrit system.
So in the code review page, the issue #9548 can be automatically show the http link to my issues system (like redmine): => issue#9548,redmine start page is fixed
It will be easily for code review.
Yes, it is possible. In your Gerrit configuration, you have to provide a regex expression for the string in the commit message and the link to your bugtracker with wildcards. See the Gerrit documentation. For your example, you would have a regex like (issue\s+#?)(\d+)
If you use Jira and have your Jira case number first in the commit message, add the following to gerrit.config to get links when viewing change sets:
[commentlink "jira"]
match = "^([A-Z]*-[0-9]*)"
link = http://jira/browse/$1
Some supported commit message formats (paste into Rubular to test):
PRJ-123: This is my commit message
ABC-123 - Something: Yes yes
PROJ-123
ABCD-123 - Message
For more examples, see the Gerrit documentation on Section commentlink
Yes you can turn the issue tag into a link in Gerrit. Look at the commentlink configuration - http://gerrit-documentation.googlecode.com/svn/Documentation/2.2.0/config-gerrit.html#_a_id_commentlink_a_section_commentlink

Resources