# \#hook

**URL:** https://community.developer.atlassian.com/tag/hook/460.md

[Latest](https://community.developer.atlassian.com/latest.md) · [Categories](https://community.developer.atlassian.com/categories.md) · [Tags](https://community.developer.atlassian.com/tags.md)

---

## [Merge Check: Modify Merge Default Fields](https://community.developer.atlassian.com/t/merge-check-modify-merge-default-fields/76923)

<div class="topic-metadata">

**Author:** [@talg1978](https://community.developer.atlassian.com/u/talg1978)\
**Replies:** 1\
**Last updated:** [May 9, 2024, 6:31am UTC](https://community.developer.atlassian.com/t/merge-check-modify-merge-default-fields/76923 "2024-05-09T06:31:43Z")

</div>

Hi All, I have a merge check hook, which is triggered when clicking this “Merge” button (in the final dialog before the actual merge), validating the merge. I would like to use this hook (or another) to modify the d…

---

## [Unable to find Custom Field's configuration on useProductContext()](https://community.developer.atlassian.com/t/unable-to-find-custom-fields-configuration-on-useproductcontext/59929)

<div class="topic-metadata">

**Author:** [@AgustinBarreto](https://community.developer.atlassian.com/u/AgustinBarreto)\
**Replies:** 2\
**Last updated:** [July 20, 2022, 7:28pm UTC](https://community.developer.atlassian.com/t/unable-to-find-custom-fields-configuration-on-useproductcontext/59929 "2022-07-20T19:28:38Z")

</div>

I would like to display the unit of measure of a field in both issue-edit and issue-view screens. This unit should be previously set on Field Configuration screen, so my idea is to create a new CustomFieldType and define…

---

## [When my custom hook reject a change made via Bitbucket's web editor, the UI forces me to create a new branch and a pull request: WHY?!](https://community.developer.atlassian.com/t/when-my-custom-hook-reject-a-change-made-via-bitbuckets-web-editor-the-ui-forces-me-to-create-a-new-branch-and-a-pull-request-why/31740)

<div class="topic-metadata">

**Author:** [@aron.gombas](https://community.developer.atlassian.com/u/aron.gombas)\
**Replies:** 3\
**Last updated:** [April 15, 2021, 12:57pm UTC](https://community.developer.atlassian.com/t/when-my-custom-hook-reject-a-change-made-via-bitbuckets-web-editor-the-ui-forces-me-to-create-a-new-branch-and-a-pull-request-why/31740 "2021-04-15T12:57:14Z")

</div>

We are working on integrating the hook of our app (Better Commit Policy for Bitbucket | Atlassian Marketplace) to Bitbucket’s web based editor. The UI/UX that is triggered by the file edit repository hook rejection event…

---

## [Not all webhooks come to server](https://community.developer.atlassian.com/t/not-all-webhooks-come-to-server/42144)

<div class="topic-metadata">

**Author:** [@okarpovv](https://community.developer.atlassian.com/u/okarpovv)\
**Replies:** 6\
**Last updated:** [December 8, 2020, 5:30pm UTC](https://community.developer.atlassian.com/t/not-all-webhooks-come-to-server/42144 "2020-12-08T17:30:21Z")

</div>

Hello, we did contact support, but they forwarded us to this forum. We have a specific issue for some of our users - our server does not recieve all webhooks but only few of them for that users. Who we can talk to dis…

---

## [Preferred way to access git environment variables on PreRepositoryHook](https://community.developer.atlassian.com/t/preferred-way-to-access-git-environment-variables-on-prerepositoryhook/32882)

<div class="topic-metadata">

**Author:** [@esaborg](https://community.developer.atlassian.com/u/esaborg)\
**Replies:** 1\
**Last updated:** [December 11, 2019, 3:25pm UTC](https://community.developer.atlassian.com/t/preferred-way-to-access-git-environment-variables-on-prerepositoryhook/32882 "2019-12-11T15:25:45Z")

</div>

Hi, What’s the preferred (or even working way) to access git environment variables on PreRepositoryHook code? I’m utilizing git push-options and on Bitbucket Server 5.x the needed environment variables were available th…

---

## [How to use an impersonating Application Link with Bitbucket's Access Key feature?](https://community.developer.atlassian.com/t/how-to-use-an-impersonating-application-link-with-bitbuckets-access-key-feature/31787)

<div class="topic-metadata">

**Author:** [@gabor.nagy](https://community.developer.atlassian.com/u/gabor.nagy)\
**Replies:** 0\
**Last updated:** [September 11, 2019, 9:12am UTC](https://community.developer.atlassian.com/t/how-to-use-an-impersonating-application-link-with-bitbuckets-access-key-feature/31787 "2019-09-11T09:12:20Z")

</div>

Dear Community, I am using impersonating application links between Bitbucket and Jira to implement repository hooks in my app (some logic is run inside Jira). This works fine with regular authentication but with Bitbuck…

---

## [Hooks vs @EventListener](https://community.developer.atlassian.com/t/hooks-vs-eventlistener/31374)

<div class="topic-metadata">

**Author:** [@anon79310877](https://community.developer.atlassian.com/u/anon79310877)\
**Replies:** 1\
**Last updated:** [August 30, 2019, 7:45am UTC](https://community.developer.atlassian.com/t/hooks-vs-eventlistener/31374 "2019-08-30T07:45:40Z")

</div>

Hi! I’m creating now plugin to copy specific tags from fork to upstream when Pull Request will be accepted. I must check if User has permission to create tags on upstream. I use @EventListener PullRequestMergedEvent, b…

---

## [Show custom messages in the hooks](https://community.developer.atlassian.com/t/show-custom-messages-in-the-hooks/28122)

<div class="topic-metadata">

**Author:** [@dttsdall](https://community.developer.atlassian.com/u/dttsdall)\
**Replies:** 3\
**Last updated:** [March 26, 2019, 6:31pm UTC](https://community.developer.atlassian.com/t/show-custom-messages-in-the-hooks/28122 "2019-03-26T18:31:11Z")

</div>

To simplify I set up an event handler on the ProjectPermissionGrantRequestedEvent with the following code: import com.atlassian.bitbucket.event.permission.ProjectPermissionGrantRequestedEvent (event as ProjectPermission…

---

## [In addition to merge checks, also hooks are sometimes(?) called to verify pull requests: bug or feature?](https://community.developer.atlassian.com/t/in-addition-to-merge-checks-also-hooks-are-sometimes-called-to-verify-pull-requests-bug-or-feature/17700)

<div class="topic-metadata">

**Author:** [@aron.gombas](https://community.developer.atlassian.com/u/aron.gombas)\
**Replies:** 5\
**Last updated:** [April 27, 2018, 2:33am UTC](https://community.developer.atlassian.com/t/in-addition-to-merge-checks-also-hooks-are-sometimes-called-to-verify-pull-requests-bug-or-feature/17700 "2018-04-27T02:33:40Z")

</div>

We have seen this really odd behavior that I cannot explain. When looking at a pull request via the web interface, its “mergeability” is calculated by calling the merge check(s) activated in the target repository. That’…
