varunsridharan / github-gitea-mirror

Simple Python Script To Mirror Repository From Github To Gitea
MIT License
177 stars 20 forks source link

Update helper.py #8

Closed Nomad192 closed 1 year ago

Nomad192 commented 1 year ago

Added "https://" + for all links

!!! WARNING !!!

! I use google translate !

Bugfix

Correction of errors like "Invalid URL 'example.com/api/v1/orgs': No schema supplied. Perhaps you meant http://example.com/api/v1/orgs?"

The correction on "http://" + did not give the desired result, the source server works for reverse proxy on https

Tested on win 11 (x64) via cmd (administrator)

varunsridharan commented 1 year ago

@Nomad192 Sorry about the delayed response.

Can you please share why we need to add https:// ?

Nomad192 commented 1 year ago

@varunsridharan

!!! WARNING !!!

! I use google translate !

Before the fixes, I was getting an error like Invalid URL'example.com/api/v1/orgs ': No schema supplied. Perhaps you meant http://example.com/api/v1/orgs?, I think it is necessary to support the situation when the user forgot to add http:// or https:// to his address in config.json in the host field.

To be honest, up to this point I thought it was a script bug. Now I realized that I just forgot to specify it in my `config.json'.

I will try to fix the PR after a while so that it matches the first paragraph.