Hi
I am trying to get the test merge commit ie.., before merging a pull request it will test the merge to see if any merge conflicts exist or not. In GitHub its providing a merge_commit_sha (The value of the merge_commit_sha
attribute changes depending on the state of the pull request. Before merging a pull request, the merge_commit_sha
attribute holds the SHA of the test merge commit. After merging a pull request, the merge_commit_sha
attribute changes depending on how you merged the pull request) .
So can we get the same in Bitbucket too or its already there? if its already there then how can I get the test merge commit in bitbucket?
Thanks
Hi, @kamal.mohammed! Welcome to the community!
No, this is not possible. Just to give you some context about the reason that this is not possible, a commit contains the description of elements such as the author of the commit, the content of the commit (the list of files + directories that make up this commit), the commit's parents, the timestamp at which the commit is created. The hash of a commit is a hash of all this information. Since it is not possible to guess beforehand the timestamp at which the commit will occur, we cannot guess beforehand what that hash will be.
Please let us know if you have any questions related to this subject so we can help you with that.
Kind regards,
Caroline
Hi @Caroline R!
Thanks for the Reply. Ok Understood it.
I see that in the Pull request Page it's doing the check or giving diff with respect to base branch's latest commit and telling us about Any Merge Conflicts that may come up. So How is it is checking for Merge Conflicts that are coming up? If done Internally, can you give me an idea of how it is doing so?
Thanks,
Kamal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Kamal!
Bitbucket creates a temporary repository and creates a merge in the back end. This way we are able to show you what the final stage of the changes will look like once the merge is completed and if there are any conflicts.
I hope this helps, but do let me know if you have any questions.
Kind regards,
Caroline
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.