~jcsackett/charmworld/bac-tag-constraints

« back to all changes in this revision

Viewing changes to charmworld/views/api/__init__.py

  • Committer: Tarmac
  • Author(s): Brad Crittenden
  • Date: 2014-04-02 18:25:54 UTC
  • mfrom: (497.1.1 add-maintainers)
  • Revision ID: tarmac-20140402182554-h4fo6e0qnroitzni
Add a 'maintainer's field.

It was decided on the mailing list that the 'maintainer' field should be
renamed to 'maintainers' to make it clear that there can be more than one.
Note the old 'maintainer' field was capable of being a single entity or a list
just fine.

So for backward compatability, 'maintainer' is preserved, 'maintainers' is
added and the actual value used is the union of the two, with duplicates
removed.  

On the charm page the heading has been changed to 'Maintainer(s)" and an
unordered list is used to present the names.

https://codereview.appspot.com/83620043/

R=rharding.

Approved by Juju Gui Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
215
215
            if result not in cls.TEST_STATUSES:
216
216
                raise ValueError('Unsupported test status: %s' % result)
217
217
            tested_providers[provider] = result
218
 
        maintainer = charm.maintainer
 
218
        maintainers = charm.maintainers
 
219
        maintainer = maintainers[0] if maintainers else ''
219
220
        bugs_link = 'https://bugs.launchpad.net/charms/+source/%s' % charm.name
220
221
        revisions = [cls._format_revision(rev) for rev in charm.changes]
221
222
        output.update({
233
234
                'revisions': revisions,
234
235
            },
235
236
            'maintainer': cls._parsed_email(maintainer),
 
237
            'maintainers': [cls._parsed_email(m) for m in maintainers],
236
238
            'relations': {
237
239
                'provides': charm.provides,
238
240
                'requires': charm.requires,