fix: 新接口报错修复 - #891
Merged
Merged
Conversation
gitcodeOrg: 移除 parseOrgRepo 中的 visibility 写入 Co-authored-by: Cursor <cursoragent@cursor.com>
Jiannan-dev
reviewed
Jun 25, 2026
| } | ||
| } | ||
| if (repo.ownerName && repo.name) { | ||
| return `${repo.ownerName}/${repo.name}`; |
Collaborator
There was a problem hiding this comment.
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, |
Collaborator
There was a problem hiding this comment.
medium: 只从 parseOrgRepo 返回值里移除 visibility 会让后续 bulkCreate(..., { updateOnDuplicate }) 不再更新这个字段,但库里已经写入过的错误 visibility 会继续保留。若目标是去掉这次错误写入的影响,需要显式把 visibility 写成 null(让 updateOnDuplicate 清掉旧值),或补一条数据清理 SQL/脚本。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
openharmonyVersion.js——改用 full_name 取 tag 的修复;
gitcodeOrg.js——移除 parseOrgRepo 里的 visibility 写入。