]> source.dussan.org Git - gitea.git/log
gitea.git
4 years agofixed bug in GitTreeBySHA where pulling items from a page other than page 1 would...
Brad Albright [Sun, 22 Dec 2019 00:16:21 +0000 (18:16 -0600)]
fixed bug in GitTreeBySHA where pulling items from a page other than page 1 would fail because the wrong var was used to set the entries to return (#9459)

4 years agoIssue with Migration rule v111 (#9449)
Marge Bouvier [Sat, 21 Dec 2019 10:12:39 +0000 (11:12 +0100)]
Issue with Migration rule v111 (#9449)

* Issue with Migration rule v111

I was facing some issues with migration rule v111

* Update v111.go

Fix pgsql test cases

Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 years agoFix wrong notification on merge (#9450)
guillep2k [Fri, 20 Dec 2019 22:31:05 +0000 (19:31 -0300)]
Fix wrong notification on merge (#9450)

4 years agoApache configuration for Let's Encrypt webroot validation (#9438)
NZTim [Fri, 20 Dec 2019 17:58:26 +0000 (06:58 +1300)]
Apache configuration for Let's Encrypt webroot validation (#9438)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 20 Dec 2019 17:10:13 +0000 (17:10 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoSwagger info corrections (#9441)
6543 [Fri, 20 Dec 2019 17:07:12 +0000 (18:07 +0100)]
Swagger info corrections (#9441)

* use numbers and not http.Status___ enum

* fix test

* add many missing swagger responses

* code format

* Deletion Sould return 204 ...

* error handling improvements

* if special error type ... then add it to swagger too

* one smal nit

* invalidTopicsError is []string

* valid swagger specification 2.0
 - if you add responses swagger can tell you if you do it right :+1:

* use ctx.InternalServerError

* Revert "use numbers and not http.Status___ enum"

This reverts commit b1ff386e2418ed6a7f183e756b13277d701278ef.

* use http.Status* enum everywhere

4 years agoResponse for context on retry database connection (#9444)
Lunny Xiao [Fri, 20 Dec 2019 05:39:33 +0000 (13:39 +0800)]
Response for context on retry database connection (#9444)

4 years agochore: update license list (#9436)
Antoine GIRARD [Fri, 20 Dec 2019 00:17:25 +0000 (01:17 +0100)]
chore: update license list (#9436)

go run scripts/generate-licenses.go

Co-authored-by: zeripath <art27@cantab.net>
4 years agochore: update gitignore list (#9437)
Antoine GIRARD [Thu, 19 Dec 2019 23:04:12 +0000 (00:04 +0100)]
chore: update gitignore list (#9437)

Updated the gitignore list with the command : `go run scripts/generate-gitignores.go`

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 19 Dec 2019 21:50:14 +0000 (21:50 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix NewCommitStatus (#9434)
John Olheiser [Thu, 19 Dec 2019 21:46:53 +0000 (15:46 -0600)]
Fix NewCommitStatus (#9434)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoAdd migration to sanitize repository original_url (#9423)
mrsdizzie [Thu, 19 Dec 2019 09:49:48 +0000 (04:49 -0500)]
Add migration to sanitize repository original_url (#9423)

* Add migration to sanitize repository original_url

During a large code move in #6200 the OriginalURL field was
accidentially changed to be populated with the CloneAddr field which
will contain the username and/or password provided during a migration.

This behavior was fixed in previous PR #9097 and this migration will
remove any authentication details that were stored in the database
between those two.

* use net/url to rebuild URL instead of strings.Replace

* Update models/migrations/migrations.go

* changes per lunny

* make fmt

4 years agoFix background reactions in the arc-green theme (#9421)
Alexey 〒erentyev [Thu, 19 Dec 2019 03:35:03 +0000 (06:35 +0300)]
Fix background reactions in the arc-green theme (#9421)

* Fixed arc-green theme reactions background

Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
* Added MD5 AppVer

Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
4 years agochore: update github.com/couchbase/gomemcached and github.com/couchbase/go-couchbase...
Antoine GIRARD [Thu, 19 Dec 2019 02:03:26 +0000 (03:03 +0100)]
chore: update github.com/couchbase/gomemcached and github.com/couchbase/go-couchbase (#9419)

4 years agoAdd .ignore file for search tools (#9417)
silverwind [Wed, 18 Dec 2019 23:34:23 +0000 (00:34 +0100)]
Add .ignore file for search tools (#9417)

* Add .ignore file for search tools

Tools like `rg` [1] and `ag` [2] support a `.ignore` file which defines
files that are ignored during a recursive search. This adds the file
which makes recursive file searches in the code base ignore files that
are generally not desirable to search in like bindata, vendored files
and compiled frontend assets.

[1] https://github.com/BurntSushi/ripgrep/
[2] https://github.com/ggreer/the_silver_searcher

* add leading slash

* remove files already in .gitignore

4 years agoUse OriginalURL insead of CloneAddr in migration logging (#9418)
mrsdizzie [Wed, 18 Dec 2019 21:49:56 +0000 (16:49 -0500)]
Use OriginalURL insead of CloneAddr in migration logging (#9418)

CloneAddr will contain username and password credentials and they will
get stored in system notices about failed migrations (and logs if trace
is set). Replace with OriginalURL that doesn't have those.

4 years agoChange PR commits and diffs to use base repo rather than forked (#3648)
Keith Rutkowski [Wed, 18 Dec 2019 18:37:44 +0000 (13:37 -0500)]
Change PR commits and diffs to use base repo rather than forked (#3648)

Change the repository referenced when displaying commits or diffs in
pull request to the base repository.  The forked repository may not be
readable by users who can read the base repository.  See discussion for
(#3356).

4 years agoAddress minor portability issues (#9414)
dankm [Wed, 18 Dec 2019 17:47:11 +0000 (11:47 -0600)]
Address minor portability issues (#9414)

* Add os specific sed for FreeBSD.

* Replace hardcoded "make" with $(MAKE)

Some systems don't use GNU make by default, and use something like
gnumake or gmake. Respect that when determining the make version.

4 years agoAdd warning to docs in order to avoid template mismatches (#9411)
pseudocoder [Wed, 18 Dec 2019 15:48:33 +0000 (17:48 +0200)]
Add warning to docs in order to avoid template mismatches (#9411)

* DOCS: add mention of swagger api reference

It's(swagger api link) mentioned vaguely in the FAQ but IMHO missing from API usage page.

* Add warning to avoid template mismatches

Related to https://github.com/go-gitea/gitea/issues/9320

4 years ago[Vendor Update] go-swagger v0.20.1 -> v0.21.0 (#9410)
6543 [Wed, 18 Dec 2019 15:05:30 +0000 (16:05 +0100)]
[Vendor Update] go-swagger v0.20.1 -> v0.21.0 (#9410)

* Update go-swagger v0.20.1 -> v0.21.0

* go mod tidy

4 years agoHide not allowed Reactions (#9387)
6543 [Wed, 18 Dec 2019 13:07:36 +0000 (14:07 +0100)]
Hide not allowed Reactions (#9387)

* Hide not allowed Reactions

* filter in query :D

* use `

Co-Authored-By: Alexey 〒erentyev <axifnx@gmail.com>
* update xorm v0.8.0 -> v0.8.1

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 18 Dec 2019 12:33:32 +0000 (12:33 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRemove unsued struct (#9405)
Lauris BH [Wed, 18 Dec 2019 12:10:40 +0000 (14:10 +0200)]
Remove unsued struct (#9405)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 18 Dec 2019 10:02:07 +0000 (10:02 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix Slack webhook payload title generation to work with Mattermost (#9378)
Cornel [Wed, 18 Dec 2019 10:01:00 +0000 (18:01 +0800)]
Fix Slack webhook payload title generation to work with Mattermost (#9378)

* Fix Slack webhook payload title generation to work with Mattermost by using a markdown link instead of html

* Fix Slack webhook attachment title and title link handling

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 18 Dec 2019 04:02:12 +0000 (04:02 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoFix some SimpleMDE (#9400)
John Olheiser [Wed, 18 Dec 2019 03:59:59 +0000 (21:59 -0600)]
Fix some SimpleMDE (#9400)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoswitch to fomantic-ui (#9374)
techknowlogick [Tue, 17 Dec 2019 21:34:11 +0000 (16:34 -0500)]
switch to fomantic-ui (#9374)

4 years agoAdd description to labels on create issue (#9392)
zeripath [Tue, 17 Dec 2019 20:02:17 +0000 (20:02 +0000)]
Add description to labels on create issue (#9392)

4 years agoFixed errors logging in dump.go (#9218)
Rychu [Tue, 17 Dec 2019 16:12:10 +0000 (17:12 +0100)]
Fixed errors logging in dump.go (#9218)

* Fixed errors logging in dump.go

* Replaced overlooked log.Fatal() with fatal()

* Run make fmt on dump.go

* Added missing new line to the fatal log

* Run make fmt on dump.go

4 years ago登陆 to 登录 (#9382)
ZHOU Cheng [Tue, 17 Dec 2019 13:06:54 +0000 (21:06 +0800)]
登陆 to 登录 (#9382)

4 years agoFixed show repositories filter (#9234) (#9379)
Alexey 〒erentyev [Tue, 17 Dec 2019 11:03:36 +0000 (14:03 +0300)]
Fixed show repositories filter (#9234) (#9379)

Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
4 years agofix wrong migration (#9381)
Lunny Xiao [Tue, 17 Dec 2019 06:58:30 +0000 (14:58 +0800)]
fix wrong migration (#9381)

4 years agoSleep longer if request speed is over github limitation (#9335)
Lunny Xiao [Tue, 17 Dec 2019 04:16:54 +0000 (12:16 +0800)]
Sleep longer if request speed is over github limitation (#9335)

* Sleep longer if request speed is over github limitation

* improve code

* remove unused code

* fix lint

* Use github's rate limit remain value to determine how long to sleep

* Save reset time when finished github api request

* fix bug

* fix lint

* Add context.Context for sleep

* fix test

* improve code

* fix bug and lint

* fix import order

4 years agoAuthorizedKeysCommand should not query db directly (#9371)
zeripath [Tue, 17 Dec 2019 01:49:07 +0000 (01:49 +0000)]
AuthorizedKeysCommand should not query db directly (#9371)

* AuthorizedKeysCommand should not query db directly

* Update routers/private/internal.go

* Fix import order

4 years agoRemove text from action-only webhooks (#9377)
John Olheiser [Tue, 17 Dec 2019 00:28:19 +0000 (18:28 -0600)]
Remove text from action-only webhooks (#9377)

* Remove text from contextual webhooks

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Missed one in Telegram

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoFix double webhook for new PR (#9375)
John Olheiser [Mon, 16 Dec 2019 20:27:18 +0000 (14:27 -0600)]
Fix double webhook for new PR (#9375)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoAdd SimpleMDE to compare page for PRs (#9376)
John Olheiser [Mon, 16 Dec 2019 19:57:30 +0000 (13:57 -0600)]
Add SimpleMDE to compare page for PRs (#9376)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 16 Dec 2019 15:57:59 +0000 (15:57 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoAdd SimpleMDE and Fix Image Paste for Issue/Comment Editor (#9197)
Benno [Mon, 16 Dec 2019 15:56:35 +0000 (23:56 +0800)]
Add SimpleMDE and Fix Image Paste for Issue/Comment Editor (#9197)

* update #9132 and #8834 - add SimpleMDE for issue and fix image paste for comment editor

* attache tribute to simplemde

* update #9197 force simplemde file input event when backspace press

4 years agoChange target branch for pull request (#6488)
Mario Lubenka [Mon, 16 Dec 2019 06:20:25 +0000 (07:20 +0100)]
Change target branch for pull request (#6488)

* Adds functionality to change target branch of created pull requests

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Use const instead of var in JavaScript additions

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Check if branches are equal and if PR already exists before changing target branch

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Make sure to check all commits

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Print error messages for user as error flash message

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Disallow changing target branch of closed or merged pull requests

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Resolve conflicts after merge of upstream/master

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Change order of branch select fields

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Removes duplicate check

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Use ctx.Tr for translations

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Recompile JS

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Use correct translation namespace

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Remove redundant if condition

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Moves most change branch logic into pull service

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Completes comment

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Add Ref to ChangesPayload for logging changed target branches
instead of creating a new struct

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Revert changes to go.mod

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Directly use createComment method

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Return 404 if pull request is not found. Move written check up

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Remove variable declaration

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Return client errors on change pull request target errors

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Return error in commit.HasPreviousCommit

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Adds blank line

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Test patch before persisting new target branch

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Update patch before testing (not working)

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Removes patch calls when changeing pull request target

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Removes unneeded check for base name

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Moves ChangeTargetBranch completely to pull service. Update patch status.

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Set webhook mode after errors were validated

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Update PR in one transaction

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Move logic for check if head is equal with branch to pull model

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Adds missing comment and simplify return

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Adjust CreateComment method call

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
4 years agoUse ioutil.TmpDir for new created temp directory (#9368)
Lunny Xiao [Mon, 16 Dec 2019 05:17:55 +0000 (13:17 +0800)]
Use ioutil.TmpDir for new created temp directory (#9368)

* Use os.TmpDir for new created temp directory

* fix error message

4 years agoremove unused method and rename createcommentWithNoAction (#9367)
Lunny Xiao [Mon, 16 Dec 2019 03:54:24 +0000 (11:54 +0800)]
remove unused method and rename createcommentWithNoAction (#9367)

4 years agoRefactor comment (#9330)
Lunny Xiao [Sun, 15 Dec 2019 21:57:34 +0000 (05:57 +0800)]
Refactor comment (#9330)

* Refactor comment

* fix test

* improve code

4 years agoFix cache problem on dashboard (#9358)
Lunny Xiao [Sun, 15 Dec 2019 20:44:23 +0000 (04:44 +0800)]
Fix cache problem on dashboard (#9358)

4 years agoCombine Drone release steps (#9338)
silverwind [Sun, 15 Dec 2019 18:06:36 +0000 (19:06 +0100)]
Combine Drone release steps (#9338)

* Combine Drone release steps

Fixes missing JS/CSS because drone did unwanted parallelization of the
js/css task and the generate task. Combined the tasks into one and made
'make release' work standalone.

Fixes: https://github.com/go-gitea/gitea/issues/9324
Fixes: https://github.com/go-gitea/gitea/issues/9362
* move js/css to generate dependencies

* remove unneccessary go-all target

* remove go target as well

4 years agoFix the intermittent TestGPGGit failures (#9360)
zeripath [Sun, 15 Dec 2019 16:21:16 +0000 (16:21 +0000)]
Fix the intermittent TestGPGGit failures (#9360)

* Fix the intermittent TestGPGGit failures

Reattempt to open the listener if the port is busy with a delay up to a second
Switch from generating a private key each time, just use a known good key

4 years agoAdd /milestones endpoint (#8733)
Brad Albright [Sun, 15 Dec 2019 14:20:08 +0000 (08:20 -0600)]
Add /milestones endpoint (#8733)

Create a /milestones endpoint which basically serves as a dashboard view for milestones, very similar to the /issues or /pulls page.

Closes #8232

4 years agoFix missed change to GetManager() (#9361)
zeripath [Sun, 15 Dec 2019 13:15:17 +0000 (13:15 +0000)]
Fix missed change to GetManager() (#9361)

4 years agoSign protected branches (#8993)
zeripath [Sun, 15 Dec 2019 11:06:31 +0000 (11:06 +0000)]
Sign protected branches (#8993)

* Move SignMerge to PullRequest

* Add approved signing mode

* As per @guillep2k comment

4 years agoGraceful: Xorm, RepoIndexer, Cron and Others (#9282)
zeripath [Sun, 15 Dec 2019 09:51:28 +0000 (09:51 +0000)]
Graceful: Xorm, RepoIndexer, Cron and Others  (#9282)

* Change graceful to use a singleton obtained through GetManager instead of a global.
* Graceful: Make TestPullRequests shutdownable
* Graceful: Make the cron tasks graceful
* Graceful: AddTestPullRequest run in graceful ctx
* Graceful: SyncMirrors shutdown
* Graceful: SetDefaultContext for Xorm to be HammerContext
* Avoid starting graceful for migrate commands and checkout
* Graceful: DeliverHooks now can be shutdown
* Fix multiple syncing errors in modules/sync/UniqueQueue &  Make UniqueQueue closable
* Begin the process of making the repo indexer shutdown gracefully

4 years agotest: command keys (#9357)
Antoine GIRARD [Sun, 15 Dec 2019 08:11:31 +0000 (09:11 +0100)]
test: command keys (#9357)

4 years agoMove PushToBaseRepo from models to services/pull (#9352)
Lunny Xiao [Sun, 15 Dec 2019 03:28:51 +0000 (11:28 +0800)]
Move PushToBaseRepo from models to services/pull (#9352)

4 years agoPush to create repo (#8419)
John Olheiser [Sun, 15 Dec 2019 02:49:52 +0000 (20:49 -0600)]
Push to create repo (#8419)

* Refactor

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add push-create to SSH serv

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Cannot push for another user unless admin

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Get owner in case admin pushes for another user

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Set new repo ID in result

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update to service and use new org perms

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move pushCreateRepo to services

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix import order

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Changes for @guillep2k

* Check owner (not user) in SSH
* Add basic tests for created repos (private, not empty)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 14 Dec 2019 17:32:24 +0000 (17:32 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoMove some repository methods from models to modules/repository (#9353)
Lunny Xiao [Sat, 14 Dec 2019 17:30:01 +0000 (01:30 +0800)]
Move some repository methods from models to modules/repository (#9353)

* Move some repository methods from models to modules/repository

* fix test

4 years agoDefaultBranch needs to be prefixed by BranchPrefix (#9356)
zeripath [Sat, 14 Dec 2019 13:29:41 +0000 (13:29 +0000)]
DefaultBranch needs to be prefixed by BranchPrefix (#9356)

4 years agosite admin could view org's members (#9346)
Lunny Xiao [Sat, 14 Dec 2019 06:36:59 +0000 (14:36 +0800)]
site admin could view org's members (#9346)

4 years agoDefault NO_REPLY_ADDRESS to DOMAIN (#9325)
zeripath [Sat, 14 Dec 2019 04:14:43 +0000 (04:14 +0000)]
Default NO_REPLY_ADDRESS to DOMAIN (#9325)

* Default NO_REPLY_ADDRESS to DOMAIN

The default NO_REPLY_ADDRESS was previously noreply.example.org
This PR changes this to default to the default DOMAIN for gitea.

* Change default to noreply.%(DOMAIN)s

* Change default to "noreply" + Domain

4 years agoRemove release attachments which repository has been deleted (#9334)
Lunny Xiao [Sat, 14 Dec 2019 03:30:39 +0000 (11:30 +0800)]
Remove release attachments which repository has been deleted (#9334)

4 years agoFix PR/issue redirects when having external tracker (#9339)
David Svantesson [Sat, 14 Dec 2019 00:53:32 +0000 (01:53 +0100)]
Fix PR/issue redirects when having external tracker (#9339)

* Make sure only issues are redirected to external tracker

* Ensure correct redirects for pulls after dependency or watch.

* NewIssuePost is always issues so no need to redirect with type.

4 years agodeps: update and fix chardet import (#9351)
Antoine GIRARD [Sat, 14 Dec 2019 00:15:48 +0000 (01:15 +0100)]
deps: update and fix chardet import (#9351)

4 years agoRemove SavePatch and generate patches on the fly (#9302)
zeripath [Fri, 13 Dec 2019 22:21:06 +0000 (22:21 +0000)]
Remove SavePatch and generate patches on the fly (#9302)

* Save patches to temporary files

* Remove SavePatch and generate patches on the fly

* Use ioutil.TempDir

* fixup! Use ioutil.TempDir

* fixup! fixup! Use ioutil.TempDir

* RemoveAll LocalCopyPath() in initIntergrationTest

* Default to status checking on PR creation

* Remove unnecessary set to StatusChecking

* Protect against unable to load repo

* Handle conflicts

* Restore original conflict setting

* In TestPullRequests update status to StatusChecking before running TestPatch

4 years agoUpdate _headers (#9349)
John Olheiser [Fri, 13 Dec 2019 20:03:09 +0000 (14:03 -0600)]
Update _headers (#9349)

4 years agoFix protected branch using IssueID (#9348)
John Olheiser [Fri, 13 Dec 2019 15:37:10 +0000 (09:37 -0600)]
Fix protected branch using IssueID (#9348)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoFix nondeterministic behavior (#9341)
Mura Li [Fri, 13 Dec 2019 09:03:38 +0000 (17:03 +0800)]
Fix nondeterministic behavior (#9341)

The underlying implementation of os.exec uses channels and goroutines.
It is possible to have time-variant error values returned from Cmd.Wait
depending on which comes first.

Also, the git subcommand and options should be separated tokens.

Fixes a flaky test in modules/git/command_test.go

4 years agoSupports both CMD and PowerShell (#9344)
Matthew Bramer [Fri, 13 Dec 2019 05:13:38 +0000 (00:13 -0500)]
Supports both CMD and PowerShell (#9344)

sc is aliased to Set-Content in PowerShell and these commands will not work without the `.exe` extension.

4 years agoYoutrack now supports Gitea (#9343)
techknowlogick [Fri, 13 Dec 2019 04:28:54 +0000 (23:28 -0500)]
Youtrack now supports Gitea (#9343)

* Youtrack now supports Gitea

* Update third-party-tools.en-us.md

4 years agoFix notification page panic (#9337)
jaqra [Fri, 13 Dec 2019 02:08:34 +0000 (05:08 +0300)]
Fix notification page panic (#9337)

4 years agofix issue indexer not triggered when migrating a repository (#9332)
Lunny Xiao [Thu, 12 Dec 2019 21:46:43 +0000 (05:46 +0800)]
fix issue indexer not triggered when migrating a repository (#9332)

4 years agoMake repository management section handle lfs locks (#8726)
zeripath [Thu, 12 Dec 2019 13:18:07 +0000 (13:18 +0000)]
Make repository management section handle lfs locks (#8726)

* Make repository maangement section handle lfs locks

* Add check attribute handling and handle locking paths better

* More cleanly check-attributes

* handle error

* Check if file exists in default branch before linking to it.

* fixup

* Properly cleanPath

* Use cleanPath

* Sigh

4 years agoFix bug that release attachment files not deleted when deleting repository (#9322)
Lunny Xiao [Thu, 12 Dec 2019 05:31:05 +0000 (13:31 +0800)]
Fix bug that release attachment files not deleted when deleting repository (#9322)

* Fix bug that release attachment files not deleted when deleting repository

* improve code

* add quote

* improve code

4 years ago[API] extend StopWatch (#9196)
6543 [Thu, 12 Dec 2019 04:23:05 +0000 (05:23 +0100)]
[API] extend StopWatch (#9196)

* squash api-stopwatch

* fix prepair logic! + add Tests

* fix lint

* more robust time compare

* delete responce 202 -> 204

* change http responce in test too

4 years agoAdd SyncTags to uploader interface (#9326)
John Olheiser [Thu, 12 Dec 2019 00:20:11 +0000 (18:20 -0600)]
Add SyncTags to uploader interface (#9326)

* Add sync tags to interface

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

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agoOnly sync tags after all batches (#9319)
John Olheiser [Wed, 11 Dec 2019 06:09:06 +0000 (00:09 -0600)]
Only sync tags after all batches (#9319)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
4 years agorefactor(models/attachement): use getAttachmentsByUUIDs (#9317)
Antoine GIRARD [Wed, 11 Dec 2019 00:01:52 +0000 (01:01 +0100)]
refactor(models/attachement): use getAttachmentsByUUIDs (#9317)

4 years agoMove modules/indexer to modules/indexer/code (#9301)
Lunny Xiao [Tue, 10 Dec 2019 13:29:40 +0000 (21:29 +0800)]
Move modules/indexer to modules/indexer/code (#9301)

4 years agoFCGI: Allow FCGI over unix sockets (#9298)
zeripath [Tue, 10 Dec 2019 12:23:26 +0000 (12:23 +0000)]
FCGI: Allow FCGI over unix sockets (#9298)

* FCGI: Allow FCGI over unix sockets

* fixup! FCGI: Allow FCGI over unix sockets

4 years agotests: add attachement tests integration (#9309)
Antoine GIRARD [Tue, 10 Dec 2019 11:06:48 +0000 (12:06 +0100)]
tests: add attachement tests integration (#9309)

* tests: add attachements integration

* Update integrations/attachement_test.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
4 years agoTesting: Update postgres sequences (#9304)
zeripath [Tue, 10 Dec 2019 07:49:05 +0000 (07:49 +0000)]
Testing: Update postgres sequences (#9304)

4 years agoCorrect port range for cap_net_bind_service (#9306)
Justin R. Cutler [Mon, 9 Dec 2019 19:20:09 +0000 (14:20 -0500)]
Correct port range for cap_net_bind_service (#9306)

4 years agoFile Edit: Author/Committer interchanged [BugFix] (#9297)
6543 [Mon, 9 Dec 2019 13:11:24 +0000 (14:11 +0100)]
File Edit: Author/Committer interchanged [BugFix] (#9297)

* simple fix

* fix test too

* repair more twists
use same sequence: first Author, then Commiter

4 years agoprebuild CSS/JS before xgo release binaries (#9293)
techknowlogick [Sun, 8 Dec 2019 22:24:17 +0000 (17:24 -0500)]
prebuild CSS/JS before xgo release binaries (#9293)

* prebuild CSS/JS before xgo release binaries

* Update .drone.yml

* Update Makefile

* update per @lafriks feedback

4 years agoAllow incompletely specified Time Formats (#8816)
zeripath [Sun, 8 Dec 2019 21:25:00 +0000 (21:25 +0000)]
Allow incompletely specified Time Formats (#8816)

* Allow incompletely specified time formats

* Adjust error reporting slightly

* Update setting.go

4 years agoMove code indexer related code to a new package (#9191)
Lunny Xiao [Sun, 8 Dec 2019 19:15:35 +0000 (03:15 +0800)]
Move code indexer related code to a new package (#9191)

* move code indexer related code to a new package

* fix lint

* fix tests

* fix fmt

* GetMaxID support interface parameter

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 8 Dec 2019 16:59:29 +0000 (16:59 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoRemove explicit 'generate' calls, fix release task (#9288)
silverwind [Sun, 8 Dec 2019 16:56:59 +0000 (17:56 +0100)]
Remove explicit 'generate' calls, fix release task (#9288)

* Remove more explicit 'generate' calls

`generate` is now implicit during `build` since #9114, it is no longer
necessary or desired to specify it explicitely.

* add js,css,generate dependencies to release task

* remove generate warning as per @lunny

4 years agoLog: Ensure FLAGS=none is -1 (#9287)
zeripath [Sun, 8 Dec 2019 04:36:47 +0000 (04:36 +0000)]
Log: Ensure FLAGS=none is -1 (#9287)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 8 Dec 2019 02:53:56 +0000 (02:53 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoUpdate Owners for upcoming year (#9290)
techknowlogick [Sun, 8 Dec 2019 02:51:55 +0000 (21:51 -0500)]
Update Owners for upcoming year (#9290)

Close #9230

4 years agoMissed defer prepareTestEnv (#9285)
zeripath [Sun, 8 Dec 2019 01:14:50 +0000 (01:14 +0000)]
Missed defer prepareTestEnv (#9285)

* onGiteaRun should defer the cleanup from prepareTestEnv

* Some more missed defers

4 years ago[API] Add Reactions (#9220)
6543 [Sat, 7 Dec 2019 22:04:19 +0000 (23:04 +0100)]
[API] Add Reactions (#9220)

* reject reactions wich ar not allowed

* dont duble check CreateReaction now throw ErrForbiddenIssueReaction

* add /repos/{owner}/{repo}/issues/comments/{id}/reactions endpoint

* add Find Functions

* fix some swagger stuff + add issue reaction endpoints + GET ReactionList now use FindReactions...

* explicite Issue Only Reaction for FindReactionsOptions with "-1" commentID

* load issue; load user ...

* return error again

* swagger def canged after LINT

* check if user has ben loaded

* add Tests

* better way of comparing results

* add suggestion

* use different issue for test
(dont interfear with integration test)

* test dont compare Location on timeCompare

* TEST: add forbidden dubble add

* add comments in code to explain

* add settings.UI.ReactionsMap
so if !setting.UI.ReactionsMap[opts.Type] works

4 years agoMarkdown: Sanitizier Configuration (#9075)
Alexander Scheel [Sat, 7 Dec 2019 19:49:04 +0000 (14:49 -0500)]
Markdown: Sanitizier Configuration (#9075)

* Support custom sanitization policy

Allowing the gitea administrator to configure sanitization policy allows
them to couple external renders and custom templates to support more
markup. In particular, the `pandoc` renderer allows generating KaTeX
annotations, wrapping them in `<span>` elements with class `math` and
either `inline` or `display` (depending on whether or not inline or
block mode was requested).

This iteration gives the administrator whitelisting powers; carefully
crafted regexes will thus let through only the desired attributes
necessary to support their custom markup.

Resolves: #9054

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
* Document new sanitization configuration

 - Adds basic documentation to app.ini.sample,
 - Adds an example to the Configuration Cheat Sheet, and
 - Adds extended information to External Renderers section.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
* Drop extraneous length check in newMarkupSanitizer(...)

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
* Fix plural ELEMENT and ALLOW_ATTR in docs

These were left over from their initial names. Make them singular to
conform with the current expectations.

Signed-off-by: Alexander Scheel <alexander.m.scheel@gmail.com>
4 years agofix #9198 make diff detail sticky again (#9280)
Benno [Sat, 7 Dec 2019 18:01:57 +0000 (02:01 +0800)]
fix #9198 make diff detail sticky again (#9280)

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 7 Dec 2019 15:54:45 +0000 (15:54 +0000)]
[skip ci] Updated translations via Crowdin

4 years agoMove UpdateIssuesCommit from models to repofiles (#9276)
Lunny Xiao [Sat, 7 Dec 2019 15:52:36 +0000 (23:52 +0800)]
Move UpdateIssuesCommit from models to repofiles (#9276)

4 years agoRedirect issue if repo has configured external tracker. (#9247)
David Svantesson [Sat, 7 Dec 2019 04:21:18 +0000 (05:21 +0100)]
Redirect issue if repo has configured external tracker. (#9247)

* Redirect issue if repo has configured external tracker.

* Handle error

* Add tests for redirect

* Fix test consistency

4 years agoMove some pull request functions from models to services (#9266)
Lunny Xiao [Sat, 7 Dec 2019 02:44:10 +0000 (10:44 +0800)]
Move some pull request functions from models to services (#9266)

* Move some pull request functions from models to services

* Fix test

4 years agoShow label list on label set (#9251)
Oscar Costa [Sat, 7 Dec 2019 02:13:19 +0000 (18:13 -0800)]
Show label list on label set (#9251)

* Showing the list of labels of template files #7812

* Returning and logging errors when loading labels

* Commenting public method

* Change log level in case of error loading labels.

4 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 6 Dec 2019 19:16:21 +0000 (19:16 +0000)]
[skip ci] Updated translations via Crowdin