Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ref name in PR commits page #25876

Merged
merged 10 commits into from
Aug 24, 2023

Conversation

yp05327
Copy link
Contributor

@yp05327 yp05327 commented Jul 14, 2023

The branch name display here is based on the repo's default branch which is not correct.
image

For example, if I changed the default branch, the branch name here will also be changed:
image
image
you can confirm this in :
https://try.gitea.io/yp05327/testrepo/pulls/1/commits

I think we do not need to display branch name here, as we already have the branch info above.
image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 14, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 14, 2023
@yp05327 yp05327 changed the title Remove branch(ref) name behind the commit count in PR commits page Remove branch name behind the commit count in PR commits page Jul 14, 2023
@yp05327 yp05327 changed the title Remove branch name behind the commit count in PR commits page Remove ref name in PR commits page Jul 14, 2023
@lunny
Copy link
Member

lunny commented Jul 14, 2023

Why not just remove it from template?

@yp05327
Copy link
Contributor Author

yp05327 commented Jul 14, 2023

Why not just remove it from template?

It uses commits_table.tmpl which is a shared template.

@lunny
Copy link
Member

lunny commented Jul 14, 2023

I don't think this is the right way to fix that problem.

@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 14, 2023
@yp05327
Copy link
Contributor Author

yp05327 commented Jul 14, 2023

Checked all usages, it seems that we can remove it from template safely.

@@ -1280,7 +1280,7 @@ func registerRoutes(m *web.Route) {
m.Get("", repo.SetWhitespaceBehavior, repo.GetPullDiffStats, repo.ViewIssue)
m.Get(".diff", repo.DownloadPullDiff)
m.Get(".patch", repo.DownloadPullPatch)
m.Get("/commits", context.RepoRef(), repo.SetWhitespaceBehavior, repo.GetPullDiffStats, repo.ViewPullCommits)
Copy link
Member

Choose a reason for hiding this comment

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

Does this really need to be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this can be removed here, but if you think this is not safe, we can keep it.

@lunny
Copy link
Member

lunny commented Jul 24, 2023

Since the commit table is shared by some pages, could you also have screenshots for other commits pages?

@yp05327
Copy link
Contributor Author

yp05327 commented Aug 9, 2023

commits_table.tmpl is used in 3 places.
image

Repo Commit Page:
Before:
image
After:
image

New PR page: no changes
Before:
image
After:
image

@lunny lunny added the topic/ui-interaction Change the process how users use Gitea instead of the visual appearance label Aug 9, 2023
@lunny lunny added this to the 1.21.0 milestone Aug 9, 2023
@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 Aug 9, 2023
@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 Aug 23, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 23, 2023
@lunny lunny enabled auto-merge (squash) August 24, 2023 01:07
@lunny lunny merged commit 7e30986 into go-gitea:main Aug 24, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 24, 2023
@yp05327 yp05327 deleted the remove-branchname-in-pr-commits branch August 24, 2023 01:52
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 24, 2023
* upstream/main:
  feat(API): update and delete secret for managing organization secrets (go-gitea#26660)
  Remove ref name in PR commits page (go-gitea#25876)
  Modify the content format of the Feishu webhook (go-gitea#25106)
  Handle "comment form combo editor init" more gracefully (go-gitea#26688)
  Prefer variables over subprocesses (go-gitea#26690)
  Fix archived unix time when archiving the label (go-gitea#26681)
  Make "link-action" backend code respond correct JSON content (go-gitea#26680)
  Fix doubled box-shadow in branch dropdown menu (go-gitea#26678)
  Refactor toast module (go-gitea#26677)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. topic/ui-interaction Change the process how users use Gitea instead of the visual appearance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants