Pushed the requested changes Diff comments:
> diff --git a/lib/lp/registry/model/ociproject.py > b/lib/lp/registry/model/ociproject.py > index 3b376be..d165572 100644 > --- a/lib/lp/registry/model/ociproject.py > +++ b/lib/lp/registry/model/ociproject.py > @@ -222,6 +222,16 @@ class OCIProject(BugTargetBase, StormBase): > if recipe is not None: > recipe._official = True > > + def getDefaultGitRepository(self): > + namespace = getUtility(IGitNamespaceSet).get( > + self.registrant, oci_project=self) > + return namespace.getByName(self.name) > + > + def getDefaultGitRepositoryPath(self): > + namespace = getUtility(IGitNamespaceSet).get( > + self.registrant, oci_project=self) > + return '%s/+git/%s' % (namespace.name, self.name) It makes sense. I'll make the OCI project page message personalized for now, based on the user logged in. If the logged in user already has a repository in the OCI project namespace, I'll show "Your default git repository for this project is <link to the git repo>". Otherwise, it should be "You can create a git repository for this OCI project (...)", and the git commands. > + > > @implementer(IOCIProjectSet) > class OCIProjectSet: > diff --git a/lib/lp/registry/templates/ociproject-index.pt > b/lib/lp/registry/templates/ociproject-index.pt > index 9a14cb7..c814ce1 100644 > --- a/lib/lp/registry/templates/ociproject-index.pt > +++ b/lib/lp/registry/templates/ociproject-index.pt > @@ -26,6 +26,24 @@ > </metal:heading> > > <div metal:fill-slot="main"> > + <div tal:condition="python: view.git_repository is None"> > + <p> > + You can create a git repositories for this OCI project in order to Ok! > + build your OCI recipes by using the following commands: > + <br /> > + <pre class="command"> > + git remote add origin git+ssh://<tal:name > replace="context/registrant/name"/>@git.launchpad.net/<tal:name > replace="view/git_repository_path"/> > + git push --set-upstream origin master > + </pre> > + </p> > + </div> > + <div tal:define="repo view/git_repository" > + tal:condition="repo"> > + The default git repository for this project is > + <a tal:content="repo/display_name" > + tal:attributes="href repo/fmt:url">lp:foo</a>. > + </div> > + > <h2>OCI project information</h2> > <div class="two-column-list"> > <dl id="pillar" tal:define="pillar context/pillar"> -- https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/395174 Your team Launchpad code reviewers is subscribed to branch ~pappacena/launchpad:oci-project-of-project-git-namespace. _______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp

