Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Pre Receive Hook - Project Inherit "No" not working in latest version (13.1.2) #145

Open
jbarber-rbbn opened this issue Jun 19, 2024 · 4 comments

Comments

@jbarber-rbbn
Copy link

Summary

Setting pre-receive hooks on a repository to not inherit from the project level does not work

Versions

Bitbucket version: 8.19.3
External Hooks version: 13.1.2

Steps to replicate issue:

  1. Create shell script hook with the following content in /external-hooks/ directory:
#!/bin/bash 
echo "NO"
exit 1
  1. chmod +x testing.sh
  2. In Bitbucket enable the hook for the project
    image
  3. Visit repository hooks and see that the repository is now inheriting from the project
    image
  4. Disable hook at the repository level
    image
  5. Commit code in the repository - The hook is still called when it should not be
    image

Other findings

I noticed when changing the script name and updating the project pre-receive hook and trying to commit again shows that the repository hook was not updated automatically. (Can make a separate issue for that if needed)

@jbarber-rbbn
Copy link
Author

@seletskiy

@kovetskiy
Copy link
Member

Hey, we are looking into the issue.

kovetskiy added a commit that referenced this issue Aug 28, 2024
@jbarber-rbbn
Copy link
Author

@kovetskiy thanks!

@jbarber-rbbn
Copy link
Author

@kovetskiy , FYI we have been using the feature.hook.scripts=true in bitbucket.properties since we upgraded to 8.19 from 7.21.X
This does not resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants