10026 Commits (5fd9f72104aab3136133ec5b058bd67cb39cf314)
 

Author SHA1 Message Date
zeripath 5fd9f72104
When reading expired sessions - expire them (#12686)
* When reading expired sessions - expire them

Update to latest macaron/session following merge of
https://gitea.com/macaron/session/pulls/11

Also remove old memory provider as 11 updates the memory provider to
make it unnecessary.

Signed-off-by: Andrew Thornton <art27@cantab.net>

* and macaron/session/pulls/12

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
GiteaBot ed81a95a84 [skip ci] Updated translations via Crowdin 4 years ago
zeripath dead2a9b2d
Escape failed highlighted code (#12685)
Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
Daniel Aleksandersen 72eeb13e4d
Set avatar image dimensions (#12654)
Set the avatar image dimensions to help browsers
avoid layout reflows. Helps page load performance and
user experience (less content jank).

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
zeripath 714ab71ddc
Ensure that all migration requests are cancellable (#12669)
* Ensure that all migration requests are cancellable

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Use WithContext as RequestWithContext is go 1.14

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
6543 84eac6ed6c
Add make targed generate-license & generate-gitignore + Update (#12682)
* Add make targed generate-license & generate-gitignore

* Update Gitignores & Licenses

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
GiteaBot 3ecd030cd5 [skip ci] Updated translations via Crowdin 4 years ago
赵智超 3981f1b127
Remove duplicate logic in initListSubmits (#12660)
* Remove duplicate logic in initListSubmits

Using the same logic to handle Choosing reviewers and assignees as
choosing label. It's the first step of #10926.

Signed-off-by: a1012112796 <1012112796@qq.com>

* fix choose block

* fix nit

* try fix bug

* simple code

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
GiteaBot ea775e67fb [skip ci] Updated translations via Crowdin 4 years ago
Martin a0c4c1ce0d
Fixes cli error for Asciidoctor (#12677)
The original fix for #8676 introduced illegal arguments for Asciidoctor, causing no rendering at all. This PR fixes the command line arguments so that Asciidoctor properly renders the text. See https://asciidoctor.org/docs/user-manual/#piping-content-through-the-cli as reference.
4 years ago
6543 3270e7a443
[Vendor] update go-swagger v0.21.0 -> v0.25.0 (#12670)
* Update go-swagger

* vendor
4 years ago
GiteaBot 66843f2237 [skip ci] Updated translations via Crowdin 4 years ago
zeripath 82b71881d8
Ensure repoNames are lowercased in serv (#12668)
#12624 missed lowering the provided repoPath.

(Additionally make a few fixes to the way the debug flag works.)

Fix #12659
Fix #12667

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
GiteaBot 807a41ca9a [skip ci] Updated translations via Crowdin 4 years ago
zeripath 58f57b3b6c
Escape provider name in oauth2 provider redirect (#12648)
Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
Lunny Xiao 9bc69ff26e
Support elastic search for code search (#10273)
* Support elastic search for code search

* Finished elastic search implementation and add some tests

* Enable test on drone and added docs

* Add new fields to elastic search

* Fix bug

* remove unused changes

* Use indexer alias to keep the gitea indexer version

* Improve codes

* Some code improvements

* The real indexer name changed to xxx.v1

Co-authored-by: zeripath <art27@cantab.net>
4 years ago
zeripath d257485bc0
Rename models.ProtectedBranchRepoID to models.EnvRepoID and ensure EnvPusherEmail is set (#12646)
Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
zeripath 17fbbe97d7
Do not disable commit changes button on repost (#12644)
If the user has pressed commit changes and the post has failed - do not disable
the commit changes button.

Fix #12072

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
zeripath 9abc16a280
fix documentation for REFRESH_TOKEN_EXPIRATION_TIME (#12642)
REFRESH_TOKEN_EXPIRATION_TIME refers to the refresh token not the access token

Fix #12641

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
silverwind 7187fdbb1c
Update eslint config (#12609)
- Remove unneeded "Tribute" global
- Separate Node and Browser environments
- Update environment to es2020 to enable new globals like "BigInt"
4 years ago
Mike L afd89b1767
Dark theme for line numbers in blame view (#12632) 4 years ago
Mike L e1eee2d00a
Avoid unnecessary system-ui expansion (#12522)
* Avoid unnecessary system-ui expansion (fix #12325)

* extract config to static object

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
zeripath 7ba6fea0b7
Use shellquote to unpack arguments to gitea serv (#12624)
Fix #12471

Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
GiteaBot 274f9233ab [skip ci] Updated translations via Crowdin 4 years ago
Mike L 1fe909757c
Apply #12576 to top right reaction picker (#12623)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
GiteaBot 3bf1c4fad0 [skip ci] Updated translations via Crowdin 4 years ago
zeripath 1d47a25759
Fix confusing last_org_owner locale string (#12628)
Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
6543 d5b6931dbe
[API] Delete Token accept names too (#12366)
* Delete Token accept names too

* better description

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
zeripath eb1bf2377b
Set context for running CreateArchive in to that of the request (#12555)
Set the context for CreateArchive to that of the request to ensure that archives
are only built for as long as a request is requesting them

Fix #11551

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
zeripath d3b5edacb6
Escape more things that are passed through str2html (#12622)
* Escape more things that are passed through str2html

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Bloody editors!

Co-authored-by: mrsdizzie <info@mrsdizzie.com>

* Update routers/user/oauth.go

Co-authored-by: mrsdizzie <info@mrsdizzie.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
GiteaBot cbc60f5c70 [skip ci] Updated translations via Crowdin 4 years ago
techknowlogick c5d5d63c9c
Macaron 1.5 (#12596)
* update macaron to v1.5 of fork

* update macaron to v1.5 of fork

* test gzip PR

* add push method impl to context_tests

* use proper gzip commit

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago
John Olheiser 211321fb93
Git migration UX (#12619)
* Initial work

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Implementation

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix gitlab and token cloning

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Imports and JS

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Fix test

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Linting

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Generate swagger

Signed-off-by: jolheiser <john.olheiser@gmail.com>

* Move mirror toggle and rename options

Signed-off-by: jolheiser <john.olheiser@gmail.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
4 years ago
GiteaBot ed2f6e137b [skip ci] Updated translations via Crowdin 4 years ago
silverwind f8601f3f09
Fix ellipsis in files table (#12617)
Turns out text ellispsis does not work in combination with flexbox and
while wrapping in a display:block can help in some cases, I could not
get this to work properly so this changes the truncate to inline-block
again and reduces the clickable area to just vertical expansion from the
links.
4 years ago
silverwind e25d4867be
Extract Swagger CSS to its own file (#12616) 4 years ago
赵智超 65444c5ea3
Add link to home page on swagger ui (#12601)
* Add link to home page on swagger ui

Signed-off-by: a1012112796 <1012112796@qq.com>

* translate

* Apply review suggestion

* Move to right, Thanks @silverwind

* tweaks

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
silverwind 7d14d6c1c1
Fix file table overflows (#12603)
- Fix overflow regression from https://github.com/go-gitea/gitea/pull/12553.
- Fix submodule columns stretching the table
- Refactor template to share more HTML nodes
- Introduce CSS helper classes

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
zeripath 69b3dd6362
Escape Email in forgot_password.tmpl (#12610)
Signed-off-by: Andrew Thornton <art27@cantab.net>
4 years ago
John Olheiser b611ae1908
Mark Cache with ini tag (#12605)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years ago
silverwind eb4db0445b
Reindent Less to 2-space (#12602)
Reindent and unify codebase to 2-space indentation.
4 years ago
techknowlogick e90e122b39
update to latest golangci-lint (v1.30.0) (#12597) 4 years ago
zeripath f3fb3c6f56
Open transaction when adding Avatar email-hash pairs to the DB (#12577)
When adding Avatar email-hash pairs we simply want the DB table to
represent a Set. We don't care if the hash-pair is already present,
so we just simply Insert and ignore the error.

Unfortunately this seems to cause some DBs to log the duplicate
insert to their logs - looking like a bug a in Gitea.

Now, there is no standard way in SQL to say Insert but if there's
an error ignore it. MySQL has INSERT IGNORE, PostgreSQL >= 9.5 has
INSERT ... ON CONFLICT DO NOTHING, but I do not believe that SQLite
or MSSQL have variants.

This PR places the insert in a transaction which we are happy to fail
if there is an error - hopefully this will stop the unnecessary
logging.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
techknowlogick 019e577d54
Update JWT docs in example config (#12591)
* Update JWT docs in example config

align with way we have `LFS_JWT_SECRET` in config

Fix #12590

* Update custom/conf/app.example.ini

Co-authored-by: John Olheiser <john.olheiser@gmail.com>

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
4 years ago
techknowlogick 125ffb87f0
go1.15 on windows (#12589)
* go1.15 on windows

* update xgo to use node14
4 years ago
6543 4b97f9018b
OpenGraph: use repo avatar if exist (#12586) 4 years ago
GiteaBot 63f3c42be9 [skip ci] Updated translations via Crowdin 4 years ago
zeripath 2ae8c7ab1c
Add cron running API (#12421)
* Add cron running API

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Apply suggestions from code review

* placate-swagger

Signed-off-by: Andrew Thornton <art27@cantab.net>

* return not found

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Apply suggestions from code review

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
silverwind ee047312a1
Fix emoji replacements, make emoji images consistent (#12567)
- Fix emoji not being replaced in issue title change text
- Make the image attributes consistent, add alt, remove align

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
silverwind 26bf4c51fb
Change tab width go,tmpl,html to 2 (#12572)
Make it easier to edit deeply nested code. I plan to convert Less to
2-space so that we have standardized indentation width in the codebase.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago