I already merged a pull request in bitbucket. Can you all explain what is the difference between click Approve and don't click it?
Because I see that the merge commit still appears in git history/log even that I don't click Approve.
If your team has a Premium plan, repository admins can prevent pull requests that don't have a certain number of approvals from merging.
Other than that, it is a visual check only that the merge request was reviewed and approved prior to merging.
See: https://confluence.atlassian.com/bitbucket/pull-requests-and-code-review-223220593.html
Related
I cannot find an option to delete a PR on BitBucket.
Am I overlooking something or it's really not possible?
You can decline a pull request which has the same result -- stopping / removing the PR.
As per the link jonrsharpe mentioned, to the right of the merge button there are 3 dots. Under that menu you should have a delete option if you have permission to delete.
This is available only for BitBucket Server, not on BitBucket.org.
In BitBucket.org there is no option to delete the PR.
For Bitbucket Cloud, there are no way to do this. One way of getting by is to have a 'dev/junk' branch, used for declined or useless pull requests.
Then just edit the existing request to go into this branch and merge.
Data is still there, in case you need it some day, or if it's sensitive info you can remove the whole branch. If its already declined before, well, nothing can be done then other than recreating that repo
See https://jira.atlassian.com/browse/BCLOUD-8089 for the update on this feature request and vote on it!
I wanted to delete a pull request of a branch that had already been merged and deleted. Even though I am an admin of my project, I cannot see any "delete" options. For me what worked was to recreate the deleted branch from the main branch and push it. E.g.
git checkout master
git checkout -b [deleted branch name]
git push -u origin [deleted branch name]
Then I opened Bitbucket and the branch showed up as "merged" and disappeared from the PRs list.
You cannot delete the PR in bitbucket.org .
Using Decline option will do exactly what you want - the PR won't be visible in the tab Pull requests (you need to sort PR by Decline to see it) but on tab Branches you will see that in column Pull request you have removed your problematic PR.
PS you cannot undo Decline of PR, so take care
We have TFS 2018 Update 3. We have git repositories and branches on them are secured with branch policies.
We have TFS groups which are through branch policies used as default approve groups for pull requests.
Problem: when somebody creates a PR to a particular branch, we'd expect, that people in the default group receive an email from TFS that new PR was created.
Despite the fact, that all of them have their own notifications enabled, they do not receive it...
Is there any configuration I need to do?
You need to configure the notification in the Team level:
We plan to have only admins able to make changes to our repo’s master branch. Developers can clone the repo and then create their own dev branch off of master to work on. When developers feel ready, they can merge their development branch onto the master branch using a pull request. However, they will not be able to merge their dev branch into master until the admins have approved the changes.
On Bitbucket, I set branch permissions as:
+ Write Access: Rachel and Jamie.
+ Merge via pull request: Rachel, Jamie, and team:developers.
+ Merge checks: check for at least 2 approvals.
Next, we had a developer (not Rachel or Jamie) make changes on their own dev branch. They then committed and pushed the changes to their remote dev branch--worked as expected.
Last, they initiated a pull request to merge the remote dev branch into master. A warning that two approvals was needed popped up, but the developer was still able to just click "Merge" and the dev branch merged into the master branch, despite 0 approvals.
I expected that the developer would not be able to merge with 0 approvals. How do I set permissions so that this is the case?
Two things:
You explicitly granted "merge via pull request" access to the developers. They're therefore able to merge pull requests. If you never want them to merge PRs to that branch, then revoke that. (They'll still be able to create PRs, just not merge them.)
You didn't mention whether you've enabled "Prevent a merge with unresolved merge checks", under the premium features.
We've created a plugin to prevent this situation. You can inspect it on marketplace:
https://marketplace.atlassian.com/apps/1219882/prevent-merge-when-needs-work
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.
Is it possible to trigger some action after completing a pull request in TFS ?
Let's say for exemple that a product backlog item is attached as a "related work items" in a pull request.
Could you change it's state automatically after validating the pull request ?
This can be achieved using TFVC as source control. Work item will be resolved after the check in action. However, it's not support for GIT in TFS now.
You can submit a feature request in uservoice, TFS admin will kindly review it:
Uservoice Site:
https://visualstudio.uservoice.com/forums/330519-team-services