Thomas, what I still miss in this Wiki, is the meaning of each line.
Let me try to summarize these lines and state what I do not understand: project = Project.find_by_slug "gitorious" repository = project.repositories.find_by_name "mainline" These two lines find a specific repository withing a project. What if I want to install hook for all repositories, because I run a private gitorious and would like the bug tracker to be notified if any of the repositories changes??? hook = repository.hooks.build Creates a hook object for some repository. hook.user = repository.user Do I just assign to the hook object a repository user? Or should I state here which user is going to be assigned. In other words is repository.user a property access, or a placeholder? hook.url = "http://www.postbin.org/wqpx3l" This is where to submit the hook data which is sent as JSON string. hook.save This persists the hook in the DB? I think the most interesting approach is to install hooks for particular repository pattern within a project, like: project = Project.find_by_slug "gitorious" repository = project.repositories.find_by_name "main*" ... Many thanks for your help and really great product. Ovanes On Tuesday, August 7, 2012 11:55:37 AM UTC+2, Thomas Kjeldahl Nilsson wrote: > > Hi Ovanes, > > you're right, the instructions are unclear if you're not a Ruby/Rails > developer. I've clarified it a bit. From the current version of the wiki > page: > > Adding one is done from the Rails console (can be started from the root of > the Gitorious installation, example: "RAILS_ENV=production bundle exec > script/console") The changes you make below in the console is saved to the > underlying database and is persistent between Gitorious startups. > > Hope this gets you further, Ovanes. > > cheers, > Thomas > > On 08/06/2012 11:40 AM, Ovanes Markarian wrote: > > Hell *, > > went through the docs of the WebHooks, but can't understand how WebHooks > are suppose to be setup... I am really new to Ruby etc. and the steps > provided in the docs are very very scarce: > https://gitorious.org/gitorious/pages/WebHooks > > I quoted unclear parts and asked for help in this Wiki Article.Thought > it might be a good place to collaborate. It might be good feature to add > some discussion board to Wiki pages. I like the solution Redis implemented > with Disqus, but Disqus might not be appropriate for private gitorious > deployments. > > With Kind Regards, > Ovanes > > -- > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > > > > -- > best regards, > Thomas Kjeldahl Nilssonhttp://gitorious.com > > -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected]
