reconquest / atlassian-external-hooks

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

Which branch? #12

Closed TheCelavi closed 9 years ago

TheCelavi commented 9 years ago

I am thinking about using this for auto deploy of projects, but I need these hooks for events when master branch is pushed or something is merged into branch...

I can not find if this is supported?

Thanks!

seletskiy commented 9 years ago

You can use post-receive hook for this purpose. In the deploy script you can check if the target branch is master and to something in that case. See examples on the Wiki. Target branch (named $to_ref in the examples) will be passed via stdin for the specified script.

However, keep in mind that current post-receive hook implementation uses async-mode Stash hooks, so you will not be able to pass something back to the user on push. I'll fix it soon.

seletskiy commented 9 years ago

Docs updated: https://github.com/ngsru/atlassian-external-hooks/wiki/Example.-Update-development-site-on-dev-branch-update