reconquest / atlassian-external-hooks

External Hooks plugin for Atlassian Bitbucket
https://external-hooks.reconquest.io
Other
44 stars 37 forks source link

Project level hooks not triggering with inheritance on at first commit/push #109

Closed Marakai closed 4 years ago

Marakai commented 4 years ago

Issue:

When creating a new repository in Bitbucket with Hooks set at the Project level (both pre- and post-receive), the first commit/push to the repository will not trigger the hooks.

Hooks are set to Inherited (Enabled) at the repo level. When changing the setting to Enable instead of Inherit, then a first time push will trigger the hook.

Any further commit/pushes will trigger the Project level hooks correctly - it's only the first one.

What should happen:

The Project-level hooks should trigger no matter what, if set to Inherited (Enabled).

Work-around:

If, at creation of repo, you go into Settings, then toggle the repo-level Hook from Inherited (Enabled) to Enabled, Save that settings and then immediately set it back to Inherited (Enabled), it will trigger correctly, though it's not immediately clear if it's because it now works properly - or whether it's actually now just continuing to use the repo-level hook and didn't actually switch back to Project-level. Would need to test with two different Hook scripts to verify.

kovetskiy commented 4 years ago

Hi, Thanks for the bug report, we will try to reproduce it on our end today. I'll keep you posted.

On Fri, Mar 6, 2020, 05:37 Marakai notifications@github.com wrote:

Issue:

When creating a new repository in Bitbucket with Hooks set at the Project level (both pre- and post-receive), the first commit/push to the repository will not trigger the hooks.

Hooks are set to Inherited (Enabled) at the repo level. When changing the setting to Enable instead of Inherit, then a first time push will trigger the hook.

Any further commit/pushes will trigger the Project level hooks correctly - it's only the first one. What should happen:

The Project-level hooks should trigger no matter what, if set to Inherited (Enabled). Work-around:

If, at creation of repo, you go into Settings, then toggle the repo-level Hook from Inherited (Enabled) to Enabled, Save that settings and then immediately set it back to Inherited (Enabled), it will trigger correctly, though it's not immediately clear if it's because it now works properly - or whether it's actually now just continuing to use the repo-level hook and didn't actually switch back to Project-level. Would need to test with two different Hook scripts to verify.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/reconquest/atlassian-external-hooks/issues/109?email_source=notifications&email_token=ACAN7ZENL3YMUATGHAI4HWDRGBOXZA5CNFSM4LCXHDI2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IS7DIVA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAN7ZCNZH2HFJUPGBJKUJDRGBOXZANCNFSM4LCXHDIQ .

kovetskiy commented 4 years ago

We've reproduced the bug and applied the fix, we'll release the new version today.

kovetskiy commented 4 years ago

Heads up! The new version is available for upgrade through Atlassian Marketplace — 10.1.0

https://marketplace.atlassian.com/apps/1211631/external-hooks-by-reconquest/version-history#b6532

Thanks for the bug report!