coala / community

Generic re-usable community site
https://coala-community.netlify.app
GNU Affero General Public License v3.0
19 stars 45 forks source link

Add check for "www.github.com" and "www.gitlab.com" #230

Open KVGarg opened 5 years ago

KVGarg commented 5 years ago

The resource key in remote url can also have a value of www.github.com or www.gitlab.com. Currently, it checks for github.com or gitlab.com due to which the command .ci/build.sh when executed in terminal raises the following Exception while running the app locally

File "/home/kvgarg/GSOC/Coala Open Source/community/community/urls.py", line 12, in <module>
    from gci.feeds import LatestTasksFeed as gci_tasks_rss
File "/home/kvgarg/GSOC/Coala Open Source/community/gci/feeds.py", line 10, in <module>
    class LatestTasksFeed(Feed):
File "/home/kvgarg/GSOC/Coala Open Source/community/gci/feeds.py", line 12, in LatestTasksFeed
    link = get_deploy_url() + '/gci/tasks/rss.xml'
File "/home/kvgarg/GSOC/Coala Open Source/community/community/git.py", line 180, in get_deploy_url
    raise Exception('remote %s is not supported' % url)
TypeError: not all arguments converted during string formatting

This can be solved by putting an OR condition to check whether url.resource has a value of www.github.com or www.gitlab.com. Changes need to be made in multiple files.

Steps to re-produce the error: clone the repo using git clone https://www.github.com/coala/community.git

A difficult/newcomer issue .

Passeriform commented 5 years ago

Hey! Can I be assigned the issue.

KVGarg commented 5 years ago

I don’t know whether it is a valid bug or not. Let @li-boxuan decide. After then you can work on it if its a valid issue. Got closed by-mistake 😅