It worked!! Thank you! cheers!
Renato Isidio Rio de Janeiro - Brazil On Mar 11, 3:05 pm, Renato Isidio <[email protected]> wrote: > Hi Marius! > > Thank you very much! Ill try! > > Cheers > > Renato Isidio > Rio de Janeiro - Brazil > > On Mar 11, 6:00 am, Marius Mårnes Mathiesen > > > > <[email protected]> wrote: > > On Thu, Mar 10, 2011 at 7:53 PM, Renato Isidio <[email protected]> wrote: > > > Its me again! it looks a simple question but I didnt find anywhere. > > > How can we add a committer to a repository using rails console? > > > > I`ve got the repository, but I didnt find any method to do it. Is > > > there a way? > > > What you want to do is to create a Committership object, this is what links > > a repository with a "committer" (either a User or a Group). A Committership > > needs these properties: > > - a repository, obviously > > - a creator (the user who made the object) > > - a committer - either a User or Group > > - a permissions property, which is a bit mask > > > This could be achieved as such in the console: > > > me = User.find_by_login("big_honcho") > > repo = Repository.find(42) > > mister_hagen = User.find_by_login("consigliere") > > committership = repo.committerships.build(:creator => me, :committer => > > mister_hagen) > > committership.build_permissions :commit, :admin > > committership.save > > > > PS: Is there some kind of API for those gitorious classes? > > > There are quite a lot of test cases that are both intended to ensure things > > keep working when we make changes and - more importantly - to demonstrate > > the usage of Gitorious from a programmer's point of view. > > > Happy hacking! > > - Marius -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected]
