Add check for "www.github.com" and "www.gitlab.com"
- Dominant language
- Python
- Stars
- 19
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
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
from gci.feeds import LatestTasksFeed as gci_tasks_rss
File "/home/kvgarg/GSOC/Coala Open Source/community/gci/feeds.py", line 10, in
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 .
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in community/community/git.py, where get_deploy_url() rejects the remote URL, and inspect the related URL checks used by .ci/build.sh. Reproduce with a clone URL using www.github.com, then verify that both www.github.com and www.gitlab.com are accepted and the build command no longer raises the shown exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100