gitea/models/issues
Lunny Xiao 32b97b3ce8
Uniform all temporary directories and allow customizing temp path (#32352)
This PR uniform all temporary directory usage so that it will be easier
to manage.

Relate to #31792 

- [x] Added a new setting to allow users to configure the global
temporary directory.
- [x] Move all temporary files and directories to be placed under
os.Temp()/gitea.
- [x] `setting.Repository.Local.LocalCopyPath` now will be
`setting.TempPath/local-repo` and the customized path is removed.
```diff
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;[repository.local]
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Path for local repository copy. Defaults to  TEMP_PATH + `local-repo`, this is deprecated and cannot be changed
-;LOCAL_COPY_PATH = local-repo
```

- [x] `setting.Repository.Upload.TempPath` now will be
`settting.TempPath/uploads` and the customized path is removed.
```diff
;[repository.upload]
-;;
-;; Path for uploads. Defaults to TEMP_PATH + `uploads`
-;TEMP_PATH = uploads
```

- [x] `setting.Packages.ChunkedUploadPath` now will be
`settting.TempPath/package-upload` and the customized path is removed.
```diff
;[packages]
-;;
-;; Path for chunked uploads. Defaults it's `package-upload` under `TEMP_PATH` unless it's an absolute path.
-;CHUNKED_UPLOAD_PATH = package-upload
```

- [x] `setting.SSH.KeyTestPath` now will be
`settting.TempPath/ssh_key_test` and the customized path is removed.
```diff
[server]
-;;
-;; Directory to create temporary files in when testing public keys using ssh-keygen,
-;; default is the system temporary directory.
-;SSH_KEY_TEST_PATH =
```

TODO:
- [ ] setting.PprofDataPath haven't been changed because it may need to
be kept until somebody read it but temp path may be clean up any time.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-04-08 16:15:28 +00:00
..
assignees_test.go
assignees.go
comment_code.go Performance optimization for pull request files loading comments attachments (#33585) 2025-02-14 06:49:58 +00:00
comment_list.go Some small refactors (#33144) 2025-01-10 06:00:06 +00:00
comment_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
comment.go Move commits signature and verify functions to service layers (#33605) 2025-02-16 12:24:07 +00:00
content_history_test.go
content_history.go
dependency_test.go Use CloseIssue and ReopenIssue instead of ChangeStatus (#32467) 2024-12-25 07:38:30 +00:00
dependency.go
issue_index.go
issue_label_test.go
issue_label.go
issue_list_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
issue_list.go Move issue pin to an standalone table for querying performance (#33452) 2025-02-17 11:28:37 -08:00
issue_lock.go
issue_pin.go Move issue pin to an standalone table for querying performance (#33452) 2025-02-17 11:28:37 -08:00
issue_project.go Fix project issues list and counting (#33594) 2025-02-17 05:14:56 +00:00
issue_search.go Allow filtering issues by any assignee (#33343) 2025-03-21 04:25:36 +00:00
issue_stats.go chore: fix some trivial problems and TODOs (#33473) 2025-02-02 18:16:56 +00:00
issue_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
issue_update.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
issue_user_test.go Refactor tests (#33021) 2024-12-29 01:05:56 +00:00
issue_user.go
issue_watch_test.go
issue_watch.go
issue_xref_test.go Use CloseIssue and ReopenIssue instead of ChangeStatus (#32467) 2024-12-25 07:38:30 +00:00
issue_xref.go
issue.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
label_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
label.go Small refactor to reduce unnecessary database queries and remove duplicated functions (#33779) 2025-03-04 18:25:20 +00:00
main_test.go
milestone_list.go
milestone_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
milestone.go
pull_list_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
pull_list.go Use pullrequestlist instead of []*pullrequest (#33765) 2025-03-02 10:14:49 -08:00
pull_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
pull.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
reaction.go Refactor user package (#33423) 2025-01-29 01:14:35 +02:00
review_list.go Filter reviews of one pull request in memory instead of database to reduce slow response because of lacking database index (#33106) 2025-01-07 10:50:09 +08:00
review_test.go Filter reviews of one pull request in memory instead of database to reduce slow response because of lacking database index (#33106) 2025-01-07 10:50:09 +08:00
review.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
stopwatch_test.go
stopwatch.go Make tracked time representation display as hours (#33315) 2025-01-19 09:30:44 +08:00
tracked_time_test.go
tracked_time.go