Commit Graph

11741 Commits

Author SHA1 Message Date
bc6f060b8c [skip ci] Updated translations via Crowdin 2021-07-08 00:24:51 +00:00
b06342f29c fix: not able to update local created non-urlencoded wiki pages ()
* fix: not able to update local created non-urlencoded wiki pages

* tidy code

* as per suggestion

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

* Don't replace space to dash for unescaped wiki filename

Co-authored-by: zeripath <art27@cantab.net>

* Remove incorrect comment

* Remove NameToUnescapedFilename()

Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-07-07 19:23:09 -04:00
061a8e7bb9 Alpine 3.14 released ()
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
2021-07-07 15:43:00 -04:00
7613f31c6b Update vendor 20210707 ()
* update gitea.com/go-chi/binding

* update github.com/blevesearch/bleve/v2

* update github.com/caddyserver/certmagic

* update github.com/go-git/go-git/v5

* update github.com/lafriks/xormstore

* update github.com/yuin/goldmark

* Revert "update gitea.com/go-chi/binding"

This reverts commit dea2f292b116114f9316fab95c5fd124174da404.
2021-07-07 15:41:05 -04:00
9543e068e9 Fix typo in customizing-gitea.en-us.md ()
Fixed a type in a URL in PlantUML code example in `customizing-gitea.en-us.md`.
2021-07-07 17:25:42 +02:00
4fa791c47b [skip ci] Updated translations via Crowdin 2021-07-07 00:14:50 +00:00
1b29747f0f Changelog for v1.14.4 () ()
* Changelog for v1.14.4 ()

* docs: bump version

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-06 23:41:07 +08:00
27c1578235 [skip ci] Updated translations via Crowdin 2021-07-06 00:14:50 +00:00
5bb97a12d7 Creating a repo from a template repo via API ()
* Creating a repo from a template repo via API

fix 
ref:
https://docs.github.com/en/rest/reference/repos#create-a-repository-using-a-template

Signed-off-by: a1012112796 <1012112796@qq.com>
2021-07-05 17:29:08 +02:00
64122fe105 Fix docs assets link () 2021-07-04 15:56:40 +02:00
760af187ba Upgrade xorm to v1.1.1 () 2021-07-04 15:10:46 +02:00
32fd11395b Fix relative links in postprocessed images ()
If a pre-post-processed file contains relative img tags these need to be updated
and joined correctly with the prefix. Finally, the node attributes need to be updated.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
2021-07-04 10:26:04 +01:00
fae07cbc8f Update Vendor ()
* Add Dependencie Update Script

* update gitea.com/lunny/levelqueue

* update github.com/PuerkitoBio/goquery

* update github.com/alecthomas/chroma

* update github.com/blevesearch/bleve/v2

* update github.com/caddyserver/certmagic

* update github.com/go-enry/go-enry/v2

* update github.com/go-redis/redis/v8

* update github.com/hashicorp/golang-lru

* update github.com/klauspost/compress

* update github.com/markbates/goth

* update github.com/mholt/archiver/v3

* update github.com/microcosm-cc/bluemonday

* update github.com/minio/minio-go/v7

* update github.com/olivere/elastic/v7

* update github.com/xanzy/go-gitlab

* update github.com/yuin/goldmark
2021-07-04 04:06:10 +02:00
65ae46bc20 [skip ci] Updated licenses and gitignores 2021-07-04 00:14:37 +00:00
2e40ff38d1 docs: Fix broken anchors in links to awesome-gitea () 2021-07-03 21:42:33 +01:00
f166f9b2e1 Fix U2F error reasons always hidden ()
This strict equality check in `u2fError` was causing the error
description to hide immediately after showing. `Object.keys`
always returns strings, but `errorType` argument is usually a
number type.

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
2021-07-03 09:19:38 +01:00
a9ba29b1cd [skip ci] Updated translations via Crowdin 2021-07-03 00:14:49 +00:00
62c278e4ab Fix modified files list in webhooks when there is a space ()
* Fix modified files list in webhooks when there is a space

There is an unfortunate bug with GetCommitFileStatus where files with
spaces are misparsed and split at the space.

There is a second bug because modern gits detect renames meaning that
this function no longer works correctly.

There is a third bug in that merge commits don't have their modified
files detected correctly.

Fix 


Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-07-02 21:23:37 +02:00
836884429a Add forge emojies ()
* codeberg :codeberg:
* gitlab :gitlab:
* git :git:
* github :github:
* gogs :gogs:
2021-07-02 16:04:57 +02:00
92328a3394 Add API to get commits of PR ()
* Add API to get commits of PR

fixes 

Co-authored-by: Andrew Bezold <andrew.bezold@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
2021-07-02 14:19:57 +02:00
a3476e5ad5 Wrap around for previous/next buttons ()
Fixes 

Wrap around from last to first comment when clicking "Next" on last comment.
Wrap around from first to last comment when clicking "Previous" on first comment.
2021-07-02 00:02:48 +02:00
290f458d46 Reserve user/repo pattern for rss feature () 2021-07-01 23:13:20 +08:00
fc1d9629c6 Clarify GPG binary check ()
fixes 

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-07-01 16:14:09 +02:00
dfa18a8b1c Introduce NotifySubjectType ()
* Introduce NotifySubjectType

* update swagger docs
2021-07-01 12:51:24 +02:00
ce286f9d9c Support custom mime type mapping for text files ()
* Support custom mime type mapping for text files

* Apply suggested change to routers/common/repo.go

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2021-06-30 17:31:54 -04:00
9979983283 Update Go-Git to take advantage of LargeObjectThreshold ()
Following the merging of https://github.com/go-git/go-git/pull/330 we
can now add a setting to avoid go-git reading and caching large objects.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-06-30 22:58:45 +02:00
4f26e0ac0e up current stable version in docs () 2021-06-30 16:27:09 -04:00
302e8b6d02 Prevent zombie processes ()
Unfortunately go doesn't always ensure that execd processes are completely
waited for. On linux this means that zombie processes can occur.

This PR ensures that these are waited for by using signal notifier in serv and
passing a context elsewhere.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-06-30 22:07:23 +02:00
365c4e9316 Add button to delete undeleted repositories from failed migrations ()
This PR adds a button to delete failed repositories if there has been a
failure during migration and for whatever reason the repository doesn't
get deleted automatically.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-06-30 21:14:53 +02:00
71c7d0a993 Fix default push instructions on empty repos ()
* Fix default push instructions on empty repos

Use script block like in `repo/clone_buttons.tmpl` to set default instructions
for pushing to empty repos.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-06-30 20:40:51 +02:00
7d70a6eff8 Fix webhook commits wrong hash on HEAD reset ()
Use `..` instead of `...` with `rev-list`. In combination with  the receiver can get the correct commit. The behaviour is now like Github.

fixes 
2021-06-30 19:49:06 +02:00
66bf74d1b9 Escape reference to user table in models.SearchEmails ()
Fix 

Signed-off-by: Adyanth H <adyanthh@gmail.com>
2021-06-30 18:37:20 +02:00
0966349354 Make the github migration less rate limit waiting to get comment per page from repository but not per issue ()
* Make the github migration less rate limit waiting to get comment per page from repository but not per issue

* Fix lint

* adjust Downloader interface

* Fix missed reviews

* Fix test

* Remove unused struct
2021-06-30 15:23:49 +08:00
e8c6cead0f Fix list_options GetStartEnd ()
end is start + pageSize and not start + page
2021-06-29 22:42:23 +01:00
dea7a5c5b9 just add some unit tests ()
* code.gitea.io/gitea/routers/utils coverage: 100.0%

* code.gitea.io/gitea/routers/install 0% -> 5.0%

* ConvertUtf8ToUtf8mb4: make sure DBType is mysql
2021-06-29 22:00:02 +01:00
add74fb368 Fix panic in recursive cache ()
There is a bug with last commit cache recursive cache where the last
commit information that refers to the current tree itself will cause a
panic due to its path ("") not being included in the expected tree entry
paths.

This PR fixes this by skipping the missing entry.

Fix 

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

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2021-06-29 16:12:43 -04:00
653704c102 Add Vultr and DO Marketplace links ()
* fix emoji img path

* move cloudron

* Add Vultr and DO
2021-06-29 15:42:47 -04:00
65548359cc Add custom emoji support () 2021-06-29 16:28:38 +02:00
aac663e0da Implemented head_commit for webhooks ()
* Removed Len field.

* Added head_commit webhook field.

* Added comment for returns.
2021-06-29 15:34:03 +02:00
579fcad8cd [skip ci] Updated translations via Crowdin 2021-06-29 00:29:44 +00:00
2f3d3ac20b Update fail2ban documentation ()
Following the merge of  we need to update the fail2ban
documentation to take account of the availability of the new
sshConnectionFailed failed authentication attempt log message.

Also add a deprecation notice regarding the previous publicKeyHandler
messages, as these may be a source of false positives.

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-06-28 19:26:40 -04:00
f424862cbb Fix previous/next button size () 2021-06-28 21:36:09 +02:00
f825f20d49 Upgrade Gliderlabs SSH to 0.3.3 and add FailedConnectionCallback ()
* Upgrade Gliderlabs SSH to 0.3.3 and add FailedConnectionCallback

Following the merging of https://github.com/gliderlabs/ssh/pull/143 we
can now report connections to the ssh server that have failed before
public key exchange has completed using the standard fail2ban message.

This PR updates Gliderlabs SSH and adds a callback that will provide this
logging.

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

* move the callback to its own function to make the logging appear little nicer

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-06-28 13:05:27 -04:00
5c80ecc2f7 Counterwork seemingly unclickable repo button labels ()
As title, the change counter-works the effect from  that links seem unclickable (especially in the default gitea theme), while maintaining some sort of visual harmony.

Co-authored-by: Andrew Thornton <art27@cantab.net>
2021-06-28 09:21:43 +01:00
6ca667d3f2 [skip ci] Updated translations via Crowdin 2021-06-28 00:29:35 +00:00
9c6aeb47f7 Link to previous blames in file blame page ()
Adds a link to each blame hunk, to view the blame of an earlier version of the file, similar to GitHub. Also refactors the blame render from fmtstring based to template based.

* Fix blame bottom line and add blame prior button

* Jump to previous parent commit from the commit.

* Fix previous commit link

* Fix previous blame link

* Fix the given file not exist in the previous commit.

* Fix blameRow struct not export

* fix theming issues, rename template var

* remove unused LastCommit fetch

* fix location of blame-hunk divider

* rewrite previous commit checks

* remove duplicate commit lookup

its already resolved and stored in ctx.Repo.Commit!

* split out blamePart processing into function

Co-authored-by: rogerluo410 <rogerluo410@gmail.com>
2021-06-28 01:13:20 +02:00
59c58553ba Fix API to return author for author on commits() 2021-06-27 23:15:42 +01:00
9a0cd3af3b Handle misencoding of login_source cfg in mssql ()
* Handle misencoding of login_source cfg in mssql

Unfortunately due a bug in xorm (see https://gitea.com/xorm/xorm/pulls/1957) updating
loginsources on MSSQL causes them to become corrupted. ()

Whilst waiting for the referenced PR to be merged and to handle the corrupted
loginsources correctly we need to add a wrapper to the `FromDB()` methods to look
for and ignore the misplaced BOMs that have been added.

Fix 

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

* Update models/login_source.go
2021-06-27 16:21:16 -04:00
fe66b612b5 Add previous/next buttons to review comments ()
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
2021-06-27 20:57:01 +01:00
9b1b4b5433 Refactor Webhook + Add X-Hub-Signature ()
This PR removes multiple unneeded fields from the `HookTask` struct and adds the two headers `X-Hub-Signature` and `X-Hub-Signature-256`.

## ⚠️ BREAKING ⚠️ 

* The `Secret` field is no longer passed as part of the payload.
* "Breaking" change (or fix?): The webhook history shows the real called url and not the url registered in the webhook (`deliver.go`@129).

Close 
Fixes 
Fixes 

Co-authored-by: zeripath <art27@cantab.net>
2021-06-27 20:21:09 +01:00