community icon indicating copy to clipboard operation
community copied to clipboard

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

Open KVGarg opened this issue 6 years ago • 2 comments

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 .

KVGarg avatar Jan 22 '19 07:01 KVGarg

Hey! Can I be assigned the issue.

Passeriform avatar Mar 12 '19 13:03 Passeriform

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 😅

KVGarg avatar Mar 12 '19 15:03 KVGarg