]>
source.dussan.org Git - gitea.git/log
zeripath [Thu, 8 Jul 2021 13:57:24 +0000 (14:57 +0100)]
Redirect on bad CSRF instead of presenting bad page (#14937)
The current CSRF handler is a bit harsh with bad CSRF tokens on webpages
I think we can be a little kinder and redirect to base page with a flash error
Signed-off-by: Andrew Thornton <art27@cantab.net>
luzpaz [Thu, 8 Jul 2021 12:55:09 +0000 (08:55 -0400)]
Fix source typos (#16374)
* Fix source typos
Follow up to
e0296b6a6
Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby`
* rm "ignore destory on `make misspell-check`"
Co-authored-by: 6543 <6543@obermui.de>
luzpaz [Thu, 8 Jul 2021 11:38:13 +0000 (07:38 -0400)]
Fix various documentation, user-facing, and source comment typos (#16367)
* Fix various doc, user-facing, and source comment typos
Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby`
GiteaBot [Thu, 8 Jul 2021 00:24:51 +0000 (00:24 +0000)]
[skip ci] Updated translations via Crowdin
Gary Wang [Wed, 7 Jul 2021 23:23:09 +0000 (07:23 +0800)]
fix: not able to update local created non-urlencoded wiki pages (#16139)
* 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>
techknowlogick [Wed, 7 Jul 2021 19:43:00 +0000 (15:43 -0400)]
Alpine 3.14 released (#16170)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
techknowlogick [Wed, 7 Jul 2021 19:41:05 +0000 (15:41 -0400)]
Update vendor
20210707 (#16366)
* 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 .
冯天书 [Wed, 7 Jul 2021 15:25:42 +0000 (23:25 +0800)]
Fix typo in customizing-gitea.en-us.md (#16362)
Fixed a type in a URL in PlantUML code example in `customizing-gitea.en-us.md`.
GiteaBot [Wed, 7 Jul 2021 00:14:50 +0000 (00:14 +0000)]
[skip ci] Updated translations via Crowdin
6543 [Tue, 6 Jul 2021 15:41:07 +0000 (17:41 +0200)]
Changelog for v1.14.4 (#16348) (#16351)
* Changelog for v1.14.4 (#16348)
* docs: bump version
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
GiteaBot [Tue, 6 Jul 2021 00:14:50 +0000 (00:14 +0000)]
[skip ci] Updated translations via Crowdin
a1012112796 [Mon, 5 Jul 2021 15:29:08 +0000 (23:29 +0800)]
Creating a repo from a template repo via API (#15958)
* Creating a repo from a template repo via API
fix #15934
ref:
https://docs.github.com/en/rest/reference/repos#create-a-repository-using-a-template
Signed-off-by: a1012112796 <1012112796@qq.com>
Lunny Xiao [Sun, 4 Jul 2021 13:56:40 +0000 (21:56 +0800)]
Fix docs assets link (#16337)
Lunny Xiao [Sun, 4 Jul 2021 13:10:46 +0000 (21:10 +0800)]
Upgrade xorm to v1.1.1 (#16339)
zeripath [Sun, 4 Jul 2021 09:26:04 +0000 (10:26 +0100)]
Fix relative links in postprocessed images (#16334)
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 #16308
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
6543 [Sun, 4 Jul 2021 02:06:10 +0000 (04:06 +0200)]
Update Vendor (#16325)
* 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
GiteaBot [Sun, 4 Jul 2021 00:14:37 +0000 (00:14 +0000)]
[skip ci] Updated licenses and gitignores
Val Lorentz [Sat, 3 Jul 2021 20:42:33 +0000 (22:42 +0200)]
docs: Fix broken anchors in links to awesome-gitea (#16331)
Stephen Holdaway [Sat, 3 Jul 2021 08:19:38 +0000 (20:19 +1200)]
Fix U2F error reasons always hidden (#16327)
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>
GiteaBot [Sat, 3 Jul 2021 00:14:49 +0000 (00:14 +0000)]
[skip ci] Updated translations via Crowdin
zeripath [Fri, 2 Jul 2021 19:23:37 +0000 (20:23 +0100)]
Fix modified files list in webhooks when there is a space (#16288)
* 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 #15865
Signed-off-by: Andrew Thornton <art27@cantab.net>
6543 [Fri, 2 Jul 2021 14:04:57 +0000 (16:04 +0200)]
Add forge emojies (#16296)
* codeberg :codeberg:
* gitlab :gitlab:
* git :git:
* github :github:
* gogs :gogs:
sebastian-sauer [Fri, 2 Jul 2021 12:19:57 +0000 (14:19 +0200)]
Add API to get commits of PR (#16300)
* Add API to get commits of PR
fixes #10918
Co-authored-by: Andrew Bezold <andrew.bezold@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Jimmy Praet [Thu, 1 Jul 2021 22:02:48 +0000 (00:02 +0200)]
Wrap around for previous/next buttons (#16319)
Fixes #16317
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.
6543 [Thu, 1 Jul 2021 15:13:20 +0000 (17:13 +0200)]
Reserve user/repo pattern for rss feature (#16323)
Norwin [Thu, 1 Jul 2021 14:14:09 +0000 (14:14 +0000)]
Clarify GPG binary check (#14832)
fixes #14817
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 [Thu, 1 Jul 2021 10:51:24 +0000 (12:51 +0200)]
Introduce NotifySubjectType (#16320)
* Introduce NotifySubjectType
* update swagger docs
Jimmy Praet [Wed, 30 Jun 2021 21:31:54 +0000 (23:31 +0200)]
Support custom mime type mapping for text files (#16304)
* 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>
zeripath [Wed, 30 Jun 2021 20:58:45 +0000 (21:58 +0100)]
Update Go-Git to take advantage of LargeObjectThreshold (#16316)
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>
techknowlogick [Wed, 30 Jun 2021 20:27:09 +0000 (16:27 -0400)]
up current stable version in docs (#16318)
zeripath [Wed, 30 Jun 2021 20:07:23 +0000 (21:07 +0100)]
Prevent zombie processes (#16314)
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>
zeripath [Wed, 30 Jun 2021 19:14:53 +0000 (20:14 +0100)]
Add button to delete undeleted repositories from failed migrations (#16197)
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 #16154
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath [Wed, 30 Jun 2021 18:40:51 +0000 (19:40 +0100)]
Fix default push instructions on empty repos (#16302)
* 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 #16295
Signed-off-by: Andrew Thornton <art27@cantab.net>
KN4CK3R [Wed, 30 Jun 2021 17:49:06 +0000 (19:49 +0200)]
Fix webhook commits wrong hash on HEAD reset (#16283)
Use `..` instead of `...` with `rev-list`. In combination with #16282 the receiver can get the correct commit. The behaviour is now like Github.
fixes #11802
Adyanth H [Wed, 30 Jun 2021 16:37:20 +0000 (22:07 +0530)]
Escape reference to `user` table in models.SearchEmails (#16313)
Fix #16312
Signed-off-by: Adyanth H <adyanthh@gmail.com>
Lunny Xiao [Wed, 30 Jun 2021 07:23:49 +0000 (15:23 +0800)]
Make the github migration less rate limit waiting to get comment per page from repository but not per issue (#16070)
* 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
sebastian-sauer [Tue, 29 Jun 2021 21:42:23 +0000 (23:42 +0200)]
Fix list_options GetStartEnd (#16303)
end is start + pageSize and not start + page
6543 [Tue, 29 Jun 2021 21:00:02 +0000 (23:00 +0200)]
just add some unit tests (#16291)
* code.gitea.io/gitea/routers/utils coverage: 100.0%
* code.gitea.io/gitea/routers/install 0% -> 5.0%
* ConvertUtf8ToUtf8mb4: make sure DBType is mysql
zeripath [Tue, 29 Jun 2021 20:12:43 +0000 (21:12 +0100)]
Fix panic in recursive cache (#16298)
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 #16290
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 [Tue, 29 Jun 2021 19:42:47 +0000 (21:42 +0200)]
Add Vultr and DO Marketplace links (#16297)
* fix emoji img path
* move cloudron
* Add Vultr and DO
6543 [Tue, 29 Jun 2021 14:28:38 +0000 (16:28 +0200)]
Add custom emoji support (#16004)
KN4CK3R [Tue, 29 Jun 2021 13:34:03 +0000 (15:34 +0200)]
Implemented head_commit for webhooks (#16282)
* Removed Len field.
* Added head_commit webhook field.
* Added comment for returns.
GiteaBot [Tue, 29 Jun 2021 00:29:44 +0000 (00:29 +0000)]
[skip ci] Updated translations via Crowdin
zeripath [Mon, 28 Jun 2021 23:26:40 +0000 (00:26 +0100)]
Update fail2ban documentation (#16286)
Following the merge of #16278 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>
Jimmy Praet [Mon, 28 Jun 2021 19:36:09 +0000 (21:36 +0200)]
Fix previous/next button size (#16284)
zeripath [Mon, 28 Jun 2021 17:05:27 +0000 (18:05 +0100)]
Upgrade Gliderlabs SSH to 0.3.3 and add FailedConnectionCallback (#16278)
* 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>
Mike L [Mon, 28 Jun 2021 08:21:43 +0000 (10:21 +0200)]
Counterwork seemingly unclickable repo button labels (#15064)
As title, the change counter-works the effect from #14926 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>
GiteaBot [Mon, 28 Jun 2021 00:29:35 +0000 (00:29 +0000)]
[skip ci] Updated translations via Crowdin
Norwin [Sun, 27 Jun 2021 23:13:20 +0000 (01:13 +0200)]
Link to previous blames in file blame page (#16259)
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>
6543 [Sun, 27 Jun 2021 22:15:42 +0000 (00:15 +0200)]
Fix API to return author for author on commits(#16276)
zeripath [Sun, 27 Jun 2021 20:21:16 +0000 (21:21 +0100)]
Handle misencoding of login_source cfg in mssql (#16268)
* 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. (#16252)
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 #16252
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update models/login_source.go
Jimmy Praet [Sun, 27 Jun 2021 19:57:01 +0000 (21:57 +0200)]
Add previous/next buttons to review comments (#16273)
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: zeripath <art27@cantab.net>
KN4CK3R [Sun, 27 Jun 2021 19:21:09 +0000 (21:21 +0200)]
Refactor Webhook + Add X-Hub-Signature (#16176)
This PR removes multiple unneeded fields from the `HookTask` struct and adds the two headers `X-Hub-Signature` and `X-Hub-Signature-256`.
## :warning: BREAKING :warning:
* 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 #16115
Fixes #7788
Fixes #11755
Co-authored-by: zeripath <art27@cantab.net>
6543 [Sun, 27 Jun 2021 18:47:35 +0000 (20:47 +0200)]
Make allowed Visiblity modes configurable for Users (#16271)
Now that #16069 is merged, some sites may wish to enforce that users are all public, limited or private, and/or disallow users from becoming private.
This PR adds functionality and settings to constrain a user's ability to change their visibility.
Co-authored-by: zeripath <art27@cantab.net>
Jimmy Praet [Sun, 27 Jun 2021 17:35:31 +0000 (19:35 +0200)]
Add jpraet to MAINTAINERS (#16274)
Norwin [Sun, 27 Jun 2021 15:21:19 +0000 (17:21 +0200)]
review comments: break-word for long file names (#16272)
* review comments: break-word for long file names
fixes #16248
Co-authored-by: zeripath <art27@cantab.net>
Jimmy Praet [Sun, 27 Jun 2021 14:36:49 +0000 (16:36 +0200)]
Add scroll-margin-top to account for sticky header (#16269)
Fixes #16263
Co-authored-by: zeripath <art27@cantab.net>
Steven [Sun, 27 Jun 2021 10:07:36 +0000 (12:07 +0200)]
Make app.ini more restrictive on new installations (#16266)
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
zeripath [Sun, 27 Jun 2021 00:56:58 +0000 (01:56 +0100)]
Add --quiet and --verbose to gitea web to control initial logging (#16260)
One of the repeatedly reported issues has been that gitea produces too much console
logging during set up even if the console logger is turned off.
Fundamentally this is due to some otherwise very helpful logging that has to occur
before logging is set up. This has come to a head with the merging of #16243 where
otherwise potentially helpful Trace logging in the git module now appears on the
console.
This PR proposes three things:
1. Change the initial default logger to Info not Trace.
2. Change the logging for the AppPath things to Info in recompense.
3. Add two new command line options to gitea web: --quiet and --verbose
`gitea web -q` or `gitea web --quiet` will only log Fatal level initially.
`gitea web -verbose` will log at Trace.
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
GiteaBot [Sun, 27 Jun 2021 00:29:32 +0000 (00:29 +0000)]
[skip ci] Updated licenses and gitignores
Sergey Dryabzhinsky [Sat, 26 Jun 2021 19:53:14 +0000 (22:53 +0300)]
Add Visible modes function from Organisation to Users too (#16069)
You can limit or hide organisations. This pull make it also posible for users
- new strings to translte
- add checkbox to user profile form
- add checkbox to admin user.edit form
- filter explore page user search
- filter api admin and public user searches
- allow admins view "hidden" users
- add app option DEFAULT_USER_VISIBILITY
- rewrite many files to use Visibility field
- check for teams intersection
- fix context output
- right fake 404 if not visible
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Andrew Thornton <art27@cantab.net>
zeripath [Sat, 26 Jun 2021 12:47:56 +0000 (13:47 +0100)]
Limit stdout tracelog to actual stdout (#16258)
Related #16243
Signed-off-by: Andrew Thornton <art27@cantab.net>
Lunny Xiao [Sat, 26 Jun 2021 11:28:55 +0000 (19:28 +0800)]
Let package git depend on setting but not opposite (#15241)
* Let package git depend on setting but not opposite
* private some package variables
KN4CK3R [Sat, 26 Jun 2021 09:13:51 +0000 (11:13 +0200)]
Fixed issues not updated by commits (#16254)
`UpdateIssuesCommit` may get called with fewer commits because of `FeedMaxCommitNum` and therefore may miss some commands.
John Olheiser [Sat, 26 Jun 2021 04:16:36 +0000 (23:16 -0500)]
Add better errors for disabled account recovery (#15117)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
zeripath [Fri, 25 Jun 2021 23:11:33 +0000 (00:11 +0100)]
Improve efficiency in FindRenderizableReferenceNumeric and getReferences (#16251)
* Fuzzer finds an NPE due to incorrect URLPrefix
The Fuzzer is running on a non-repo urlprefix which is incorrect for RenderRaw
* Make FindRenderizableReferenceNumeric and getReferences more efficient
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
ayb [Fri, 25 Jun 2021 22:38:27 +0000 (00:38 +0200)]
Added support for gopher URLs. (#14749)
* Added support for gopher URLs.
* Add setting and make this user settable instead
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
zeripath [Fri, 25 Jun 2021 18:14:49 +0000 (19:14 +0100)]
Fuzzer finds an NPE due to incorrect URLPrefix (#16249)
The Fuzzer is running on a non-repo urlprefix which is incorrect for RenderRaw
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Jimmy Praet [Fri, 25 Jun 2021 17:01:43 +0000 (19:01 +0200)]
Append to existing trailers in generated squash commit message (#15980)
* Remove superfluous newline before Co-authored-by trailers
* Append to existing PR description trailer section
If the existing PR description message already contains a trailer section (e.g. Signed-off-by: ),
append to it instead of creating a new trailer section.
* Reuse compiled regexp
* Simplify regex and deal with trailing \n in PR description
* Add tests for CommitMessageTrailersPattern
- add support for Key:Value (no space after colon)
- add support for whitespace "folding"
* Update services/pull/pull_test.go
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Norwin <noerw@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Steven [Fri, 25 Jun 2021 17:00:09 +0000 (19:00 +0200)]
Prevent webhook action buttons from shifting (#16087)
On long webhook urls the action buttons (edit, delete) have been shifted
by the url text.
Signed-off-by: Steven Kriegler <61625851+justusbunsi@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
siddweiker [Fri, 25 Jun 2021 16:59:25 +0000 (12:59 -0400)]
Fix heatmap activity (#15252)
* Group heatmap actions by 15 minute intervals
Signed-off-by: Sidd Weiker <siddweiker@gmail.com>
* Add multi-contribution test for user heatmap
Signed-off-by: Sidd Weiker <siddweiker@gmail.com>
* Add timezone aware summation for activity heatmap
Signed-off-by: Sidd Weiker <siddweiker@gmail.com>
* Fix api user heatmap test
Signed-off-by: Sidd Weiker <siddweiker@gmail.com>
* Update variable declaration style
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 [Fri, 25 Jun 2021 16:54:08 +0000 (18:54 +0200)]
Use gitea logging module for git module (#16243)
remove log() func from gogs times and switch to proper logging
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
KN4CK3R [Fri, 25 Jun 2021 14:28:55 +0000 (16:28 +0200)]
Add tag protection (#15629)
* Added tag protection in hook.
* Prevent UI tag creation if protected.
* Added settings page.
* Added tests.
* Added suggestions.
* Moved tests.
* Use individual errors.
* Removed unneeded methods.
* Switched delete selector.
* Changed method names.
* No reason to be unique.
* Allow editing of protected tags.
* Removed unique key from migration.
* Added docs page.
* Changed date.
* Respond with 404 to not found tags.
* Replaced glob with regex pattern.
* Added support for glob and regex pattern.
* Updated documentation.
* Changed white* to allow*.
* Fixed edit button link.
* Added cancel button.
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Martin Strob [Fri, 25 Jun 2021 12:38:41 +0000 (14:38 +0200)]
fix IIS reverse proxy doc (#16246)
GiteaBot [Fri, 25 Jun 2021 00:11:36 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
sebastian-sauer [Thu, 24 Jun 2021 22:05:51 +0000 (00:05 +0200)]
API: Allow COMMENT reviews to not specify a body (#16229)
* Allow COMMENT reviews to not specify a body
when using web ui there is no need to specify a body.
so we don't need to specify a body if adding a COMMENT-review
via our api.
* Ensure comments or Body is provided
and add some integration tests for reviewtype COMMENT.
Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
Mura Li [Thu, 24 Jun 2021 18:37:07 +0000 (02:37 +0800)]
Replace ARCCache with TwoQueueCache to avoid patent issue (#16240)
Co-authored-by: Mura Li <typeless@users.noreply.github.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
KN4CK3R [Thu, 24 Jun 2021 15:47:46 +0000 (17:47 +0200)]
Fix diff expansion is missing final line in a file (#16222)
* Fixed down offset.
* Fixed wrong line count result.
GiteaBot [Thu, 24 Jun 2021 00:11:37 +0000 (00:11 +0000)]
[skip ci] Updated translations via Crowdin
zeripath [Wed, 23 Jun 2021 23:02:23 +0000 (00:02 +0100)]
Do not show No match found for tribute (#16231)
Tribute.js will show an untranslated no match found if no emoji or mentions.
Further the mentions should really require a preceding space.
This PR fixes both of these.
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath [Wed, 23 Jun 2021 21:41:39 +0000 (22:41 +0100)]
Don't WARN log UserNotExist errors on ExternalUserLogin failure (#16238)
Instead log these at debug - with warn logging for other errors.
Fix #16235
Signed-off-by: Andrew Thornton <art27@cantab.net>
Lunny Xiao [Wed, 23 Jun 2021 21:12:38 +0000 (05:12 +0800)]
Rework repository archive (#14723)
* Use storage to store archive files
* Fix backend lint
* Add archiver table on database
* Finish archive download
* Fix test
* Add database migrations
* Add status for archiver
* Fix lint
* Add queue
* Add doctor to check and delete old archives
* Improve archive queue
* Fix tests
* improve archive storage
* Delete repo archives
* Add missing fixture
* fix fixture
* Fix fixture
* Fix test
* Fix archiver cleaning
* Fix bug
* Add docs for repository archive storage
* remove repo-archive configuration
* Fix test
* Fix test
* Fix lint
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
KN4CK3R [Wed, 23 Jun 2021 21:09:51 +0000 (23:09 +0200)]
Add sanitizer rules per renderer (#16110)
* Added sanitizer rules per renderer.
* Updated documentation.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 [Wed, 23 Jun 2021 21:08:47 +0000 (23:08 +0200)]
[API] Add repoGetTag (#16166)
* GetTag -> GetAnnotatedTag
* API: Add repoGetTag
* fix swagger docs
* support "/" as tag name char
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Viktor Yakovchuk [Wed, 23 Jun 2021 21:08:26 +0000 (00:08 +0300)]
Fix 500 Error with branch and tag sharing the same name #15592 (#16040)
* Fix 500 Error with branch and tag sharing the same name #15592
Fixed 500 error while create Pull request when there are more
than one sources (branch, tag) with the same name
Fix #15592
Signed-off-by: Viktor Yakovchuk <viktor@yakovchuk.net>
* fix logging
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: 6543 <6543@obermui.de>
Lunny Xiao [Wed, 23 Jun 2021 20:45:47 +0000 (04:45 +0800)]
Add code block highlight to orgmode back (#14222)
Fix missed orgmode code block hightlight
Co-authored-by: zeripath <art27@cantab.net>
6543 [Wed, 23 Jun 2021 19:58:44 +0000 (21:58 +0200)]
[API] GET / SET User Settings (#16169)
* API: GET/SET User Settings
* linter
* Apply suggestions from code review
* Update modules/structs/user.go
* lint
* fix swagger
* move User2UserSettings to convert
* as per @zeripath "preferences" -> "settings"
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
techknowlogick [Wed, 23 Jun 2021 19:57:56 +0000 (15:57 -0400)]
Add docs for windows env vars (#16236)
* Add docs for windows env vars
Fix #16213
* Fix docs/content/doc/developers/hacking-on-gitea.en-us.md
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
KN4CK3R [Wed, 23 Jun 2021 19:38:19 +0000 (21:38 +0200)]
Small refactoring of modules/private (#15947)
* Use correct variable name.
* doer is never nil here.
* Use status code constants.
* Replaced generic map with concrete struct.
* Fixed windows lint.
* Removed unused method.
* Changed error codes.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
6543 [Wed, 23 Jun 2021 17:43:33 +0000 (19:43 +0200)]
Fix Nits (#16234)
* template fix
* nits
* add doer to "created issue/pull"
KN4CK3R [Wed, 23 Jun 2021 14:56:25 +0000 (16:56 +0200)]
Use data path instead of config path (#16227)
6543 [Wed, 23 Jun 2021 12:33:21 +0000 (14:33 +0200)]
Localize Email Templates (#16200)
close #14822
techknowlogick [Wed, 23 Jun 2021 05:36:27 +0000 (01:36 -0400)]
Run compliance on amd64 infra (#16232)
* Run compliance on amd64 infra
* Update .drone.yml
Jimmy Praet [Wed, 23 Jun 2021 04:14:22 +0000 (06:14 +0200)]
Improve notifications for WIP draft PR's (#14663)
* #14559 Reduce amount of email notifications for WIP draft PR's
don't notify repo watchers of WIP draft PR's
* #13190 Notification when WIP Pull Request is ready for review
* Send email notification to repo watchers when WIP PR is created
* Send ui notification to repo watchers when WIP PR is created
* send specific email notification when PR is marked ready for review
instead of reusing the CreatePullRequest action
* Fix lint error
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
sebastian-sauer [Tue, 22 Jun 2021 20:13:31 +0000 (22:13 +0200)]
Use pulls url if issue is a pull request (#16230)
if a pull request is displayed use the /pulls path
if a pull requests diff is displayed use the /pulls/{id}/files url
if an issue is displayed use the issues url
Fixes #16102
Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
zeripath [Mon, 21 Jun 2021 22:12:22 +0000 (23:12 +0100)]
Use html.Parse rather than html.ParseFragment (#16223)
* Use html.Parse rather than html.ParseFragment
There have been a few issues with html.ParseFragment - just use html.Parse instead.
* Skip document node
Signed-off-by: Andrew Thornton <art27@cantab.net>
KN4CK3R [Mon, 21 Jun 2021 18:34:58 +0000 (20:34 +0200)]
Update milestone counters on new issue. (#16183)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
zeripath [Mon, 21 Jun 2021 18:34:37 +0000 (19:34 +0100)]
Update documentation for Implicit TLS (#16220)
As per RFC 8314, it is now recommended to prefer TLS over STARTTLS.
Fix #16160
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath [Mon, 21 Jun 2021 13:01:44 +0000 (14:01 +0100)]
reqOrgMembership calls need to be preceded by reqToken (#16198)
ReqOrgMembership calls need to be preceded by reqToken
Fix #16192
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
KN4CK3R [Mon, 21 Jun 2021 02:12:19 +0000 (04:12 +0200)]
Add tests for all webhooks (#16214)
* Added tests for MS Teams.
* Added tests for Dingtalk.
* Added tests for Telegram.
* Added tests for Feishu.
* Added tests for Discord.
* Added tests for closed issue and pullrequest comment.
* Added tests for Matrix.
* Trim all spaces.
* Added tests for Slack.
* Added JSONPayload tests.
* Added general tests.
* Replaced duplicated code.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>