← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] lp:~cjwatson/launchpad/snap-git-url into lp:launchpad

 


Diff comments:

> 
> === modified file 'lib/lp/snappy/interfaces/snap.py'
> --- lib/lp/snappy/interfaces/snap.py	2016-11-22 02:13:11 +0000
> +++ lib/lp/snappy/interfaces/snap.py	2016-12-02 13:18:34 +0000
> @@ -577,6 +592,23 @@
>          :raises BadSnapSearchContext: if the context is not understood.
>          """
>  
> +    @operation_parameters(url=TextLine(title=_("The URL to search for.")))
> +    @call_with(visible_by_user=REQUEST_USER)
> +    @operation_returns_collection_of(ISnap)
> +    @export_read_operation()
> +    @operation_for_version("devel")
> +    def findByURL(url, visible_by_user=None):
> +        """Return all snap packages that build from the given URL.
> +
> +        This currently only works for packages that build directly from a
> +        URL, rather than being linked to a Bazaar branch or Git repository
> +        hosted in Launchpad.
> +
> +        :param url: A URL.
> +        :param visible_by_user: If not None, only return packages visible by
> +            this user.

The other ISnapSet.findBy* methods work the same way (due to how {Branch,Git}Collection work), so I've opted for clarifying the documentation here.

> +        """
> +
>      def preloadDataForSnaps(snaps, user):
>          """Load the data related to a list of snap packages."""
>  


-- 
https://code.launchpad.net/~cjwatson/launchpad/snap-git-url/+merge/312348
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.


References