Repository navigation
fix(gitee): map PR and issue states to domain statuses - #9456
Open
ShivamSharma43 wants to merge 1 commit into
Open
ShivamSharma43 wants to merge 1 commit into
ShivamSharma43 wants to merge 1 commit into
Conversation
convertPullRequests copied Gitee's lowercase open/closed/merged into pull_requests.status instead of code.OPEN/CLOSED/MERGED, and convertIssues mapped every state other than closed to TODO, so progressing issues were not IN_PROGRESS and rejected issues were not DONE. Map the states explicitly and keep the Gitee value in original_status. Closes apache#9454 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The Gitee converters don't map Gitee states to the domain status values.
convertPullRequestscopied the raw state intopull_requests.status, so Gitee PRs got lowercaseopen/closed/mergedinstead ofcode.OPEN/code.CLOSED/code.MERGED, which the GitHub, GitLab, Bitbucket Server and Azure DevOps converters write. Comparisons against the domain values miss them, e.g.PullRequest.ConvertStatusToIncidentStatus()and the PostgreSQL dashboards that filter onstatus = 'MERGED'.convertIssuesmapped every state other thanclosedtoTODO. Gitee issues can also beprogressing(nowIN_PROGRESS) andrejected(nowDONE; Gitee setsfinished_atfor these, which the extractor already uses as the resolution date and for lead time).Both converters now keep the Gitee state in
original_status, which was left empty. Unknown issue states still fall back toTODOas before; an unknown PR state is passed through unchanged.Does this close any open issues?
Closes #9454
Screenshots
N/A
Other Information
status_convertor_test.gocovers both mappings. With the old logic it fails (progressing/rejectedgiveTODO; PR states stay lowercase).go test ./plugins/gitee/...,go vet ./plugins/gitee/...andgofmtare clean. The Gitee plugin has no e2e tests./repos/mindspore/mindspore/issues?state=progressing|rejected,/pulls?state=merged); not run as a full pipeline against a Gitee server.pr-type/bug-fix.Co-Authored-By:trailer.🤖 Generated with Claude Code