Commit Graph
92 Commits
Author SHA1 Message Date
Antoine GIRARDandJonas Franz c39df04087 Display Github support button (#7343)
This need an option to be enabled on repo : https://help.github.com/en/articles/displaying-a-sponsor-button-in-your-repository
2019-07-02 12:06:25 +02:00
Antoine GIRARDandLunny Xiao 1e46eedce7 update mssql drive to last working version 20180314172330-6a30f4e59a44 (#7306) 2019-06-30 11:28:17 +08:00
Antoine GIRARDandLunny Xiao de9b398cde add .fa margin like .octicon (#7258) 2019-06-20 15:16:01 +08:00
Antoine GIRARDandtechknowlogick 2d097655a6 Fix relref link in docs (#7233) 2019-06-17 22:57:48 -04:00
Antoine GIRARDandzeripath 367aeb169a Use go method to calculate ssh key fingerprint (#7128)
* Use go method to calculate key fingerprint

* add gitea copyright

* use native go method only for built-in server

* refactor and add tests

* add gitea copyright
2019-06-16 08:50:46 +01:00
Antoine GIRARDandLunny Xiao 273f1997ff setting: don't require same running user for internal SSH (like win platform) (#7215) 2019-06-16 10:49:07 +08:00
Antoine GIRARDandtechknowlogick 10ff527fae internal/ssh: ignore env command totally (#6825)
* ssh: ignore env command totally

* Remove commented code 

Needed fix described in issue #6889
2019-05-09 18:41:43 -04:00
Antoine GIRARDandLauris BH 650df0bd4e Enforce osusergo build tag for releases (#6862) 2019-05-06 22:48:08 +03:00
Antoine GIRARDandtechknowlogick 2933ae4e88 Update https://github.com/urfave/cli to version 1.2.0 (#6838)
From un-tagged pervious version : https://github.com/urfave/cli/compare/d86a009f5e13...master
2019-05-03 08:49:14 -04:00
Antoine GIRARDandLauris BH eb8632b20b Add existing issues (#6811) 2019-04-30 20:50:17 +03:00
Antoine GIRARDandtechknowlogick 84fd24246c Bump github.com/stretchr/testify from 1.2.2 to 1.3.0 (#6663)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.2.2 to 1.3.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.2.2...v1.3.0)
2019-04-16 23:45:40 -04:00
Antoine GIRARDandtechknowlogick 4f19b08258 update swagger-ui (#6661) 2019-04-16 22:50:55 -04:00
Antoine GIRARDandtechknowlogick 4183c846e3 [mod]: Bump gopkg.in/src-d/go-git.v4 from 4.8.0 to 4.10.0 (#6662)
Bumps [gopkg.in/src-d/go-git.v4](https://github.com/src-d/go-git) from 4.8.0 to 4.10.0.
- [Release notes](https://github.com/src-d/go-git/releases)
- [Commits](https://github.com/src-d/go-git/compare/v4.8.0...v4.10.0)
2019-04-16 22:04:23 -04:00
Antoine GIRARDandtechknowlogick e98565ddc7 Fix wrong GPG expire date (#6643)
* fix expire of gpg relative to key creation https://tools.ietf.org/html/rfc4880#section-5.2.3.6

* add test
2019-04-15 20:32:15 -04:00
Antoine GIRARDandtechknowlogick d699de32f2 add .gpg url (match github behaviour) (#6610)
* add .gpg url (match github behaviour)

* wildcard

* test to export maximum data

* working POC

* add comment for old imported keys

* cleaning

* Update routers/user/profile.go

Co-Authored-By: sapk <sapk@users.noreply.github.com>

* add migration script

* add integration tests
2019-04-14 12:43:56 -04:00
Antoine GIRARDandtechknowlogick 9d3732dfd5 [Contrib] Checkout a PR (#6021) 2019-03-07 20:54:10 -05:00
Antoine GIRARDandtechknowlogick 9eb00fed13 Run benchmark at tag to track performances (#6035) 2019-02-11 12:09:50 -05:00
Antoine GIRARDandtechknowlogick d6c229cdbe Include Go toolchain to --version (#5830)
* Include Go version

* fix import order
2019-01-24 10:22:51 -05:00
Antoine GIRARDandtechknowlogick 905e63f5b5 Force the PR close time to 60 days (#5770)
Like the comment that is posted.

Ex: https://github.com/go-gitea/gitea/pull/4749 is closed after 2 weeks and not 2 months
2019-01-19 12:21:03 -05:00
Antoine GIRARDandLauris BH 9f544e9356 drone/mssql: use golang 1.11 build like the other tests (#5586) 2018-12-23 23:11:22 +02:00
Antoine GIRARDandtechknowlogick 7cb1d8296d Create stale bot config (#5243) 2018-12-20 15:34:55 -05:00
Antoine GIRARDandLunny Xiao 3a95e2d0ea app.ini.sample: add ENABLE_USER_HEATMAP default config (#5362)
Doc: https://github.com/go-gitea/gitea/blob/b97af15de67b04fd259bd70a4abbc873f12e9491/docs/content/doc/advanced/config-cheat-sheet.en-us.md#service-service
2018-11-20 17:54:09 +08:00
Antoine GIRARDandtechknowlogick 4c1f1f9646 Remove x/net/context vendor by using std package (#5202)
* Update dep github.com/markbates/goth

* Update dep github.com/blevesearch/bleve

* Update dep golang.org/x/oauth2

* Fix github.com/blevesearch/bleve to c74e08f039e56cef576e4336382b2a2d12d9e026

* Update dep golang.org/x/oauth2
2018-11-10 18:55:36 -05:00
Antoine GIRARDandtechknowlogick 57a8440db3 Update gitignore list (#5258)
* update gitignore

* Handle symlink in tar

* Add some logs
2018-11-03 18:06:09 -04:00
Antoine GIRARDandLunny Xiao 617a2433a3 Make gitea serv use api/internal (#4886)
* Start to move to internal/private

* Add GetPublicKeyByID

* Add HasDeployKey

* Add private.UpdateDeployKeyUpdated

* Add private.GetUserByKeyID

* Add private.AccessLevel

* Add private.CheckUnitUser

* Fix mistakes I made

* Some cleaning + moving code to separate files

* Fix error handling

* Remove useless error handling for setup

* lint: fix comment on exported func

* fix copyright header

* Fix order of args
2018-10-30 14:20:13 +08:00
Antoine GIRARDandtechknowlogick 2af57c7820 Update x/net (#5169) 2018-10-26 19:05:56 -04:00
Antoine GIRARDandLunny Xiao c258ae8ada revert #5146 (#5167) 2018-10-25 16:31:26 +08:00
Antoine GIRARDandJonas Franz ffd5fb8139 Set heatmap color range configurable (#5165) 2018-10-24 16:38:04 +02:00
Antoine GIRARDandLunny Xiao 70ad46133f Fix JSON result of empty array (#5154) 2018-10-24 21:17:21 +08:00
Antoine GIRARDandtechknowlogick e4b8103ac7 Use fingerprint in place of id (#5099) 2018-10-18 00:15:02 -04:00
Antoine GIRARDandtechknowlogick 74f9f98f78 Simply remove tidb and deps (#3993) 2018-07-04 16:23:23 -04:00
Antoine GIRARDandLunny Xiao a747a5d05f Add gpg-sign step to drone (#4188)
* Add gpg-sign step to drone

* add compressed releases to gpg-sign targets

* Use exclude to simplify file list

drone-plugins/drone-gpgsign#2
2018-06-24 14:40:30 +08:00
Antoine GIRARDandLunny Xiao 23ba5c870f markup: escape short wiki link (#4091) 2018-06-15 20:42:49 +08:00
Antoine GIRARDandtechknowlogick 6efdcaed86 Fix swagger security parts (#4236) 2018-06-12 19:23:00 -04:00
Antoine GIRARDandBo-Yi Wu 908e8942cc Fix swagger errors (#4220)
Fix all the resting errors to have a valid swagger file.

They are still some warnings but nothing blocking.

Doing so I found that some request still misses son parameters for some POST/PUT/PATCH request. This means the a client generated from the swagger file will not work completely. 

Fix #4088 by activating validation in drone
Should fix #4010.
2018-06-12 22:59:22 +08:00
Antoine GIRARDandtechknowlogick 048468560f Add security advice to contrib guide (#4187)
* Improve contributing guidelines for security
2018-06-09 12:03:23 -04:00
Antoine GIRARDandLunny Xiao 35c3510335 Fix #4081 Check for leading / in base before removing it (#4082) 2018-05-30 21:23:43 +08:00
Antoine GIRARDandtechknowlogick 6f31911497 Add $GOPATH/bin to PATH for make releases (#4020)
Needed to access go tool gxz
2018-05-22 12:12:10 -04:00
Antoine GIRARDandtechknowlogick 08c9617caa Provide compressed releases (#3991)
* Add release-compress to provide compressed releases

* check after compress
2018-05-21 14:50:39 -04:00
Antoine GIRARDandtechknowlogick 75982127c8 [doc] Update vendor tool section to dep (#4008) 2018-05-21 14:10:35 -04:00
Antoine GIRARDandLauris BH 3f3383dc0a Migrate to dep (#3972)
* Update makefile to use dep

* Migrate to dep

* Fix some deps

* Try to find a better version for golang.org/x/net

* Try to find a better version for golang.org/x/oauth2
2018-05-21 15:34:20 +03:00
Antoine GIRARDandLunny Xiao edc78b9633 Update to last common x/text (#3994) 2018-05-20 18:09:00 +08:00
Antoine GIRARDandLauris BH 8dca5ad526 Fetch missing file in github.com/davecgh/go-spew/spew (#3995) 2018-05-20 09:09:35 +03:00
Antoine GIRARDandLunny Xiao 917b9641ec Update to last common bleve (#3986) 2018-05-19 20:49:46 +08:00
Antoine GIRARDandBo-Yi Wu 3506717e9c Add swagger check (#3811) 2018-04-20 17:13:50 +08:00
Antoine GIRARDandLauris BH 0e26db8bcd Docker multi-stage (#2927)
* Setup docker multi-stage and little sugar at it

* Make codacy happy ?

* Revert back to what the official docker documentation suggest

Codacy don't seems to follow https://docs.docker.com/engine/reference/builder/#maintainer-deprecated

* Update golang version
2018-03-12 11:59:13 +02:00
Antoine GIRARDandLauris BH b3fd94c13d Add sensitive headers (#3429)
* Add HeaderWithSensitiveCase methods to respect casing

* Update webhook.go
2018-01-31 00:09:16 +02:00
Antoine GIRARDandLauris BH 36a94da8da doc: Improve integrations examples (#3416) 2018-01-27 20:52:41 +02:00
Antoine GIRARDandLauris BH 9e842c8a72 Fix SSH auth lfs locks (#3152)
* Fix SSH auth LFS locks

* Activate SSH/lock test

* Remove debug

* Follow @lunny recommendation for AfterLoad method
2018-01-27 18:48:15 +02:00
Antoine GIRARDandLauris BH 1ce3572409 Remove useless check (#3384)
In #3377, I put check inside all write key function. This one is useless no.
2018-01-19 21:45:53 +02:00
Antoine GIRARDandLauris BH 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
2018-01-16 13:07:47 +02:00
Antoine GIRARDandLauris BH 079273e2ff Add MSSQL to supported database list of intall page (#3359) 2018-01-12 19:23:28 +02:00
Antoine GIRARDandAndrey Nering 84feb016f5 Remove useless fmt.Errorf("%v", err) (#3337) 2018-01-09 16:40:05 -02:00
Antoine GIRARDandLauris BH cb868b7851 Add missing indexer doc in configuration (#3324)
* Add missing indexer doc in configuration

* Unify MAX_FILE_SIZE to 1024 * 1024
2018-01-08 07:03:52 +02:00
Antoine GIRARDandBo-Yi Wu d2736e268b Remove unused vendor github.com/stretchr/testify/require (#3273) 2017-12-31 09:11:08 +08:00
Antoine GIRARDandLauris BH cc7b8e3379 Add more bench (#3161)
* Improve makefile + Add benchs

* Apply recommendations of @ethantkoenig
2017-12-24 02:33:34 +02:00
Antoine GIRARDandLunny Xiao 23ffdf42c8 Update alpine to 3.7 (#3121) 2017-12-10 10:50:50 +08:00
Antoine GIRARDandLunny Xiao ef78309b65 Improve LFS tests + fix lfs url refs + keep path upper/lowercase in db. (#3092)
* Add failing test

* Fix urls

* Improve url in tests

* improve testing

* Remove debug code

* Add deps

* LFS corner-case : Search on lower but store with case

* Temporary comment of blocking action

* fix hooks

* Use temporary repo for git client test

* Use userPassword in place of hard-coded password
2017-12-08 20:21:37 +08:00
Antoine GIRARDandLauris BH 4035ab05fa Fix git lfs path (#3016)
* add suffix .git

* Remove Content-Type on GET methods

* Add migrations to force creation before any further potential migration
2017-11-29 01:35:23 +02:00
Antoine GIRARDandLauris BH d99f4ab003 Git LFS lock api (#2938)
* Implement routes

* move to api/sdk and create model

* Implement add + list

* List return 200 empty list no 404

* Add verify lfs lock api

* Add delete and start implementing auth control

* Revert to code.gitea.io/sdk/gitea vendor

* Apply needed check for all lfs locks route

* Add simple tests

* fix lint

* Improve tests

* Add delete test + fix

* Add lfs ascii header

* Various fixes from review + remove useless code + add more corner case testing

* Remove repo link since only id is needed.

Save a little of memory and cpu time.

* Improve tests

* Use TEXT column format for path + test

* fix mispell

* Use NewRequestWithJSON for POST tests

* Clean path

* Improve DB format

* Revert uniquess repoid+path

* (Re)-setup uniqueness + max path length

* Fixed TEXT in place of VARCHAR

* Settle back to maximum VARCHAR(3072)

* Let place for repoid in key

* Let place for repoid in key

* Let place for repoid in key

* Revert back
2017-11-28 22:58:37 +02:00
Antoine GIRARDandLunny Xiao d23a3e96f1 Fix bench deps since #2916 (#2971) 2017-11-26 10:00:57 +08:00
Antoine GIRARDandLauris BH dac0f14f34 Docker multi-arch base (#1985)
* Create docker/manifest/base.yml

serve as base for build docker image for most platform (386,amd64,arm,arm64)

* Add make task docker-multi-arch-push-manifest

To update references of a multi-arch image on docker registry.

* Use SED_INPLACE generic sed command

* Delete Dockerfile.aarch64

Delete Dockerfile.rpi

* Use gitea/gitea-base as base

and replace deprecated MAINTAINER by LABEL (https://docs.docker.com/engine/reference/builder/#maintainer-deprecated)

* Fix rebase

* Use sapk/gitea-base as base

* Split makefile for docker

* Fix version to v3.6

Could use in later version edge of alpine official library that support multi-arch for armhf.

* Remove sapk/gitea-base and use directly new official alpine multi-arch
2017-11-16 15:16:40 +02:00
Antoine GIRARDandLunny Xiao 619b9b5547 Move swagger-ui under /api/v1 (#2746)
* Move swagger interface under /api/v1

* Update swagger-ui

* Add /api/swagger and prepare for multiple api version

* Update test links

* Fix footer link
2017-10-21 22:05:50 +08:00
Antoine GIRARDandLunny Xiao 2112eb8741 Update vendor github.com/lib/pq (#2752) 2017-10-21 12:05:58 +08:00
Antoine GIRARDandBo-Yi Wu 69dfe43ffc Fix some tests : make coverage -> test (#2492)
* Fix test : make coverage -> test

* Refactor integration tests to be able to run them in parallel

* Add custom local repository temp path
2017-09-12 13:51:12 +08:00
Antoine GIRARDandLauris BH 4f9a28e1f5 Make repo private to no interfere with other tests (#2467) 2017-09-06 00:33:33 +03:00
Antoine GIRARDandLunny Xiao 7c417bbb0d Only check at least one email gpg key (#2266)
* Only require one email (possibly not yet validated)

* Update message error and check validation of commit

* Add integrations tests

* Complete integration for import

* Add pre-check/optimization

* Add some test (not finished)

* Finish

* Fix fixtures

* Fix typo

* Don't guess key ID
2017-09-05 21:45:18 +08:00
Antoine GIRARDandKim "BKC" Carlbäcker 019c90ab8f Update CONTRIBUTING following #2329 discussion
Creation of release branch before end of release dev and releases candidates + follow semver semantic (minor, patch)
2017-08-28 19:08:24 +02:00
Antoine GIRARDandLauris BH fd8e8a421a Improve swagger doc (#2274)
* Add swagger comment for adminCreateOrg

* Add swagger comment for admin route

* add hook swagger doc

* Add tags

* Add auth

* Fix name of responses

* Edit name method

* Update vendor

* make generate-swagger
2017-08-21 14:13:47 +03:00
Antoine GIRARDandLunny Xiao a804f0e052 go get github.com/wadey/gocovmerge when needed (#2235) 2017-07-31 09:29:50 +08:00
Antoine GIRARDandLunny Xiao 30787e48f2 Improve org error handling (#2117)
* Improve ErrOrgNotExist type
Return new error type
Use good error check
Use new method to check error
Update tests

* Fix unchanged method name report
2017-07-06 21:30:19 +08:00
Antoine GIRARDandLunny Xiao 6233e88f7f Use testing benchmark interface (#1993) 2017-06-17 23:01:03 +08:00
Antoine GIRARDandBo-Yi Wu 2bcd9471c9 Separate generate swagger + fix sed os specific (#1791)
* Separate generate-swagger

* Remove go generate rules

* Add missing definition replacement + remove use of -i sed flag

for compatibility with mac os default sed version.
This is a little hacky a better solution could be use.

* Use custom SED_INPLACE

depending of platform detection

* Use SED_INPLACE for swagger-ui also
2017-06-15 08:51:23 -05:00
Antoine GIRARDandLunny Xiao 274149dd14 Switch to keybase go-crypto (for some elliptic curve key) + test (#1925)
* Switch to keybase go-crypto (for some elliptic curve key) + test

* Use assert.NoError 

and add a little more context to failing test description

* Use assert.(No)Error everywhere 🌈

and assert.Error in place of .Nil/.NotNil
2017-06-14 08:43:43 +08:00
Antoine GIRARDandLunny Xiao a97d6bf24b Use production version of vuejs. (#1869) 2017-06-04 11:04:42 +08:00
Antoine GIRARDandBo-Yi Wu 976c2a05fa Fix change introduce by update of go-swagger. (#1727) 2017-06-01 23:35:31 -05:00
Antoine GIRARDandBo-Yi Wu 91417e9715 re-Generate swagger.json (#1722)
changes introduced to repo format by : go-gitea/gitea#1687 go-gitea/go-sdk#58  go-gitea/gitea#1668 go-gitea/go-sdk#56
2017-05-14 17:37:15 +08:00
Antoine GIRARDandKim "BKC" Carlbäcker 3edb0c5894 Generate swagger json (#1402)
- Generate swagger.json into public/
- Add swagger-ui auto-installation
- Add footer link to local swagger-ui
- Add /swagger url for using app url.
- Fix Swagger-UI version via git tag
2017-05-02 15:35:59 +02:00
Antoine GIRARDandKim "BKC" Carlbäcker bb5f694fc5 Improve govendor testing (#1623)
- Use `govendor list +outside +unused` for finding missing or unused deps and govendor status for catching modified vendor.  
- Remove appengine import
2017-05-02 15:22:21 +02:00
Antoine GIRARDandLunny Xiao 431b26f6d7 Handle display of GPG key without end date (#1628) 2017-04-28 08:44:58 +08:00
Antoine GIRARDandLunny Xiao 8371f94d06 Rework SSH key management UI to add GPG (#1293)
* Rework SSH key management UI to add GPG

* Add more detail to gpg key display

* Update CHANGELOG.md

* Implement deletion UI

* Implement adding gpg UI

* Various fixes

- Fix duplicate entry in locale
- Re-generate hash before verification since they are consumed

* Add missing translation

* Split template

* Catch not found/verified email error
2017-04-26 21:10:43 +08:00
Antoine GIRARDandLunny Xiao eb1075dd4c Check if missing/modified/unused deps in vendor and fix errors (#1468)
* Check if missing deps in vendor

This will catch import from other repos. (maybe by auto-import)

* Remove github.com/smartystreets unused deps

* Remove github.com/boltdb/bolt unused dep

* Fetch github.com/go-xorm/core + sync gopkg.in/ldap.v2/ldap.go

* Auto-install govendor + reinstall github.com/boltdb/bolt needed by vendor/github.com/blevesearch/bleve/index/store/boltdb

* Update go-xorm/xorm to a5cb21 in vendor.json

* Use a custom repo for implementing change to bolt dep.

* Switching bolt to github.com/go-gitea/bolt

* Switching bolt to github.com/go-gitea/bolt (fork version)

* change the drone sign
2017-04-24 22:31:46 +08:00
Antoine GIRARDandBo-Yi Wu 941281ae12 Use MAINTAINERS file in repository in CONTRIBUTING (#1489)
* Use MAINTAINERS file in repository because teams are not publicly available

* Use relative link
2017-04-18 08:56:28 +08:00
Antoine GIRARDandBo-Yi Wu c764a542c0 Adding @sapk to MAINTAINERS (#1497) 2017-04-16 20:51:38 +08:00
Antoine GIRARDandBo-Yi Wu cf91cfb993 Migrate WatchInfo struct to api (#1492)
* Remove WatchInfo and link to api struct

* Add vendor temporary update

* Return to gitea vendor source
2017-04-16 20:51:04 +08:00
Antoine GIRARDandBo-Yi Wu d9db188274 Fix #1418 (#1456) 2017-04-07 22:50:40 +08:00
Antoine GIRARDandLunny Xiao 912b340d0d Simplify settings pages with item list (#1389)
* Remove point column on ssh key setting page

* Remove un-used css

* Some cleaning

* Use octicon-key
2017-03-30 09:02:37 +08:00
Antoine GIRARDandLunny Xiao 14fe9010ae GPG commit validation (#1150)
* GPG commit validation

* Add translation

+ some little fix

* Move hash calc after retrieving of potential key + missing translation

* Add some little test
2017-03-22 18:43:54 +08:00
Antoine GIRARDandLunny Xiao 925b252927 Fix missing less sources for oauth (#1288) 2017-03-17 08:49:24 +08:00
Antoine GIRARDandLunny Xiao ca1c3f1926 Implement GPG api (#710)
* Implement GPG API

* Better handle error

* Apply review recommendation + simplify database operations

* Remove useless comments
2017-03-16 09:27:35 +08:00
Antoine GIRARD 5edc2f6d6c Fix indent tmpl 2015-10-14 01:09:33 +02:00
Antoine GIRARD 4dd731cb53 Fix indent .less 2015-10-14 01:05:32 +02:00