Skip to content

Refactor pull request view (6)#37522

Merged
wxiaoguang merged 2 commits intogo-gitea:mainfrom
wxiaoguang:refactor-pr-view
May 4, 2026
Merged

Refactor pull request view (6)#37522
wxiaoguang merged 2 commits intogo-gitea:mainfrom
wxiaoguang:refactor-pr-view

Conversation

@wxiaoguang
Copy link
Copy Markdown
Contributor

Clean up legacy logic.

  • Use backend logic to choose PR timeline icon color
  • Always use the Vue form to merge, remove the "StillCanManualMerge" logic

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 3, 2026
@wxiaoguang
Copy link
Copy Markdown
Contributor Author

wxiaoguang commented May 3, 2026

image
image
image
image

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR continues the pull request view refactor by moving more merge-box state/decision logic to the backend and consolidating PR status/merge UI templates around reusable components.

Changes:

  • Moves PR timeline icon color selection and some merge-box state into backend-prepared data.
  • Replaces legacy/manual merge-box branches with the Vue merge form and shared status-check partials.
  • Simplifies flex-list/segment styling to support the refactored PR merge/status layouts.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
web_src/js/features/repo-issue-pull.ts Keeps PR update action logic, only adds a TODO about non-JSON responses.
web_src/js/components/PullRequestMergeForm.vue Adjusts merge button coloring/layout and keeps all merge actions in the Vue form.
web_src/css/shared/flex-list.css Refactors divided-list padding/divider helpers around items-px-default.
web_src/css/repo.css Tweaks commit-status list sizing.
web_src/css/modules/segment.css Simplifies fitted segment padding rules.
templates/repo/pulls/status_items.tmpl Extracts reusable commit-status item rendering.
templates/repo/pulls/status.tmpl Removes the old monolithic status template.
templates/repo/issue/view_content/update_branch_by_merge.tmpl Reworks update-branch block to use merge-box data.
templates/repo/issue/view_content/pull_merge_status_checks.tmpl Adds a new merge-box partial for status checks and approvals.
templates/repo/issue/view_content/pull_merge_box.tmpl Rewrites the PR merge box to use backend data and new partials/components.
templates/repo/commit_statuses.tmpl Reuses the new shared status item partial in commit-status popovers.
templates/devtest/flex-list.tmpl Updates examples to the new flex-list padding model.
routers/web/repo/pull_merge_form.go Backend-prepares merge form props/styles, including manual merge handling.
routers/web/repo/pull_merge_box.go Adds backend logic for timeline icon coloring.
routers/web/repo/pull.go Extends merge-box/view structs with backend-prepared fields.
routers/web/repo/issue_view.go Populates merge-box data and invokes the new backend helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web_src/js/components/PullRequestMergeForm.vue
Comment thread web_src/js/components/PullRequestMergeForm.vue Outdated
Comment thread templates/repo/pulls/status_items.tmpl
Comment thread templates/repo/issue/view_content/update_branch_by_merge.tmpl
Comment thread routers/web/repo/pull_merge_form.go
@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label May 4, 2026
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 4, 2026
@bircni bircni self-requested a review May 4, 2026 05:14
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 4, 2026
@wxiaoguang wxiaoguang merged commit dd17521 into go-gitea:main May 4, 2026
22 checks passed
@GiteaBot GiteaBot added this to the 1.27.0 milestone May 4, 2026
@wxiaoguang wxiaoguang deleted the refactor-pr-view branch May 4, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/refactoring Existing code has been cleaned up. There should be no new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants