Getting author name from from
and project
#108
Conversation
Ah well, guess there's some problem as the test fails. I'll check it. |
Yeah, that's right. 'from' is missed if there is no project config. Do |
You can do less operations if chain ways to get author: author = self.config.get('owner')
if not author and 'from' in self.config:
...
if not author:
authors = PackageRoot(self.config['project']).metainfo.authors
if authors:
author = authors[0]
if not author:
author = getuser().title()
... |
Yes, I'll get this done. Thanks! |
The changes have been made with this commit. Edit: Test fails because |
In "from" case we also have to get the first author. I'm not sure about licensing rules, but usually owner is only one person. Everything looks really good. Fix this case and check what Travis says, and I'll merge it :) |
Oh, my bad. I'll patch it |
We use package metainfo here to get authors from it
Done. Thank you for your contribution :) |
Fix for issue #107 - getting the author name in
generate license
fromfrom
andproject
config files.Please do review this and suggest changes as there may be errors. Thanks!