drone/go-scm

gitee: When the name and path are inconsistent, got 404 error

KeJunMao opened this issue · 4 comments

like this:

the repo name is Storyline 360 User Guide

but the repo paht is Storyline-360-User-Guide

ch07_2022-08-18 00 48 21

in drone repo list:
ch07_2022-08-18 00 51 30

in drone repo detail:
ch07_2022-08-18 00 51 38

Hi @KeJunMao can you give us more context here to troubleshoot this issue?

Thanks
Shruthi Kini

Hi @ShruthiHubb

check here
harness/gitness#3250 (comment)

or use curl

curl -X GET --header 'Content-Type: application/json;charset=UTF-8' 'https://gitee.com/api/v5/users/Ke_Jun/repos?type=all&sort=full_name&page=1&per_page=20'

check response root[3]

...
"id": 1039816
"full_name": "Ke_Jun/Storyline-2-User-Guide-zh_cn"
"human_name": "Ke_Jun/Storyline 2 User Guide-zh_cn"
"url": "https://gitee.com/api/v5/repos/Ke_Jun/Storyline-2-User-Guide-zh_cn"
"path": "Storyline-2-User-Guide-zh_cn"
"name": "Storyline 2 User Guide-zh_cn"
"description": "storyline2用户指南-简体中文"
...

the human_name include space, but drone should use full_name as slug

or , name include space, slug should use path?

I cannot comment on Gitee since I do not have any experience, but Bitbucket has similar options, and for Bitbucket we use the full_name equivalent. I suspect we should use full_name for Gitee too. Since Gitee is a community contribution and is community supported, we would kindly ask that a member of the community test the proposed fix and submit a patch. Thanks!

fixed by #226