| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This PR adds a `ListOptions` type which is not paged but uses absolute values. It is implemented as discussed in Discord.
Extracted from #16510 to clean that PR.
|
|
|
|
|
|
|
|
| |
When converting repositories from forks to normal the root NumFork needs to be
decremented too.
Fix #17026
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rollback functionality in
services/repository/repository.go:ForkRepository is incorrect and could
lead to a deadlock as it uses DeleteRepository to delete the rolled-back
repository - a function which creates its own transaction.
This PR adjusts the rollback function to only use RemoveAll as any
database changes will be automatically rolled-back. It also handles
panics and adjusts the Close within WithTx to ensure that if there is a
panic the session will always be closed.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
| |
Often when handling problems it is not clear which configuration file Gitea is
using. This PR simply ensures that the configuration file is emitted.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update to latest go-chi/session where the NewManager causes a new
Provider instantiation instead of reconfiguring an old one.
(https://gitea.com/go-chi/session/pulls/1)
The NewManager call is now concurrency safe and would allow live
reconfiguration in future but for now this PR simply fixes an
intermittent "data-race" detected in our tests. (See
https://drone.gitea.io/go-gitea/gitea/43900/2/14)
Related #17027
Related #1441
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
| |
|
|
|
| |
Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
|
|
|
|
|
|
|
|
| |
* Use common sessioner for API and Web
Instead of creating separate sessioner and doubly initialising the provider just
use the same sessioner for the API and Web routes.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
| |
Removed unused variable passed to mail.link_not_working_do_paste
Co-authored-by: 6543 <6543@obermui.de>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Fixes #16381
Note that changes to unprotected files via the web editor still cannot be pushed directly to the protected branch. I could easily add such support for edits and deletes if needed. But for adding, uploading or renaming unprotected files, it is not trivial.
* Extract & Move GetAffectedFiles to modules/git
|
| |
|
|
|
|
|
|
| |
If there is an error when performing the admin or restricted filter search
ensure that the filter and the userDN are reported.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
| |
* Make GetTags() api similar to GetBranches()
* Use it for Tag/Release page
|
|
|
|
|
|
|
|
| |
This PR adds a setting to OAuth and OpenID login sources to allow the source to
skip local 2FA authentication.
Fix #13939
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
| |
close #8028
|
|
|
| |
* Add "new issue" button on project
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the external context is cancelled it is possible for the
GitLogReader to not itself be Closed.
This PR does three things:
1. Instead of adding a plain defer it wraps the `g.Close` in a func as
`g` may change.
2. It adds the missing explicit g.Close - although the defer fix makes
this unnecessary.
3. It passes down the external context as the base context for the
GitLogReader meaning that the cancellation of the external context will
pass down automatically.
Fix #17007
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stats and diffs (#16773)
Replaces #16262
Replaces #16250
Replaces #14833
This PR first implements a `git check-attr` pipe reader - using `git check-attr --stdin -z --cached` - taking account of the change in the output format in git 1.8.5 and creates a helper function to read a tree into a temporary index file for that pipe reader.
It then wires this in to the language stats helper and into the git diff generation.
Files which are marked generated will be folded by default.
Fixes #14786
Fixes #12653
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc: Upgrade from an old Gitea
* update backup steps
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: delvh <dev.lh@web.de>
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: delvh <dev.lh@web.de>
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: delvh <dev.lh@web.de>
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: delvh <dev.lh@web.de>
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: delvh <dev.lh@web.de>
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: delvh <dev.lh@web.de>
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: delvh <dev.lh@web.de>
* update backup tips
* update table header
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: silverwind <me@silverwind.io>
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: silverwind <me@silverwind.io>
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: techknowlogick <matti@mdranta.net>
* Update docs/content/doc/upgrade/from-gitea.en-us.md
Co-authored-by: techknowlogick <matti@mdranta.net>
* Update from-gitea.en-us.md
* Update from-gitea.en-us.md
* Update from-gitea.en-us.md
* Update from-gitea.en-us.md
* Update from-gitea.en-us.md
* Update from-gitea.en-us.md
* Update from-gitea.en-us.md
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the svg minifier (`make svg`) rewrites all `id` and `class` attributes in svg files. Every file gets the ids `a, b, ...`. If multiple svgs with ids are used on a page these ids are conflicting and the results are broken images.
| minified ids | unique ids |
| - | - |
| ![grafik](https://user-images.githubusercontent.com/1666336/132579375-59d3996f-c4e5-43b8-8c8d-82280c90d9e3.png) | ![grafik](https://user-images.githubusercontent.com/1666336/132579413-05bf9285-4e3b-4d0d-8f95-90b212405b05.png) |
This PR adds a prefix (the filename) to every id/class.
Follow up problem: Because we embed svg images there are duplicated ids if one svg image is used multiple times on a page. As those ids refer to the same content it may be no real problem because browser handle that fine.
|
| |
|
| |
|
|
|
|
|
| |
fix a samll nit for agit `force-push` error response
Signed-off-by: a1012112796 <1012112796@qq.com>
|
|
|
| |
Fix #16986, #16152
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* translated the rest of index.de-de.md to german
* fixed typo in german locale activate_account email
* fixed typo in german doc/content/page/index.md
* Update docs/content/page/index.de-de.md
Co-authored-by: delvh <dev.lh@web.de>
* commited sugesstions
Co-authored-by: delvh <dev.lh@web.de>
* commited sugesstions
Co-authored-by: delvh <dev.lh@web.de>
* commited sugesstions
Co-authored-by: delvh <dev.lh@web.de>
* revert locale change
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
|
|
|
|
|
|
|
| |
organisation (#16988)
if AllowedUserVisibilityModes allow only public & limited, and orgs can be private, a user can create a repo to that organisation whitch will result in an update of the user. On this call the user is validaten and will be rejected since private is not allowed, but its not an user its an valid org ...
Co-authored-by: Alexey 〒erentyev <axifnx@gmail.com>
|
|
|
|
|
|
|
| |
When create a new issue or comment and paste/upload an attachment/image, it will not assign an issue id before submit. So if user give up the creating, the attachments will lost key feature and become dirty content. We don't know if we need to delete the attachment even if the repository deleted.
This PR add a repo_id in attachment table so that even if a new upload attachment with no issue_id or release_id but should have repo_id. When deleting a repository, they could also be deleted.
Co-authored-by: 6543 <6543@obermui.de>
|
|
|
|
|
| |
* Update TestOneDevDownloadRepo since OneDev api changed
* Use test functions for migrations
|
|
|
|
|
|
|
| |
CSS-only tooltips suffer various issues with positioning and there was
only one single instance of them in the templates. Replace that instance
with a regular popup and exclude these `data-tooltip` styles from the
Fomantic build.
|
|
|
|
|
|
|
|
|
|
|
| |
Rename`[repository]` `DISABLE_MIRRORS` to `[mirror]` `DISABLE_NEW_PULL` and add `ENABLED` and `DISABLE_NEW_PUSH` with the below meanings:
- `ENABLED`: **true**: Enables the mirror functionality. Set to **false** to disable all mirrors.
- `DISABLE_NEW_PULL`: **false**: Disable the creation of **new** mirrors. Pre-existing mirrors remain valid.
- `DISABLE_NEW_PUSH`: **false**: Disable the creation of **new** push mirrors. Pre-existing mirrors remain valid.
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: delvh <dev.lh@web.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add Cache-Control to avatar redirects
This does seem to do the trick to make the Avatar redirects cachable
in Chrome.
In Firefox, it does not seem to work, thought and I found no way to
suppress the requests to the original URLs, I even tried setting an
Etag to no avail.
Related discussion in https://github.com/go-gitea/gitea/issues/16964.
Co-authored-by: zeripath <art27@cantab.net>
|
|
|
|
|
|
|
| |
another TODO (#16963)
* Update TODO in migrations
* Resolve TODO: enable pagination on GiteaDownloader.GetComments()
|
|
|
|
|
|
|
| |
(#16971)
* Fix storage Iterate bug and Add storage doctor to delete garbage attachments
* Close object when used
|
|
|
| |
Signed-off-by: a1012112796 <1012112796@qq.com>
|
|
|
|
|
|
|
|
| |
The lastLeftIdx should be reset at the same time as creating a new section otherwise
it is possible for a second addition to end up attempting to read a nil entry.
Fix #16943
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
|
|
|
| |
PR #16125 did not update the error handlers to handle conflict errors relating
to rebases. This PR adds them.
Fix #16922
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
|
|
| |
The mail template rendering was failing with the error -
`...vices/mailer/mail.go:301:composeIssueCommentMessages() [E] ExecuteTemplate [issue/default/body]: template: issue/default:65:10: executing "issue/default" at <.i18n.Tr>: can't evaluate field i18n in type *models.Comment`
The issue was the template variable i18n is available in the outer scope.
Fix #16877
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
## [1.15.2](https://github.com/go-gitea/gitea/releases/tag/v1.15.2) - 2021-09-03
* BUGFIXES
* Add unique constraint back into issue_index (#16938)
* Close storage objects before cleaning (#16934) (#16942)
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to https://github.com/go-gitea/gitea/pull/16788 I can see why our docker container kept restarting when adding the custom mail template example.
[The example template](https://docs.gitea.io/en-us/mail-templates/#example) has an error
```
2021/09/03 10:55:25 cmd/web.go:91:func1() [F] PANIC: template: mail/issue/default:35: function "AppURL" not defined
/usr/local/go/src/html/template/template.go:374 (0x1563bb8)
/go/src/code.gitea.io/gitea/vendor/github.com/unrolled/render/render.go:322 (0x1563782)
/go/src/code.gitea.io/gitea/vendor/github.com/unrolled/render/render.go:202 (0x1562f8b)
/go/src/code.gitea.io/gitea/vendor/github.com/unrolled/render/render.go:146 (0x15629d2)
/go/src/code.gitea.io/gitea/modules/templates/base.go:88 (0x16b0769)
/go/src/code.gitea.io/gitea/routers/web/base.go:125 (0x225f284)
/go/src/code.gitea.io/gitea/routers/web/web.go:95 (0x2261284)
/go/src/code.gitea.io/gitea/routers/init.go:147 (0x22817ba)
/go/src/code.gitea.io/gitea/cmd/web.go:158 (0x239741a)
/go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:524 (0x1740884)
/go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/command.go:173 (0x17415f8)
/go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:277 (0x173e8c7)
/go/src/code.gitea.io/gitea/main.go:115 (0x23d3e69)
/usr/local/go/src/runtime/proc.go:225 (0x443995)
/usr/local/go/src/runtime/asm_amd64.s:1371 (0x47b360)
```
|
|
|
|
|
|
|
|
|
|
|
|
| |
Storage.Iterate provides the path and an open object. On windows using
local storage means that the objects will be locked thus preventing clean
from deleting them.
This PR simply closes the objects early.
Fix #16932
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
| |
queue type is also used for unique queues.
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* BUGFIXES
* Add missing gitRepo close at GetDiffRangeWithWhitespaceBehavior (Partial #16894) (#16896)
* Fix wiki raw commit diff/patch view (#16891) (#16893)
* Ensure wiki repos are all closed (#16886) (#16889)
* Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16849)
* Recreate Tables should Recreate indexes on MySQL (#16718) (#16740)
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
## [1.15.1](https://github.com/go-gitea/gitea/releases/tag/v1.15.1) - 2021-09-02
* BUGFIXES
* Allow BASIC authentication access to /:owner/:repo/releases/download/* (#16916) (#16923)
* Prevent leave changes dialogs due to autofill fields (#16912) (#16920)
* Ignore review comment when ref commit is missed (#16905) (#16919)
* Fix wrong attachment removal (#16915) (#16917)
* Gitlab Migrator: dont ignore reactions of last request (#16903) (#16913)
* Correctly return the number of Repositories for Organizations (#16807) (#16911)
* Test if LFS object is accessible (#16865) (#16904)
* Fix git.Blob.DataAsync(): close pipe since we return a NopCloser (#16899) (#16900)
* Fix dump and restore respository (#16698) (#16898)
* Repare and Improve GetDiffRangeWithWhitespaceBehavior (#16894) (#16895)
* Fix wiki raw commit diff/patch view (#16891) (#16892)
* Ensure wiki repos are all closed (#16886) (#16888)
* List limited and private orgs if authenticated on API (#16866) (#16879)
* Simplify split diff view generation and remove JS dependency (#16775) (#16863)
* Ensure that the default visibility is set on the user create page (#16845) (#16862)
* In Render tolerate not being passed a context (#16842) (#16858)
* Upgrade xorm to v1.2.2 (#16663) & Add test to ensure that dumping of login sources remains correct (#16847) (#16848)
* Report the correct number of pushes on the feeds (#16811) (#16822)
* Add primary_key to issue_index (#16813) (#16820)
* Prevent NPE on empty commit (#16812) (#16819)
* Fix branch pagination error (#16805) (#16816)
* Add missing return to handleSettingRemoteAddrError (#16794) (#16795)
* Remove spurious / from issues.opened_by (#16793)
* Ensure that template compilation panics are sent to the logs (#16788) (#16792)
* Update caddyserver/certmagic (#16789) (#16790)
Signed-off-by: Andrew Thornton <art27@cantab.net>
|
|
|
|
|
|
|
| |
Duplicate #15987 to allow access to releases download through BASIC authentication.
Fix #16914
Signed-off-by: Andrew Thornton <art27@cantab.net>
|