1959 Commits (321cc2a3d0f267f8b0f5bb4365572636f1ce0443)

Author SHA1 Message Date
Bwko 321cc2a3d0 Set default branchname on first push (#3715) 6 years ago
Chri-s 9350ba7947 Add protected branch whitelists for merging (#3689)
* Add database migrations for merge whitelist

* Add merge whitelist settings for protected branches

* Add checks for merge whitelists
6 years ago
Jonas Franz 43fc430c07 Improve release page UI (#3693)
* Improve release page ui by adding size

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add documentation to a.MustSize()

Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Lunny Xiao 9e5d0a09eb
Global code search support (#3664)
* add global code search on explore

* fix bug when no anyone public repos

* change the icon

* fix typo and add UnitTypeCode check for login non-admin user

* fix ui description when no match
6 years ago
Chri-s a2a49c93c7 Added checks for protected branches in pull requests (#3544)
* Added checks for protected branches in pull requests

Signed-off-by: Christian Wulff <NChris@posteo.net>

* Moved check for protected branch into new function CheckUserAllowedToMerge

Signed-off-by: Christian Wulff <NChris@posteo.net>

* Removed merge conflict lines from last commit

Signed-off-by: Christian Wulff <NChris@posteo.net>

* Explicit check for error type in ViewIssue

Signed-off-by: Christian Wulff <NChris@posteo.net>
6 years ago
Lauris BH c0d41b1b77 Add label descriptions (#3662)
* Add label descriptions

* Add default descriptions to label template
6 years ago
Lauris BH de8a091767 Fix MySQL and PostgreSQL column drop SQL (#3649) 6 years ago
Lauris BH dc4afef07f Fix column removal in MSSQL (#3638)
* Fix column removal in MSSQL

* Use xorm session in MSSQL drop column operations

* Add transaction as MSSQL alter table is transactional
6 years ago
Jonas Franz 9a5e628a7e Add Attachment API (#3478)
* Add Attachment API
* repos/:owner/:repo/releases (add attachments)
* repos/:owner/:repo/releases/:id (add attachments)
* repos/:owner/:repo/releases/:id/attachments
* repos/:owner/:repo/releases/:id/attachments/:attachment_id

Signed-off-by: Jonas Franz <info@jonasfranz.de>

* Add unit tests for new attachment functions
Fix comments

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* fix lint

* Update vendor.json

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* remove version of sdk

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix unit tests
Add missing license header

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add CreateReleaseAttachment
Add EditReleaseAttachment
Add DeleteReleaseAttachment

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add filename query parameter for choosing another name for an attachment

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix order of imports

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Restricting updatable attachment columns

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* gofmt

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Update go-sdk
Replace Attachments with Assets

Signed-off-by: Jonas Franz <info@jonasfranz.de>

* Update go-sdk

Signed-off-by: Jonas Franz <info@jonasfranz.de>

* Updating go-sdk and regenerating swagger

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add missing file of go-sdk

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Change origin of code.gitea.io/sdk to code.gitea.io/sdk
Update code.gitea.io/sdk

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Update swagger

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Update updateAttachment
6 years ago
Morgan Bazalgette b730498f02 Don't write to log NoCommitterAccount (#3621)
* Don't write to log NoCommitterAccount

It's way too verbose, and the information is also printed to the user
already. Fixes #3602.

* ignore err only if it's a ErrUserNotExist

* Replace with IsErrUserNotExist
6 years ago
Bo-Yi Wu 78b54b49fa
fix: Add feed for organization (#3594)
* feat: Add feed for organization

* fix: testing

* fix: testing

* fix: testing

* fix: testing
6 years ago
Allen Wild 8606d9f5bc Add admin dashboard option to run health checks (#3606)
There's one for git gc, why not git fsck too?

Also add a couple more trace logs to GitFsck to see progress
6 years ago
Wendell Sun d2d0aea8a1 Fix the protected branch panic issue (#3567) 6 years ago
Wendell Sun 2d1c5c3756 Fix remove team member issue (#3566)
Put sess.Commit() out of the RemoveOrgUser function

Add an empty line to separate import packages
6 years ago
Wendell Sun 19bf4ddf80 Fix query protected branch bug (#3563)
Signed-off-by: Wendell Sun <iwendellsun@gmail.com>
6 years ago
Bo-Yi Wu 845ba9d153 fix: if Mirrors repo no content is fetched, updated time should not b… (#3551)
* fix: if Mirrors repo no content is fetched, updated time should not be changed

* fix: sync update time from mirror repo.

* fix: one single session.

* update comment.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
6 years ago
Bo-Yi Wu 04b3e8cbdc
refactor: reduce sql query in retrieveFeeds (#3547) 6 years ago
Ethan Koenig d27d720f05 Use unique temp dirs in unit tests (#3494)
* Use unique temp dirs in unit tests

* Remove temp dirs after tests run

* os.RemoveAll -> removeAllWithRetry
6 years ago
Wendell Sun 2f5c1ba1db Bug fix for repo releases sorted (#3522)
Signed-off-by: Wendell Sun <iwendellsun@gmail.com>

Use TimeStampNow function
6 years ago
Lauris BH 58893384e8 Add issue closed time column to fix activity closed issues list (#3537)
Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
6 years ago
Lauris BH 3a9c698821
Force remove test repo root path in case previous test is still locking it (#3528)
Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
6 years ago
Codruț Constantin Gușoi 96c268c0fc Implements generator cli for secrets (#3531)
Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
6 years ago
Ethan Koenig 6eaeb01ecf Update code.gitea.io/git (#3482) 6 years ago
Codruț Constantin Gușoi 011f128c89 Fixes missing avatars in offline mode (#3471)
Signed-off-by: Codruț Constantin Gușoi <codrut.gusoi@gmail.com>
6 years ago
Ethan Koenig a89592d4ab Reduce repo indexer disk usage (#3452) 6 years ago
Lauris BH 283e87d814
Fix rendering of wiki page list if wiki repo contains other files (#3454)
* Fix rendering of wiki page list if wiki repo contains other files

* Improve wiki filename tests
6 years ago
Ethan Koenig b16c84de7b Fix synchronization bug in repo indexer (#3455) 6 years ago
Morgan Bazalgette 17655cdf1b Enable caching on assets and avatars (#3376)
* Enable caching on assets and avatars

Fixes #3323

* Only set avatar in user BeforeUpdate when there is no avatar set

* add error checking after stat

* gofmt

* Change cache time for avatars to an hour
6 years ago
Antoine GIRARD b3fd94c13d Add sensitive headers (#3429)
* Add HeaderWithSensitiveCase methods to respect casing

* Update webhook.go
7 years ago
Ethan Koenig 46c7fe371d Fix PR merge error (#3421) 7 years ago
Ethan Koenig 3968c1149e Fix SQL type error for webhooks (#3424) 7 years ago
Ethan Koenig bac6ac033a Fix race condition in repo renaming (#3418) 7 years ago
Ethan Koenig c55a027da3 Fix empty checkout bug (#3419) 7 years ago
Wendell Sun b627f1131b Change local copy origin url after repository rename (#3399)
Fix #3378
7 years ago
Antoine GIRARD 9e842c8a72 Fix SSH auth lfs locks (#3152)
* Fix SSH auth LFS locks

* Activate SSH/lock test

* Remove debug

* Follow @lunny recommendation for AfterLoad method
7 years ago
Antoine GIRARD 1ce3572409 Remove useless check (#3384)
In #3377, I put check inside all write key function. This one is useless no.
7 years ago
Sandro Santilli 05ab747054 Force-push to base repo's ref/pull/#/head (#3393)
* Force-push to base repo's ref/pull/#/head

Fixes force-pushing to pull request branches, otherwise failing with:

[...gitea/models/pull.go:1022 AddTestPullRequestTask()] [E] PushToBaseRepo: Push: exit status 1 - To /path/to/gitea-repositories/org/repo.git
 ! [rejected]        issue-fix -> refs/pull/20/head (non-fast-forward)

* format
7 years ago
Lauris BH ca306985d3
Change how merged PR commit info are prepared (#3368)
* Change how merged PR commits and diff are made

* Update code.gitea.io/git dependency

* Fix typo

* Remove unneeded local variable
7 years ago
Ethan Koenig b0d5bb909b Delete indexer DB entries when (re)creating index (#3385)
* comment
7 years ago
Antoine GIRARD 095fb9f2e3 Add integrations tests from git cli (#3377)
* test: integration add git cli tests

Extracted form for easing review process and debug #3152

* test: integration add git cli big file commit

* fix:  Don't rewrite key if internal server
7 years ago
Lauris BH a68bf746a4
Change reserved avatar name to correct - avatars (#3375) 7 years ago
Ethan Koenig ccdb94992d Asynchronously populate the repo indexer (#3366)
* Populate repo indexer in background

* Check if no repos exist

* race cond
7 years ago
Bo-Yi Wu 7a2a3fbafc refactor(model): update user method. (#3360) 7 years ago
Kim "BKC" Carlbäcker e5b8b4b5ec Cleanup models.User.HashPassword (#3334) 7 years ago
Lauris BH be1330ec89 Remove hardcoded paths to fix randomly failing tests (#3347)
* Remove hardcoded paths to fix randomly failing tests

* Use correct function for merge path
7 years ago
Morgan Bazalgette 674cfb7cac Change EncodePasswd to HashPassword (#3329)
* Change EncodePasswd to HashPassword

* Create test+benchmark for HashPassword
7 years ago
Ethan Koenig f48680888c Remove IsOwner, NumTeams from OrgUser (#3269) 7 years ago
Antoine GIRARD cb868b7851 Add missing indexer doc in configuration (#3324)
* Add missing indexer doc in configuration

* Unify MAX_FILE_SIZE to 1024 * 1024
7 years ago
Lunny Xiao 835b890329 fix bug when a user delete but assigned on issue (#3318) 7 years ago
Vlad Temian e78786ef39 Writable deploy keys (closes #671) (#3225)
* Add is_writable checkbox to deploy keys interface

* Add writable key option to deploy key form

* Add support for writable ssh keys in the interface

* Rename IsWritable to ReadOnly

* Test: create read-only and read-write deploy keys via api

* Add DeployKey access mode migration

* Update gitea sdk via govendor

* Fix deploykey migration

* Add unittests for writable deploy keys

* Move template text to locale

* Remove implicit column update

* Remove duplicate locales

* Replace ReadOnly field with IsReadOnly method

* Fix deploy_keys related integration test

* Rename v54 migration with v55

* Fix migration hell
7 years ago