| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
1. better GetPossibleUserByID logic
2. fix some function name & comment typos
3. do not re-generate avatar if one exists
|
|
|
|
|
|
| |
Fix #33265
Fix #33370
This PR also fixes some bugs in `TestGitGeneral`.
|
|
|
|
|
|
| |
1. add `GetSiteCookieFlashMessage` to help to parse flash message
2. clarify `handleRepoHomeFeed` logic
3. remove unnecessary global variables, use `sync.OnceValue` instead
4. add some tests for `IsUsableUsername` and `IsUsableRepoName`
|
|
|
|
|
|
|
| |
Extract from #33320
This PR uses a map instead of a struct to store webhook event
information. It removes many duplicated functions and makes the logic
clearer.
|
|
|
|
|
|
|
| |
Fix #33314
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Add a OpenTelemetry-like shim-layer to collect traces
2. Add a simple builtin trace collector and exporter, end users could
download the diagnosis report to get the traces.
This PR's design is quite lightweight, no hard-dependency, and it is
easy to improve or remove. We can try it on gitea.com first to see
whether it works well, and fine tune the details.
---------
Co-authored-by: silverwind <me@silverwind.io>
|
| |
|
|
|
|
|
|
|
|
|
| |
When the parent Commit does not exist on gitea, an error will be
reported when opening the Commit details page: invalid memory address or
nil pointer dereference.


|
|
|
|
|
|
|
|
|
|
| |
Estimated time represented in hours it might be convenient to
have tracked time represented in the same way to be compared and
managed.
---------
Co-authored-by: Sysoev, Vladimir <i@vsysoev.ru>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
|
|
|
|
| |
1. the error check was added for go-git, it was caused by the empty `.keep` file in the test fixtures.
2. use `PostFormValue` instead of `PostForm.Get` (`Get` needs to parse the form ahead)
3. fix incorrect container text (it should show "Images" in the header but not "OS/Arch")
4. align maven xml
5. fix closed PR color&icon
|
|
|
| |
For #32973
|
|
|
| |
And fix some FIXMEs
|
|
|
|
|
|
|
| |
The `ctx.Repo.RefName` was used to be a "short name", it causes a lot of
ambiguity.
This PR does some refactoring and use `RefFullName` to replace the
legacy `RefName`, and simplify RepoAssignment
|
|
|
|
|
| |
Fix #33200
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
Change SlowCacheThreshold to 30 milliseconds so it doesn't trigger on
non memory cache
Closes: https://github.com/go-gitea/gitea/issues/33190
Closes: https://github.com/go-gitea/gitea/issues/32657
|
|
|
|
|
|
|
|
|
| |
Fixes #33145
An integration test could be added.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
| |
fixes: https://github.com/go-gitea/gitea/issues/33168
|
|
|
|
|
| |
Refactor checks to use assert/require
Use require.Eventually for waiting in elastic and meilisearch tests
Use require to exit early instead of assert
|
|
|
|
|
|
| |
A small refactor to improve HTMLFormat, to help to prevent low-level
mistakes.
And fix #33141, fix #33139
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds links to submodules in diffs, similar to the existing link
when viewing a repo at a specific commit. It does this by expanding diff
parsing to recognize changes to submodules, and find the specific refs
that are added, deleted or changed.
Related #25888
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks @Zettat123
Follow #33116
Fix #33051
on.pull_request.types doc:
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
on.pull_request.types added in this PR:
```
assigned, unassigned, review_requested, review_request_removed, milestoned, demilestoned, labeled, unlabeled
```
unsupported types in Gitea:
```
// Unsupported activity types:
// converted_to_draft, ready_for_review, locked, unlocked, auto_merge_enabled, auto_merge_disabled, enqueued, dequeued
```
TODO:
- [x] add test
|
|
|
|
|
|
|
|
|
| |
>=2.30.0 (#33129)
Fix #32889
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
close #33086
* Add a special value for "SSH_USER" setting: `(DOER_USERNAME)`
* Improve parseRepositoryURL and add tests (now it doesn't have hard
dependency on some setting values)
Many changes are just adding "ctx" and "doer" argument to functions.
By the way, improve app.example.ini, remove all `%(key)s` syntax, it
only makes messy and no user really cares about it.
Document: https://gitea.com/gitea/docs/pulls/138
|
| |
|
|
|
|
| |
1. remove `gock` dependency, it is not needed
2. fix a regression from org private profile readme
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In history, Gitea could use the system config `/etc/gitconfig` because
some users said that "they might put certNonceSeed in it"
Actually, we shouldn't not use it, because it also causes conflicts
(there are already some fixes like #28848)
To make the system clear, I think it's worth to introduce the breaking
change: add `GIT_CONFIG_NOSYSTEM=1` to all git commands.
## :warning: BREAKING :warning:
For most users, nothing need to do.
If you have made changes to `/etc/gitconfig` to affect Gitea's behavior,
you need to move these config options to Gitea's internal git config
file, it is usually in Gitea's `{AppDataPath}/home/.git` directory.
|
|
|
|
|
|
|
|
| |
Fix #33083
By the way (something I was working on):
1. relax color/background-color for more markup elements
2. fix a command line sentence error
|
|
|
| |
Close #31565
|
|
|
| |
And add more comments
|
|
|
|
|
|
|
|
| |
unset XDG_CONFIG_HOME early to enable gitea to manage git configuration.
simple error checking to satisfy the linting. Closes #33039
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
|
| |
DisableGitHooks and DisableImportLocal are only used when editing a
user, so only set them in `editUserCommon`
|
|
|
|
|
|
|
|
| |
Fix #10316
---------
Signed-off-by: Steffen Schröter <steffen@vexar.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
|
|
|
|
| |
1. `StatDir` was not right, fix the FIXME
2. Clarify the test cases for `IsUsableRepoName`
3. Fix regression bug in `repo-new.ts`
Fix #33060
|
|
|
| |
Close #33036
|
|
|
|
|
|
|
|
| |
Implemented #29503
---------
Co-authored-by: Ben Chang <ben_chang@htc.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Closes #25898
The problem was that the default settings weren't being loaded
---------
Signed-off-by: cassiozareck <cassiomilczareck@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
| |
To help binary size and testing performance
|
|
|
|
|
|
|
|
|
|
|
|
| |
latest commit cache (#32987)
The latest commit cache is currently used only for listing tree files.
However, a cold start may take longer than directly invoking the Git
command. This PR addresses the issue of slow response times when
accessing raw files, improving performance in such scenarios.
```log
gitea.log:105521:2024/12/23 08:22:18 ...eb/routing/logger.go:68:func1() [W] router: slow GET /xxxx/xxxxxx/raw/commit/xxxxxxxxxxxxxxxxxxxxxxxxxxx/.editorconfig for 172.18.0.5:53252, elapsed 3526.8ms @ repo/download.go:117(repo.SingleDownload)
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Close #32952
# ⚠️ Doc update is required


------
⚠️This PR refuses to be cherry-picked by any forked projects without any
mentions.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
| |
|
| |
|
|
|
| |
Fixes #31780
|
|
|
|
|
|
|
|
|
| |
This bug was found in a
[test](https://github.com/go-gitea/gitea/actions/runs/12464294025/job/34788152194?pr=32883#step:9:105)
of #32883
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
| |
Fix #30568
|
| |
|
|
|
|
|
|
|
|
|
| |
In history (from some legacy frameworks), both `:name` and `name` are
supported as path path name, `:name` is an alias to `name`.
To make code consistent, now we should only use `name` but not `:name`.
Also added panic check in related functions to make sure the name won't
be abused in case some downstreams still use them.
|
|
|
|
|
|
|
|
|
|
| |
Extract from #32786
`git diff a..b` is equal to `git diff a b` which is different from `git
diff a...b`. For pull request, we should always
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce RequestContext: is a short-lived context that is used to store
request-specific data.
RequestContext could be used to clean form tmp files, close context git
repo, and do some tracing in the future.
Then a lot of legacy code could be removed or improved. For example:
most `ctx.Repo.GitRepo.Close()` could be removed because the git repo
could be closed when the request is done.
|