Skip to content

fix: 新接口报错修复 - #891

Merged
Jiannan-dev merged 1 commit into
originjs:mainfrom
Yinfan-Shao:dev-syf
Jun 25, 2026
Merged

fix: 新接口报错修复#891
Jiannan-dev merged 1 commit into
originjs:mainfrom
Yinfan-Shao:dev-syf

Conversation

@Yinfan-Shao

Copy link
Copy Markdown
Contributor

openharmonyVersion.js——改用 full_name 取 tag 的修复;
gitcodeOrg.js——移除 parseOrgRepo 里的 visibility 写入。

gitcodeOrg: 移除 parseOrgRepo 中的 visibility 写入
Co-authored-by: Cursor <cursoragent@cursor.com>
}
}
if (repo.ownerName && repo.name) {
return `${repo.ownerName}/${repo.name}`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium: 这里的 fallback 没有做 trim,和上面的“兼容历史数据里 owner / repo(带空格)”目标不一致。fullName 缺失或不含 / 时,如果 ownerName / name 带空格,会拼出包含空格的 repoPath,GitCode tags URL 会变成 %20openharmony%20/%20repo%20 并返回 400,最后保留旧值而不是完成修复。建议对 fallback 也按 segment trim + filter 后再拼接,并在任一段为空时返回 null。

defaultBranch: item.default_branch,
ownerHtmlUrl: item.namespace?.html_url,
visibility: item.public ? 'public' : 'private',
dataType: DATA_TYPE_GENERAL,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium: 只从 parseOrgRepo 返回值里移除 visibility 会让后续 bulkCreate(..., { updateOnDuplicate }) 不再更新这个字段,但库里已经写入过的错误 visibility 会继续保留。若目标是去掉这次错误写入的影响,需要显式把 visibility 写成 null(让 updateOnDuplicate 清掉旧值),或补一条数据清理 SQL/脚本。

@Jiannan-dev
Jiannan-dev merged commit b1ebd09 into originjs:main Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants