aboutsummaryrefslogtreecommitdiffstats
path: root/services/contexttest
Commit message (Collapse)AuthorAgeFilesLines
* Check if reverse proxy is correctly configured (#30890)wxiaoguang2024-05-101-1/+1
| | | | | | | | | Follow #27011 Follow #30885 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Move database operations of merging a pull request to post receive hook and ↵Lunny Xiao2024-05-071-0/+13
| | | | | | | | | | | | | | | | | | | | add a transaction (#30805) Merging PR may fail because of various problems. The pull request may have a dirty state because there is no transaction when merging a pull request. ref https://github.com/go-gitea/gitea/pull/25741#issuecomment-2074126393 This PR moves all database update operations to post-receive handler for merging a pull request and having a database transaction. That means if database operations fail, then the git merging will fail, the git client will get a fail result. There are already many tests for pull request merging, so we don't need to add a new one. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve oauth2 client "preferred username field" logic and the error ↵wxiaoguang2024-04-251-3/+11
| | | | | | | | | | | | | handling (#30622) Follow #30454 And fix #24957 When using "preferred_username", if no such field, `extractUserNameFromOAuth2` (old `getUserName`) shouldn't return an error. All other USERNAME options do not return such error. And fine tune some logic and error messages, make code more stable and more friendly to end users.
* Render embedded code preview by permlink in markdown (#30234)wxiaoguang2024-04-021-0/+1
| | | | | The permlink in markdown will be rendered as a code preview block, like GitHub Co-authored-by: silverwind <me@silverwind.io>
* Make "/user/login" page redirect if the current user has signed in (#29583)wxiaoguang2024-03-051-1/+2
| | | | Fix #29582 and maybe more. Maybe fix #29116
* Add an trailing slash to dashboard links (#29555)wxiaoguang2024-03-041-1/+3
| | | Fix #29533, and add some tests for "base/paginate.tmpl"
* Move context from modules to services (#29440)Lunny Xiao2024-02-271-0/+166
Since `modules/context` has to depend on `models` and many other packages, it should be moved from `modules/context` to `services/context` according to design principles. There is no logic code change on this PR, only move packages. - Move `code.gitea.io/gitea/modules/context` to `code.gitea.io/gitea/services/context` - Move `code.gitea.io/gitea/modules/contexttest` to `code.gitea.io/gitea/services/contexttest` because of depending on context - Move `code.gitea.io/gitea/modules/upload` to `code.gitea.io/gitea/services/context/upload` because of depending on context