-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Show latest commit for file #28067
Show latest commit for file #28067
Conversation
The space between commit rows and code top bar should be bigger. |
I know how it looks in GitHub. GitHub uses the same design for a single file and a list of files. We have in Gitea on the file list currently a other design than GitHub, so I the 2 designs should match. |
I also thought about this, But I thin this should be part of another PR |
@@ -333,6 +333,35 @@ func renderReadmeFile(ctx *context.Context, subfolder string, readmeFile *git.Tr | |||
} | |||
} | |||
|
|||
func loadLatestCommitData(ctx *context.Context, latestCommit *git.Commit) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is routers
the correct place for this function?
I don't think so, services
is probably better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This codes mostly sets ctx.Data
, so it belongs here. It was also the whole time in this file.
routers/web/repo/view.go
Outdated
commit, err := ctx.Repo.Commit.GetCommitByPath(util.PathEscapeSegments(ctx.Repo.TreePath)) | ||
commit, err := ctx.Repo.Commit.GetCommitByPath(ctx.Repo.TreePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused an error on non ASCII paths.
Co-authored-by: Denys Konovalov <[email protected]>
Please resolve the conflicts. |
|
Everything is now working again |
* giteaofficial/main: (34 commits) Use refname:strip-2 instead of refname:short when syncing tags (go-gitea#28797) Add gist to comparison (go-gitea#28809) Fix links in issue card (go-gitea#28806) Show latest commit for file (go-gitea#28067) Add ability to see open and closed issues at the same time (go-gitea#28757) Display latest sync time for pull mirrors on the repo page (go-gitea#28712) Fix `GetCommitStatuses` (go-gitea#28787) Caller should check the ResponseExtra.HasError() first to see whether the request fails (go-gitea#28796) Rework markup link rendering (go-gitea#26745) Fix nil pointer panic when exec some gitea cli command (go-gitea#28791) Add branch protection setting for ignoring stale approvals (go-gitea#28498) Forbid removing the last admin user (go-gitea#28337) Fix when private user following user, private user will not be counted in his own view (go-gitea#28037) Update github.com/cloudflare/circl (go-gitea#28789) Move more functions to db.Find (go-gitea#28419) Add non-JS fallback for reaction tooltips (go-gitea#28785) Modernize merge button (go-gitea#28140) Warn that `DISABLE_QUERY_AUTH_TOKEN` is false only if it's explicitly defined (go-gitea#28783) Speed up loading the dashboard on mysql/mariadb (go-gitea#28546) Fix schedule tasks bugs (go-gitea#28691) ...
If you view a file, you can now see the latest commit that changed that file. ![grafik](https://github.com/go-gitea/gitea/assets/15185051/272c3120-6db7-4f88-86e1-60080c9aabe5) --------- Co-authored-by: Denys Konovalov <[email protected]>
If you view a file, you can now see the latest commit that changed that file. ![grafik](https://github.com/go-gitea/gitea/assets/15185051/272c3120-6db7-4f88-86e1-60080c9aabe5) --------- Co-authored-by: Denys Konovalov <[email protected]>
If you view a file, you can now see the latest commit that changed that file. ![grafik](https://github.com/go-gitea/gitea/assets/15185051/272c3120-6db7-4f88-86e1-60080c9aabe5) --------- Co-authored-by: Denys Konovalov <[email protected]>
If you view a file, you can now see the latest commit that changed that file.