EDIT: you should still be able to put hooks in the global git template as mentioned on the link you described and the hooks will be copied into every new or forked repo created by Stash.
You might want to have a look at STASH-3597 and vote for that issue as well.
As per the "Integrating Crowd with Atlassian Stash" document, the first step you have to take is to configure Crowd so that Stash will be able to connect to it. There is another step in which you will have to configure a specific set of users that can log in to Stash. Hence, not all your Crowd user base will have to be sychronized with Stash but only the ones you configure.
Stash is a Git repository management tool. So that means you are able to do anything Git allows you to. The Repository System Info Plugin enables you to see the location of your repositories on disk and you can add the hooks to your Git repositories once you know their path. You can see some examples here.
However, you might want to start doing at "Stash level" after reading Hooked on Stash.
Here is what I think how Global Hooks in git work:
-> There is a template that a user can create and then initialize using "
git config --global init.templatedir '~/.git_template'" and then every repo that I have created can use this template and hoks within this template..
-> Here is what I tried with STASH:
I created a repo and hooks within it, then I forked that repo assuming that the hooks get copied over, but it seems that is not the case.. So how can I implement global hooks at git level for STASH ??
When you fork in Stash we're just doing a 'git clone', which doesn't normally copy hooks. Stash is no different.
While I don't recommend in general that you use raw Git hooks, you should still be able to put your hooks in the global git template directory and they should be copied into every new or forked repository that is created in Stash. Please let me know if that's not the case.
I would also thinking about making your hooks in the template directory symlinks so that if you need to make changes you can do it once and not have to update your hooks in Stash.
I would definitely vote/watch the issue that Thiago mentioned below. Managing global hooks in Stash would be the ideal situation. Although I should warn you if/when we implement that feature it is likely to only be Java/Plugin hooks, not the normal Git scripts.
Yes even I plan to use Java/Plugin Hooks soon.. But for now we have needs that needs to be accomplished soon enough.. So I will try out your suggestion..
One question I had on STASH/git side is, in general how can I check if the git push is a branch creation ??
meaning : git branch abc, git checkout abc, git push origin abc.
Now how can I know that this push is a branch checkout ?? I am looking for a git command.
One way I thought of is that during any push, git passes old change + new change and the branch name. If the old change is "00000000000" then that means its a branch creation, if not then its an existing branch..
Please correct me if I am wrong !!
Thanks Charles, that confirms one scenario..
Now there is a sticky part here, assuming the scenario below:
git branch abc, git checkout abc, making changes in the branch, git commit -a -m "fixing stuff", git push origin abc
Here initially I used to do : git rev-list old_change..latest_change . But here if I take the latest_change and do:
git cat-file commit latest_change | sed '1,/^$/d'.
It returns does not give me the latest changeset SHA, am I missing something here ???
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG