go-scm icon indicating copy to clipboard operation
go-scm copied to clipboard

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

Open KeJunMao opened this issue 3 years ago • 3 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

KeJunMao avatar Aug 17 '22 16:08 KeJunMao

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

Thanks Shruthi Kini

ShruthiHubb avatar Sep 14 '22 07:09 ShruthiHubb

Hi @ShruthiHubb

check here https://github.com/harness/drone/pull/3250#issuecomment-1232327333

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?

KeJunMao avatar Sep 14 '22 14:09 KeJunMao

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!

bradrydzewski avatar Sep 16 '22 17:09 bradrydzewski

fixed by https://github.com/drone/go-scm/pull/226

bradrydzewski avatar Oct 13 '22 13:10 bradrydzewski