Compare commits

..

518 Commits

Author SHA1 Message Date
fc0c6f48c7 Add changelog for release v1.2.0-rc2 (#2469) 2017-09-06 14:05:35 +03:00
002fa73460 Fix migration from pre-v15 to 1.2.0 (#2460) (#2465) 2017-09-05 21:03:30 +08:00
2fdc649202 bug fixed 2017-09-04 14:28:50 +08:00
0c910afe11 Fix releases to be counted from database not tags (#2389) (#2424) 2017-08-30 09:31:32 +08:00
1cbe502cc2 fix duplicated feed (#2370) 2017-08-28 19:16:25 +02:00
f916aa0fe3 Set version to 1.2.0-dev
1.2.0-dev is less than 1.2.0, according to semver
2017-08-27 23:02:48 +02:00
04728b5b91 fix wrong changelog title (#2395) 2017-08-25 22:34:50 +08:00
bbb0b8c17c add change log for release v1.2.0-rc1 (#2388) 2017-08-25 16:54:41 +08:00
0938a2dca3 Fix missing collabrative repos (#2367) (#2382)
* fix missing collabrative repos

* fix bug of collabrative

* fix SQL quotes
2017-08-25 10:25:37 +08:00
9df0eafa25 Move 3rd party js/css into public/vendor and document sources (#2383)
This commit cherry picks the following commits (master -> v1.2):
  a915a09
  874f9be
  233bbcf

Ref: https://github.com/go-gitea/gitea/issues/1484
Signed-off-by: Michael Lustfield <michael@lustfield.net>
2017-08-25 10:01:17 +08:00
e13eef8cfe update translation from crowdin (#2368) (#2380) 2017-08-24 21:57:17 +08:00
64b7068846 Add more test for login links and fix a bug on action retrieve (#2361)
* add more test for login links and fix a bug on action retrieve
2017-08-23 12:53:35 +03:00
8aadf79f80 Add integration tests for signin (#2363)
Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
2017-08-23 10:30:33 +03:00
fd6e91077a Fix SQL condition bug in GetFeeds(..) (#2360) 2017-08-23 08:51:58 +03:00
9413b48a0b fix bug on create repo link on dashboard (#2359) 2017-08-23 12:08:20 +08:00
be4f6a754c Revert "Changes for latest DroneCI (#2355)" (#2358)
This reverts commit faf4b503b24d33a2a0f455d26bb782345ab8e0c9.
2017-08-22 20:56:57 -05:00
1a5fe4326f Add collaborative repositories to the dashboard (#2205)
* Add collaborative repositories to the dashboard

Remove some unused code from the Dashboard func

* fix some bug and some refactor

* fix tests
2017-08-23 09:30:54 +08:00
faf4b503b2 Changes for latest DroneCI (#2355) 2017-08-22 20:08:30 -05:00
7455604f0c Remove (almost) server side data rendering from repo-search component (#2317)
* Rename some shorthands

* Remove (almost) server side data rendering from repo-search component template
2017-08-22 21:00:34 +08:00
2c6a0fdca8 update latest xorm version to vendor (#2353) 2017-08-22 14:39:52 +03:00
5c29b0a5fe Add badge and link to the Matrix room (#2348) 2017-08-21 23:35:08 +08:00
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
951c909a67 Add INTERNAL_TOKEN to integration .ini file (#2346)
Avoids override of source file upon running `make test-pgsql`

Long story: settings.NewContext *adds* an INTERNAL_TOKEN if none
is found; the other ini files under integration/ all have an
INTERNAL_TOKEN
2017-08-21 14:47:23 +08:00
53e6c947f1 Fix order of elements in dashboard html (#2344) 2017-08-20 22:48:41 +03:00
100ec93a65 Remove integration test executables on make clean (#2340) 2017-08-20 11:09:24 +08:00
2c3a229a3c Add OpenID configuration in install page (#2276) 2017-08-19 17:34:49 +02:00
e7653a67a1 No error log entries for repo 404 (#2200) 2017-08-19 15:32:18 +03:00
5707ad3bb7 Add AppURL without trailing slash to TOTP issuer parameter to prevent conflicting accounts on multiple gitea installations (#2335)
Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
2017-08-19 09:39:43 +08:00
4c13a8458b Fix repo-search template errors for go1.7 (#2336) 2017-08-19 09:37:48 +08:00
e08d1fcc15 Fix variable name typo (#2327) 2017-08-18 14:21:46 +03:00
9df090e551 Add missing forks key for dashboard repository component (#2325)
Missing key that is used in #2285
2017-08-18 14:56:04 +08:00
f3486360d2 Make use of Vue more universal (#2318) 2017-08-17 19:04:39 +03:00
9e9e1e0e52 Add public links check (#2323)
* add public links check

* more links for query parameters
2017-08-17 23:52:28 +08:00
aec826b023 fix template error on explore repos (#2319) 2017-08-17 15:20:21 +03:00
934dd41fa6 Make SHOW_USER_EMAIL also apply to profiles (#2258)
The e-mail address is currently only hidden from the explore page.
2017-08-17 17:08:03 +08:00
7907786040 Trigger sync webhooks on UI commit (#2302)
* Trigger sync webhooks on UI commit

* Also fix UI upload/delete
2017-08-17 15:22:08 +08:00
951fb572a7 Fix and improve dashboard repo UI (#2285)
* Fix and improve dashboard repo UI

* Change order of scripts loading

* Remove "mirror" tab

* Remove single tab panel for "org user"

* Add localization strings

* Create vue component and change event for search

* Add "mirrors" filter
2017-08-17 09:31:34 +08:00
722bcefbbf refactor(Makefile): allow overriding default go program (#2310) 2017-08-16 08:46:41 +08:00
c76ee5688b Revert to upstream ini dependency (#2304) 2017-08-14 10:37:41 -03:00
fc29a405e8 More tweaks to repo top panel (#2267)
* More tweaks to repo top panel

* undo hiding of compare button on master

* attempt to fix ci issue

* another ci attempt
2017-08-13 19:49:38 -03:00
29f3a6e492 Fix rendering of external links (#2292) 2017-08-13 19:30:27 -03:00
2282e24028 Use /dev/urandom to create random password (#2298)
* Make sure generated password is random

Use /dev/urandom to get a 32 char password

* Make sure generated password is random

Use /dev/urandom to generate 32 char password

* Make sure generated password is random
2017-08-13 14:18:05 +08:00
f960e19c59 Only update needed columns when update user (#2296)
* only update needed columns when update user

* fix missing update_unix column
2017-08-12 22:18:44 +08:00
921d90fd8b fix 500 error when view an issue which's milestone deleted (#2297) 2017-08-12 10:15:30 +08:00
be29d5f7ad fix webhook link 2017-08-11 03:45:54 +02:00
e90bbcaa52 Comment help text for issues (#2281) 2017-08-09 12:13:33 +08:00
27798c3efc Temporarily patch go-ini/ini with fork (#2255) 2017-08-07 09:42:48 +08:00
54381f438b File path tweaks in UI (#2264) 2017-08-06 11:13:20 +08:00
d05150a331 Make short link pattern greedy (#2259)
Multiple links on the same line are currently not recognized correctly.
2017-08-06 00:52:19 +03:00
a3262636b8 update drone sig file. (#2262)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-08-05 12:15:20 +03:00
9ff371a147 ignore coverage steps. (#2257)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-08-04 22:08:50 +08:00
G
34df9deff1 Convert xorm literal queries to method calls (#2253) 2017-08-04 12:42:51 +08:00
fa8d40faca Fix internal requests when gitea listens to unix socket or only external IP (#2234)
* Fix internal requests when gitea listens to unix socket or only external IP

* When Gitea is set to listen using FastCGI use AppURL for LocalURL
2017-08-03 23:32:13 +08:00
a4ca54425f update code.gitea.io/git in vendor to fix #2245 (#2250) 2017-08-03 21:48:36 +08:00
4c54139afc add changelog of release v1.1.3 (#2252) 2017-08-03 16:15:39 +08:00
7e0654bd9e Fix counts on issues dashboard (#2215)
* Fix counts on issues dashboard

* setupSess -> setupSession

* Unit test

* Load repo owners for issues
2017-08-03 13:09:16 +08:00
f29458bd3a EnableUnit() -> UnitEnabled() (#2242) 2017-08-02 11:46:54 +03:00
539d9f4c30 Fix git version check with four digits (1.8.3.1) (#2236) 2017-08-01 21:59:22 +03:00
G
66e8262530 Replace calls to xorm UseBool with Where (#2237) 2017-08-01 13:47:31 +08:00
31411a9462 Prevent selection of diff line numbers (#2240) 2017-08-01 10:27:17 +08:00
a804f0e052 go get github.com/wadey/gocovmerge when needed (#2235) 2017-07-31 09:29:50 +08:00
1193627014 Fix Commits nil pointer dereference (#2203) 2017-07-31 09:23:10 +08:00
9a505fafda Improve docs for PROTOCOL and HTTP_ADDR options (#2231)
Fixes: #2230
2017-07-30 23:07:23 +03:00
d74d8ecc2e Generate small and large logos at 4x resolution (#2233)
To support High-DPI displays, generate images at 4 times their displayed
resolution, which should be enough to support all current devices
according to https://material.io/devices/.
2017-07-30 23:04:01 +03:00
27c2dcf60e Fixed robots.txt 404 error (#2226)
* Update routes.go

* Update routes.go
2017-07-30 22:32:10 +08:00
49df677c47 Check for access in /repositories/:id (#2227)
* Check for access in /repositories/:id

* Integration test
2017-07-30 09:13:33 +08:00
a9cc538ab5 remove unused variable on makefile (#2225) 2017-07-29 12:22:10 +03:00
60d7e56c69 Add task to generate images from SVG and change to new logo (#2194)
* Add makefile task to generate images from SVG and change to new logo

* use absolute path on generate-images
2017-07-28 13:51:20 +08:00
04c4028aea fix some bug 2017-07-28 13:49:36 +08:00
fd45a032a7 Fix bare-repo bugs (#2199)
* Fix bare-repo bugs

* Integration tests

* Unused import
2017-07-27 12:23:38 +03:00
aff11bc65e Fix hooks for integration repo (#2216) 2017-07-27 14:12:56 +08:00
a27863b6d1 Fix issue updated_unix bug (#2204) 2017-07-27 09:20:38 +08:00
5f37944dff Fix unclosed session bug (#2214) 2017-07-26 17:30:47 +08:00
7e12aac61c Only allow token authentication with 2FA enabled (#2184)
* Don't allow for plain username/password authentication when 2FA is enabled

* Removed debugging statement

* Don't assume a token belongs to a given user, handle two-factor errors properly

* Simplified user/token matching, refactored error handling for two-factor authentication

* Change authentication response to avoid bruteforcing

* Add TODO item as a comment for changing the response for security purposes
2017-07-26 15:33:16 +08:00
1d032f5220 Fix compiling without sqlite and gcc (#2177) 2017-07-26 15:27:30 +08:00
41cc110e62 Use sqlite3 database as default for Docker image (#2182)
Signed-off-by: Tao Wang <twang2218@gmail.com>
2017-07-26 15:21:23 +08:00
8f171210b9 Revert "Add ability to fork your own repos (#761)" (#2193) 2017-07-26 15:17:38 +08:00
48898e5d0b Fix PR nil-dereference bug (#2195)
* Fix PR nil-dereference bug

* Revert to original error format
2017-07-26 15:16:45 +08:00
dde0052ca2 Fix key usage time update if the key is used in parallel for multiple operations (#2185) 2017-07-20 11:15:10 +08:00
3702dac0d5 Fix profile update for non-local users (#2178) 2017-07-19 09:36:37 +08:00
f33e6ae09e Remove unit types commits and settings (#2161)
* Remove unit types commits and settings

* Can not limit units in administrator teams

* Limit changing units only to teams with read and write access mode

* Small code optimization
2017-07-17 10:04:43 +08:00
047a67a90b Refactor vue delimeters to use es6 template delimeters (#2171) 2017-07-15 22:22:26 +08:00
0b177574c9 Only show SSH clone URL if signed in (#2169) (#2170)
* Add configuration flag SSH_EXPOSE_ANONYMOUS

If this flag (default True) is set to false, the SSH clone URL will only be exposed if the current user is signed in.

* Default SSH exposure set to false

To match GitHub and for security reasons, SSH URL exposure is disabled by default.
In addition to that. minor code changes have been applied.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>

* Add integration tests

* Hide clone button neither HTTP and SSH is enabled

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
2017-07-15 22:21:51 +08:00
32f289ae3b Make compare button URL aware if current repo is a fork (#2162) (#2163)
* Make compare button URL aware if current repo is a fork (#2162)

* Optimize code

* To not change current behaviour check if signed in user has fork of base repository

* Fix to check only if signed user has forked repo otherwise it will still redirect to wrong page
2017-07-15 11:14:02 +08:00
bit
98c5a1e006 Only show "No Description" to repo admins (#2167)
Only show note about missing description ("No Description") to repo admins, nobody else can change it.
2017-07-14 20:30:03 +03:00
dd758ad8dc More integration tests for comment API (#2156) 2017-07-14 01:33:26 +03:00
c4ccf16c43 Fix OpenID registration route (#2160)
Fixes #2101
2017-07-13 23:58:53 +03:00
6a3c03762a API: support '/orgs/:org/repos' (#2047)
* API: support '/orgs/:org/repos'
2017-07-13 13:14:15 +02:00
f011d6d4d7 fix: replace tmp with TMPDIR. (#2152) 2017-07-13 14:09:29 +03:00
b639fa1648 Ignore invalid issue numbers in commit messages. Fixes #2022 (#2150) 2017-07-12 22:35:47 -05:00
7d61834dc9 Update code.gitea.io/git dependency (#2149) 2017-07-12 22:35:21 -05:00
a739991b36 Fix repository settings collobration list display (#2151) 2017-07-12 22:32:28 -05:00
858324c21a Fix username rendering bug (#2122)
* Fix username rendering bug

* XSS integration test

* Migration to unescape user full names
2017-07-12 17:58:52 +03:00
2c3efd72ce fix typo (#2145)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-12 16:52:00 +08:00
2b05b104ef Add verify changed less-file step to Makefile (#1861) 2017-07-12 04:28:57 +02:00
89845f6728 Fix SHA1 hash linking (#2143)
This changes the regex to look for a hash from 7 to 40 characters,
to match the use of abbreviated hash lookups in both git and github.
The restriction of not being a pure number is also removed because
1234567 is now considered a valid abbreviated hash, as is deadbeef.

A note has been added to the top of the code to state that the
literal regex match is fine, but no extra validation is currently
performed so some false positives are expected.

A future change could ensure that the hash exists in the repository
before rendering it as a link, although this might incur a slight
performance penalty.

Reverts part of commit 4a46613 and fixes #2053.
2017-07-12 04:26:54 +02:00
ceb3544697 Small grammar fixes (#2144) 2017-07-12 04:25:45 +02:00
93a1de4842 Fix repo API bug (#2133)
Don't require token when not necessary
2017-07-12 03:23:41 +02:00
da89afda58 feat: upgrade drone docker image to support multi-stage build. (#1732)
* feat: upgrade drone docker image to support multi-stage build.

* update drone sig file.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update drone sig file.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-11 02:16:18 -05:00
8f1d62ad3b Fix GET /users/:username/repos endpoint (#2125) 2017-07-10 14:07:39 +03:00
c016d48735 Use POSIX complaint ! operator in find (#2132)
* Use POSIX complaint ! operator in find

-not is a GNU extension and not all find(8) implementations
support it. It's just an alias for ! which is POSIX compliant.

Now gitea compiles on NetBSD at least.

* Revert change in vendor directory as requested
2017-07-10 09:48:46 +08:00
5e9bcb6301 Missing signed commit display translation (#2134) 2017-07-10 09:46:06 +08:00
89cd4dd424 Cache session cookies in tests (#2128) 2017-07-09 10:07:29 +08:00
4c57db7924 Remove unused files (#2124) 2017-07-07 21:52:30 +02:00
f1adaef458 Less verbose integration tests (#2123)
* Helper functions for intergration test boilerplate
2017-07-07 21:36:47 +02:00
5651cc7413 Merge pull request #2119 from ethantkoenig/fix/wiki
Fix wiki preview links
2017-07-07 11:00:31 -03:00
e58237ee3f Fix import order 2017-07-06 16:38:38 -04:00
e14ea9979b Relative URL tests 2017-07-06 12:46:31 -04:00
b1d7348a20 Fix wiki preview links 2017-07-06 12:07:15 -04:00
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
2ef33b5338 vendor: update sqlite to fix "database is locked" errors (#2116)
closes #2040

upstream commit: acfa601240
2017-07-06 14:43:30 +08:00
a52cd59727 Fix unchecked error bug (#2110) 2017-07-04 09:30:41 +08:00
2fd039864b Fix missing-return bug (#2109) 2017-07-04 09:29:57 +08:00
310866525b Sync latest translations from crowdin (#2104) 2017-07-03 21:44:20 +08:00
dde9a8648e Add make command update-translations for update translations from crodwin (#2097)
* add make command update-translations for update translations from crowdin to options/locale

* use curl & resolve double quote on make file
2017-07-03 16:37:00 +03:00
f189ccd2d6 Fix git hooks update to receive required arguments. Fixes #2090 (#2095)
* Changed migration calling so that migrations can use models package
2017-07-02 21:50:57 +08:00
f99489d5c5 Fix API for branches with slashes (#2096) 2017-07-02 10:03:57 +08:00
fea902adc8 Check for valid renamed usernames (#2077)
* Check for valid renamed usernames

* Integration test

* Test for username with space

* Make name field required
2017-07-01 22:48:29 +03:00
678fec3f6a upgrade git source code. (#2094)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-01 23:05:01 +08:00
eae9154811 Fix SQL bug in models.PullRequests 2017-07-01 14:08:43 +03:00
3c0705ecf3 Absolute path for setting.CustomConf (#2085) 2017-07-01 11:10:04 +08:00
12cb6cd3c9 Merge pull request #2087 from Bwko/fix_error_exit
Fix exit status 1 not handled @ getMergeCommit (#2087)
2017-06-30 15:46:49 +03:00
b36849dc1f Fix exit status 1 not handled @ getMergeCommit 2017-06-30 12:35:26 +02:00
8fd43f215c Revert "Reduce number of layer" (#2086)
This reverts commit 789188f13c93e47b8a758c379bd463f7c2792f13.
2017-06-30 01:10:37 -05:00
789188f13c Reduce number of layer (#2078)
Somes layer are created and aren't usefull, so I compress this :)
2017-06-30 08:58:57 +08:00
935b40fd8e Merge pull request #2083 from ethantkoenig/check_err/org_avatar
Don't ignore gravatar error
2017-06-29 21:30:05 -03:00
2b410e44b2 lint 2017-06-29 12:11:34 -04:00
05e3726415 Use default avatar on error 2017-06-29 12:10:33 -04:00
783b1967e2 Fix release display and correct paging (#2080) 2017-06-29 23:11:38 +08:00
23f0728879 Don't ignore gravatar error 2017-06-29 10:37:55 -04:00
33f3165296 remove unnecessary blank lines and wrong error log 2017-06-28 19:00:08 +02:00
3f9016430f Pagination on releases page (#2035)
* Added count to GetReleasesByRepoID so pagination will work

* Separated it out to a new function, can then also leave the API part unaffected

* Remove extra whitespace added in untouched function

* Added comment and corrected name in error handler

* Account for if the user is owner or not in the count

* Also check if repo is draft

* revert back to the correct count in the ReleasesToDisplay loop

* Fixed lint error regarding else with return statement

* Use Cond struct instead of string, corrected name in error handler

* Removed unused return variable names
2017-06-28 22:47:00 +08:00
1f4d84b7b2 Update git module (#2074) 2017-06-28 22:43:58 +08:00
858197b453 Fix #1271: Call location.reload after XHR finishes (#2071)
location.reload was being called when the related dropdown
was hidden, even if a request initiated before to update this
value hadn't finished. This caused troubles on Firefox.
2017-06-28 16:55:28 +08:00
6b13dafe61 Fix org hooks UI (#2072) 2017-06-28 16:53:50 +08:00
d389ed25a5 Fix: http: multiple response.WriteHeader calls (#2038)
We can't change the http status code here, because the response has been written.
2017-06-28 14:08:47 +08:00
32fc44aa83 Make time diff translatable (#2057) 2017-06-28 13:43:28 +08:00
9d8fba62b3 Smaller watch, star, and fork buttons (#2052) 2017-06-28 09:40:28 +08:00
79daf31058 Setting to disable authorized_keys backup (#1856)
* Add setting to disable authorized_keys backup when rewriting public keys

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Update default value to comply with documentation

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Use tmp-file instead of bak-file for saving manually added keys.

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Change casing

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Change casing and build bakpath with sprintf only

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Only close file once

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Do not modify calcFingerprint

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Fix casing

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Change style from disable to enable

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Change name, just SSH_BACKUP_AUTHORIZED_KEYS

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Do not check for directory existence if backup is disabled

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>
2017-06-28 09:35:35 +08:00
a037cd81ff Add link to forum in issue template (#2070) 2017-06-28 09:33:37 +08:00
80707c4736 Fix default ghost assignee bug (#2069) 2017-06-28 09:27:12 +08:00
5db8cf3bd1 Always return valid go-get meta, even if unauthorized (#2010)
* Always return valid go-get meta, even if unauthorized

* don't leak information
2017-06-26 09:06:40 +08:00
49d397a9ee drone sign -.- 2017-06-25 21:51:55 +02:00
441986a473 Fix "Dashboard shows deleted comments" (#1995) 2017-06-25 20:20:29 +02:00
735676267e Integration tests for issues API (#2059) 2017-06-25 22:51:07 +08:00
4c0e567062 Fix improper setup for integration tests (#2050) 2017-06-25 17:34:30 +08:00
b4e8a7c4d1 Skip sqlite integration in CI (#2058) 2017-06-25 17:34:07 +08:00
2559a34b97 Load label ID in NewLabels (#2045) 2017-06-25 14:15:09 +08:00
f64c232953 Improve integration test helper functions (#2049)
Set request headers in helper functions, and new helper for requests with string-formatted URLs
2017-06-25 08:15:42 +08:00
3ffedeab03 Fix bug in issue labels API (#2048) 2017-06-25 07:52:51 +08:00
bf187304dc Fix wording (#2024)
* Fix wording

* Update locale_en-US.ini

* Update keys_gpg.tmpl
2017-06-24 01:37:03 -05:00
f2afed3098 Enable assignee e-mail notification (#2003)
* Enable assignee e-mail notification

* Check assignee and doer to avoid self made comment notifications.

* Assignee not always defined

* New method to avoid error when assignee deleted

* Assignee empty check
2017-06-23 21:43:37 +08:00
09cb999145 add missing lfs config on example file (#2039)
* add missing lfs config on example file

* leveal jwt secret empty
2017-06-23 03:39:17 -05:00
f6450b8f92 remove deprecated code for Gogs compitable (#2041) 2017-06-23 14:29:53 +08:00
c259c436d7 update git module (#2037) 2017-06-23 08:06:43 +08:00
cc6b3f60c6 Fix displaying commits and files of PR created from now deleted fork (#2023)
Fix displaying commits and files of PR created from now deleted fork
2017-06-22 19:40:47 +02:00
228247511a repo/editor: fix breadcrumb path cuts parent dirs (#3859) (#2032) 2017-06-22 23:30:47 +08:00
75b5be236a Display config file path on admin panel (#2030) 2017-06-22 08:21:56 -05:00
32f1c41f28 ROOT_URL setting use the default as shown in conf/app.ini (#1823)
The well commented conf/app.ini file that comes with the code shows the
ROOT_URL (i.e. setting.AppURL) as:

    ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/

However the installed custom/conf/app.ini file does not include this setting as
shown, and the default in the setting module was hard coded to
http://localhost:3000/ instead of what is shown above.

With this change the ROOT_URL will default to what is shown above if it is not
set in the custom/conf/app.ini.

Of course it is still possible to override the default by adding the ROOT_URL
setting to your custom/conf/app.ini file as usual.

Signed-off-by: Mike Fellows <mike.fellows@shaw.ca>
2017-06-22 15:35:14 +08:00
2852cca99e Add discourse link (#2027) 2017-06-22 09:07:13 +08:00
902a749fd9 Fix fast-forward PR bug (#1989) 2017-06-22 09:06:57 +08:00
826c606952 Keep sort when switching page (#2013) 2017-06-22 09:06:21 +08:00
d71fad2ab7 Fix #2001 and fix issue comments hidden (#2016)
* revert #2001 and fix issue comments hidden

* fix #2001

* fix import

* improve comment type

* reduce unnecessary join

* fix comment on FindCommentsOptions
2017-06-21 09:00:44 +08:00
0a5dc640a1 Make branch deletion URL more like GitHub's, fixes #1397 (#1994)
* Make branch deletion URL more like GitHub's, fixes #1397

* Add PR branch deletion integration test

* Do not allow deleting protected branch

* Change http error code to 403 if user has no write rights to repository

* Add check to not panic if forked repository has alrady been deleted
2017-06-21 09:00:03 +08:00
6db387a21e Refactor session close as xorm already does everything needed internally (#2020) 2017-06-21 08:57:05 +08:00
63504bf132 Fix displaying commits and files of PR created from now deleted forked repository 2017-06-21 01:25:38 +03:00
754482bf5d Add integration test for repository migration (#1983) 2017-06-20 19:23:16 +08:00
75f166b6b9 Update code.gitea.io/git (#2014) 2017-06-20 13:05:32 +08:00
165cf33771 Wrong PR merge commit ID saved (#2007) 2017-06-19 17:37:11 +08:00
4d2ea7dc41 Add integration test for issue creating (#2002) 2017-06-18 21:25:58 +08:00
255adc40ae Don't show non-comments in comments API (#2001) 2017-06-18 17:06:17 +08:00
4df1a24096 Let not-logged-in users view releases (#1999) 2017-06-18 11:38:24 +08:00
6e452c4da7 Update code.gitea.io/git (#1998) 2017-06-18 08:30:23 +08:00
b7812be33a fix misspell (#1996)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-18 08:30:04 +08:00
90f9bb12c6 fix golint error and rename func for suggestion. (#1997)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-17 11:29:59 -05:00
6233e88f7f Use testing benchmark interface (#1993) 2017-06-17 23:01:03 +08:00
d7570895cc update drone discord plugin to 0.0.4 version (#1992)
* update drone discord plugin to 0.0.3 version

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update to 0.0.4

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* update sig file.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-17 19:12:43 +08:00
1a906f800d Fix GPG email checking to be case insensitive (#1988) 2017-06-17 18:56:40 +08:00
6678593b3c fix typo (#1990) 2017-06-17 12:54:37 +08:00
e2ec4b7c23 fix bu ong normal user visit public repo (#1984) 2017-06-17 12:53:51 +08:00
8fc64741d9 Fix deleted milestone bug (#1942)
* Fix deleted milestone bug

* Use locale for ghost milestone name

* Fix pointer bug
2017-06-17 12:51:28 +08:00
ce9b86082c Consolidate boilerplate in integration tests (#1979) 2017-06-17 12:49:45 +08:00
a3868ef536 update drone sig file (#1981)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-15 21:32:14 -05:00
b7d597e40c Merge pull request #1976 from ethantkoenig/log/integration_test
Set console to debug for integration tests
2017-06-15 14:57:29 -03:00
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
d1e4af66c1 Set console to debug for integration tests 2017-06-15 08:12:30 -04:00
01322af2e8 Add integration test for pull-request merge (#1912) 2017-06-15 19:20:39 +08:00
13f0e1255a Fix typo (#1974) 2017-06-15 17:38:54 +08:00
792cde7081 Coverage reports for integration tests (#1960) 2017-06-15 17:38:33 +08:00
033aaf4b38 Add pull-create integration test (#1972) 2017-06-15 02:01:51 -05:00
2691673588 send notification if status changed (#1973)
send notification if status changed
2017-06-15 08:56:23 +02:00
0d560f3441 send notification if status changed
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-15 14:46:08 +08:00
8fcda0442e Fix search by issue type (#1914)
* Fix search by issue type
2017-06-15 05:09:03 +02:00
bf48c8ebdd SQLite has a query timeout. Hopefully fixes most 'database locked' errors (#1961)
* SQLite has a query timeout. Fixes 'database locked' errors
2017-06-15 04:51:17 +02:00
31b5e9177f fix collborators lack of units on orgnization repositories (#1968)
* fix collborators lack of units on orgnization repositories

* also change log level to debug
2017-06-15 04:50:12 +02:00
5b0cbf3788 switch gitter to discord for drone. (#1971)
* switch gitter to discord for drone.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* add event

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* only notify build fail message.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-15 10:47:42 +08:00
57cabb3ad3 Fix diff of renamed and modified file (#1967) 2017-06-14 04:07:09 -05:00
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
5e92b82ac6 Fix uppercase default branch bug (#1965) 2017-06-14 08:42:36 +08:00
96152c38b1 Fix bug in Action.loadRepo() (#1959) 2017-06-14 08:37:50 +08:00
0168b7073d Use monospace font in githook editor (#1958) 2017-06-13 10:48:49 +08:00
889409ba31 Fix setting.AppPath for integration tests (#1923)
Fix setting.AppPath for integration tests
2017-06-13 04:20:32 +02:00
e8c63e21af Fix missing backslash in Dockerfile.rpi (#1952) 2017-06-13 10:07:11 +08:00
b38b61bbc1 Fix import order (#1951) 2017-06-12 10:01:09 -05:00
635273cea6 Merge pull request #1829 from ethantkoenig/no_branches
Commitless repos should be bare
2017-06-12 11:05:01 -03:00
b5d2780b22 Merge pull request #1945 from appleboy/master
[ci skip] add 1.1.2 change log.
2017-06-12 15:26:18 +02:00
00733b4468 Add myself as a maintainer (#1948) 2017-06-12 08:11:50 -05:00
884c60480d [ci skip] add 1.1.2 change log.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-12 17:07:52 +08:00
ad70af1248 Add repo fork swagger (#1941) 2017-06-12 08:59:51 +08:00
91f27bf9bd Merge pull request #1940 from cez81/discord_links
Update links to Discord server
2017-06-11 19:41:08 -03:00
cc5484de10 Update links to Discord server 2017-06-11 19:42:08 +02:00
9fbdd7d787 Fix engine bug in getIssueByID (#1934) 2017-06-11 14:39:12 +08:00
e0a63a20e0 Fix errors caused by force push (#1927) 2017-06-10 21:59:13 -05:00
96b4780727 Gracefully handle bare repositories on API operations. (#1932)
Signed-off-by: Dennis Keitzel <github@pinshot.net>
2017-06-10 21:57:28 -05:00
f2fcd9dcd8 Support CRLF when splitting code lines for display (#1862)
* Support CRLF when splitting code lines for display

* refactor, fix mixed match

* fmt

* split on both LF and CRLF, use raw literals in regexes

* simplify
2017-06-10 23:20:25 +08:00
446a41d595 [ci skip] update discord badge. (#1930)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-10 21:38:00 +08:00
65b6301ea2 Change join chat from gitter to discord (#1929) 2017-06-10 07:40:56 -05:00
23d0735f90 Absolute path for setting.CustomConf 2017-06-09 22:27:13 -04:00
d3efca3982 Merge pull request #1926 from go-gitea/bkcsoft-update-changelog
Update changelog with v1.1.1
2017-06-10 03:07:09 +02:00
61716bd8f7 Display URLs in integration test logs (#1924) 2017-06-09 19:41:36 -05:00
6d613fb28e No highlighting for .txt files (#1922) 2017-06-09 19:39:16 -05:00
a5444fb3db Update changelog with v1.1.1 2017-06-10 02:10:25 +02:00
e9b1b908ee Fix setting.AppPath for integration tests 2017-06-09 15:42:48 -04:00
4a3f40460b Don't run 'make release' on PRs (#1908) 2017-06-09 09:52:23 +08:00
73836ce8c4 Fix ghost user bug (#1913)
Fix bug where unassigned issues would appear to be assigned to a ghost user
2017-06-09 09:51:31 +08:00
b1b8c5e9f4 Set TMPDIR enviroment variable for dump command (#1915) 2017-06-08 19:24:15 -05:00
662b8bc2a2 Add integration test for file editing (#1907) 2017-06-08 19:15:41 +08:00
afe1f1c4af Fix 500 in public activity page (#1901) 2017-06-08 03:48:49 -05:00
9ddc35e343 Cache ctx.User in retrieveFeeds (#1902) 2017-06-08 10:11:41 +08:00
ff7424179e Delete Public SSH Key tmp file after calculating fingerprint (#1855)
* Delete public key tmp file after calculating fingerprint

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Move line

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Remove defer statement

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Readd defer statement and move remove

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>

* Delete space

Signed-off-by: Magnus Lindvall <magnus@dnmgns.com>
2017-06-08 10:08:22 +08:00
65cf6cc848 Merge pull request #1905 from ethantkoenig/fix/org_api_auth
Require token before checking membership/ownership
2017-06-07 16:49:52 -03:00
a70073e768 Merge pull request #1904 from ethantkoenig/fix/org_api
Bug fixes for org member API
2017-06-07 16:49:33 -03:00
815715e5a2 Merge pull request #1896 from typeless/add-integration-test-for-forking
Add integration test for repository forking
2017-06-07 15:55:12 -03:00
4bc7240eee Merge pull request #1903 from camlafit/patch-1
A missing / to provide a correct endpoint
2017-06-07 15:50:13 -03:00
971e3a35c1 Require token before checking membership/ownership 2017-06-07 12:20:32 -04:00
f38842320e Bug fixes for org member API 2017-06-07 12:10:35 -04:00
952cb8046f A missing / to provide a correct endpoint
solve #1899
2017-06-07 17:57:28 +02:00
30a831698e Add integration test for repository forking 2017-06-07 20:02:37 +08:00
d9a8eff2de Send mails as HTML as default. Setting for send as plain text. (#1648)
* Send mails as HTML as default. Setting for send as plain text.
 * Add new option SendAsPlainText. remove EnableHTMLAlternative
 * Send HTML mails as default
 * Add html check if html2text should be performed

* Send only multipart or plain. Add deprication warning for ENABLE_HTML_ALTERNATIVE

* Still use ENABLE_HTML_ALTERNATIVE for backward compatibility

* Changed to not ignore html2text errors
2017-06-07 09:14:31 +08:00
295f560a12 Merge pull request #1892 from sapk-fork/update-git
Update code.gitea.io/git
2017-06-06 16:35:05 -03:00
0cf89a83c1 Update code.gitea.io/git 2017-06-06 19:36:48 +02:00
f6b58964d7 Include formatting check to the make test (and thus also check) rule (#1366)
* Include formatting check to the `make check` rule

... and give it its own standalone target too (make fmt-check)

Show diff on fmt-check failure
Do not allow running "fmt-check" with incompatible go version
Also simplify the `fmt` rule

* Forbid running "make fmt" with Go version != 1.7 or 1.8

* Ignore bindata.go for spelling and formatting checks

also remove duplicated variable assignment for GOFILES

* Run `make fmt`
2017-06-06 08:53:16 -05:00
6ec07a6bd7 Make LocalCopyPath a setting instead of a hard-coded path (#1881) 2017-06-06 04:09:54 -05:00
cbdd5f787c Center-aligned login topbar (#1880)
* Center-aligned login topbar

* Center-align OpenID login
2017-06-06 15:05:06 +08:00
ca9169fbe9 Migration to fix existing owner team units (#1873) 2017-06-05 05:40:25 -05:00
ae922afa2d Prevent accidential selection of line numbers in code view (#1860) 2017-06-05 02:52:35 -05:00
703d18e50d feat: add check misspelling (#1877) 2017-06-05 02:49:46 -05:00
ed31dff5ab Merge pull request #1874 from ethantkoenig/typo/issue_test
Fix misspelled variables
2017-06-04 17:10:40 -03:00
858126bca1 Merge pull request #1875 from ethantkoenig/test/unused
Run unused test
2017-06-04 17:10:10 -03:00
9f9289fc68 Run unused test 2017-06-04 14:28:17 -04:00
1a09afc729 Fix misspelled variables 2017-06-04 13:39:08 -04:00
e7ae13deef fix: error from mktemp command in MacOS. (#1837)
* fix: error from mktemp command in MacOS.

* [ci skip] udpate temp name.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-04 03:48:18 -05:00
023cad4461 gofmt (#1868) 2017-06-04 11:10:16 +08:00
3e74b5cf51 Rename misnamed migration (#1867) 2017-06-04 11:09:50 +08:00
817a405118 Fix paginater length (#1866) 2017-06-04 11:07:20 +08:00
a97d6bf24b Use production version of vuejs. (#1869) 2017-06-04 11:04:42 +08:00
009a073990 Remove annoying difference in button heights. (#1853)
* Remove annoying difference in button heights.

Why was that even there?

See before & after: http://imgur.com/a/yKdUR

* (2/2) Remove annoying difference in button heights
2017-06-03 16:58:43 +08:00
2ec5dc1661 Fix 404 for external tracking issues (#1852)
* Fix 404 for external tracking issues

* Fix 404 for new/upload file
2017-06-03 00:56:36 -05:00
b900c04316 Display draft releases (#1854)
* Display draft releases

* Include ctx.User in user cache

* Integration test
2017-06-03 11:46:56 +08:00
036ce3f813 Fix bug in removeOrgRepo (#1858) 2017-06-02 20:06:09 -05:00
62f600cf1c Display all organization from user settings (#1739)
* Display all organization from user settings

* fix Tab selection

* Update locale_en-US.ini

* Add a condition for display Create organization button

* Remove french translation

* Remove unnecessary admin flag
2017-06-02 03:43:44 -05:00
976c2a05fa Fix change introduce by update of go-swagger. (#1727) 2017-06-01 23:35:31 -05:00
4e5ee2b67a Fix user profile activity feed (#1848)
* Fix user profile activity feed

* gofmt, and avoid overlapping database connections
2017-06-02 08:42:25 +08:00
5ca6867aaf Fix some mistakes (#1833)
* Fix some mistakes

* Fixes

* Not correct -> incorrect or invalid

* Update according to comments
2017-06-02 08:41:52 +08:00
04c6c31f8e fix: only run test coverage on master branch. (#1838) 2017-06-01 20:07:24 +02:00
abb19eff39 Update code.gitea.io/git (#1849) 2017-06-01 09:43:11 +08:00
31e8436a1c Use a better default MAX_GIT_DIFF_LINE_CHARACTERS (#1845)
Tests indicate that line length alone does not make browsers slow, so
increase the default threshold after which diffs get surpressed for line
length from 500 to a more reasonable 5000 characters.

Fixes: https://github.com/go-gitea/gitea/issues/1826
2017-05-31 20:10:11 -05:00
a977ab7889 Don't ignore error in getMergeCommit (#1843) 2017-05-31 19:51:24 -05:00
336e311a7c Fix locking bug in removeOrgRepo (#1842) 2017-06-01 08:41:14 +08:00
5554165a0c Fix pull request compare link (#1832)
* Fix pull request compare link

* Integration test
2017-05-31 09:47:42 -05:00
bfb44f8854 Fix status table race condition (#1835) 2017-05-31 16:57:17 +08:00
0f5b399e35 Add variable for docker tag (#1825)
Signed-off-by: Shunsuke Mie <sux2mfgj@gmail.com>
2017-05-31 09:16:51 +08:00
24859fe5b6 Fix FOUC on Firefox (#1728)
Firefox users will experience a flash of unstyled content on loading
various pages, this patch will fix this issue using Filament Groups
loadCSS library to asynchronously load the CSS responsible for the FOUC.

Will fix #1698.

Signed-off-by: Sondre Nilsen <nilsen.sondre@gmail.com>
2017-05-31 09:05:49 +08:00
642f844735 Fix PR template error (#1834) 2017-05-30 07:04:12 -05:00
474d636794 Update code.gitea.io/git (#1824)
* Update code.gitea.io/git

* Update function calls

* govendor fetch
2017-05-30 04:32:01 -05:00
367ff327ed Use ghost users in issues/PRs (#1831) 2017-05-30 14:08:36 +08:00
2525195749 use writeTmpKeyFile in calcFingerprint (#1828)
this makes calcFingerprint use SSH.KeyTestpath instead of os temp dir.
2017-05-29 19:51:16 +08:00
b93568cce4 xxx_active_code_live setting in printed in hours and minutes instead … (#1814)
* xxx_active_code_live setting in printed in hours and minutes instead of just hours

* Update app.ini description of xxx_code_lives settings
2017-05-29 02:35:47 -05:00
e0c6ab2d44 Add Gitea Webhook (#1755)
* Replace Gogs by Gitea

* Fix missing changes

* Create Gitea webhook and put Gogs webhook apart.
2017-05-29 02:17:15 -05:00
c85ff532e9 Commitless repos should be bare 2017-05-28 22:31:40 -04:00
e67ece26f0 Merge pull request #1750 from andreynering/dashboard-search-org-repos
More fixes for dashboard search
2017-05-27 17:40:09 -03:00
12dbdaac76 Fix private repo icon 2017-05-27 13:40:54 -03:00
bafd778c25 Fix invalid reference in feeds template (#1820)
* Fix invalid reference in feeds template

* Comment for GetActAvatar

* Add integration test
2017-05-27 11:34:11 +08:00
97f7f88bed Improve clarity between is_activated and prohibit_login (#1788)
It used to be unclear what the difference between the two are.
2017-05-27 09:14:13 +08:00
3b51da9dae resign drone and fix #1816 (#1819) 2017-05-26 23:08:38 +08:00
7e6ff69c00 Fix 500 for GET /teams/:id endpoints (#1811)
* Fix 500 for GET /teams/:id endpoints

* Integration test for GET /team/:id

* Clean up integration test
2017-05-26 08:15:45 -05:00
3611a3e552 fix bug to deny to add orgnization as a member of an orgnization or team (#1815) 2017-05-26 08:12:02 -05:00
39348cd27e Give all units to owner team (#1812) 2017-05-26 16:03:37 +08:00
9c66d1d9ea Fix deadlock in updateRepository (#1813) 2017-05-26 13:08:13 +08:00
0c332f0480 Fix activity feed (#1779)
* Fix activity feed

Preserve actions after user/repo name change

* Add missing comment

* Fix migration, and remove fields completely

* Tests
2017-05-26 09:38:18 +08:00
03912ce014 Adding #issuecomment to the URL in E-Mail notifications (#1674)
* Added comment's hashtag to url for mail notifications.

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

* Added comment's hashtag to url for mail notifications.
Added explanation to return statement.

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

* Added comment's hashtag to url for mail notifications.
Added explanation to return statement + documentation.

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

* Added comment's hashtag to url for mail notifications.

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

* Replacing in-line link generation with HTMLURL. (+gofmt)

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

* Replaced action-based model with nil-based model. (+gofmt)

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

* Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants.

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

* Updating comment for mailIssueCommentToParticipants

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2017-05-25 10:38:56 +08:00
cb74f1b84d Remove stale rule from Makefile (#1782) 2017-05-25 08:53:03 +08:00
ff96bda138 Only run coverage on merges/pushes to master (#1783) 2017-05-25 00:13:18 +08:00
19d889daa2 fix bug not to trim space of login username (#1796) 2017-05-25 00:12:00 +08:00
ff2464c87d Fix renaming bug (#1786) 2017-05-24 14:01:02 +08:00
98ae013e90 Make navbar scroll on overflow (#1777)
* Scrollbars on overflow of horizontal nav

* Update _base.less

* Add fade out on right side of overflowing nav

* Update _base.less
2017-05-24 14:00:40 +08:00
7b907ed348 Rename RepoCreationNum -> MaxCreationLimit (#1766) 2017-05-24 08:27:08 +08:00
de39d09caa Improve grammar (#1775) 2017-05-23 16:01:27 +08:00
bdc90aeaee Delete repo redirects on repo deletion (#1776) 2017-05-23 16:00:10 +08:00
cc2071c3fd Make side nav on dashboard stackable (#1778) 2017-05-23 15:58:43 +08:00
1e40c2e579 fix: #1757 fix set MAX_CREATION_LIMIT as zero. (#1762)
* fix: #1757 fix set MAX_CREATION_LIMIT as zero.

* fix: missing default value
2017-05-21 22:48:35 +08:00
b0308d86dc Fix unloaded owner (#1770) 2017-05-21 14:35:45 +08:00
cf02cd7ba0 Fix and test for delete user (#1713)
* Fix and test for delete user

* Run updates in batches

* Unit test
2017-05-20 16:48:22 +08:00
85a7396525 Add error direclty when user tries to create new repo and limit already hit (#1767) 2017-05-20 16:47:48 +08:00
be5323a05f Update HighlightJS and fix YAML files highlighting (#1764)
* Update HighlightJS to 9.11.0

* Fix YAML files highlighting
2017-05-20 11:52:35 +08:00
80cea8747f Admin should always be allowed to create repos even if hit limit (#1765) 2017-05-20 11:51:19 +08:00
977dcf96e0 fixes wrong after field in webhook payload (#1746) 2017-05-19 12:12:27 +02:00
281a0389c1 fix admin lost permission caused by #947 (#1753) 2017-05-19 12:10:17 +02:00
6362462da8 fix admin lost permission caused by #947 2017-05-19 08:59:26 +08:00
25d6e2a660 Add button to admin ui (#1738)
* Add button to admin ui

* Update according to review

* Update locale_fr-FR.ini

* Rollback to locale french file
2017-05-19 08:20:41 +08:00
0161e46b5a Add swagger comment for MirrorSync (#1747)
* Add swagger comment for MirrorSync

* Generate swagger.v1.json
2017-05-19 08:20:06 +08:00
8906b2891b Fix test
There was a panic when there's no logged in user
2017-05-18 14:35:06 -03:00
fd6034aaf2 Add units to team (#947)
* add units to team

* fix lint

* finish team setting backend

* finished permission controll on routes

* fix import blank line

* add unit check on ssh/http pull and push and fix test failed

* fix fixtures data

* remove unused code
2017-05-18 22:54:24 +08:00
5db5e16ab6 Correct grammar in APIEmpty documentation (#1748)
* Correct grammar in APIEmpty doc

* Generate swagger.v1.json
2017-05-18 22:39:42 +08:00
dc2b28ed76 Show repos acording to user/organization 2017-05-18 11:28:29 -03:00
c746875fcf Remove colaborative repo panel 2017-05-18 11:16:04 -03:00
8917f47347 Fix org repos not showing on dashboard search 2017-05-18 11:15:32 -03:00
407fbfa6ce fixes wrong after field in webhook payload
when merge pull request
2017-05-18 12:16:36 +07:00
c4b5b121a5 Fix bad grammar and wordiness (#1741)
* Fix bad grammar and wordiness

* Update locale_en-US.ini

* Update locale_en-US.ini

* Update locale_en-US.ini

* Update locale_en-US.ini

* Update locale_en-US.ini

* Update locale_en-US.ini

* Update locale_en-US.ini
2017-05-18 09:03:43 +08:00
03d6bab643 Change two factor code entry box from text to number (#1733) 2017-05-16 15:30:20 +08:00
bc299b8317 fix avatar update bug (#1729) 2017-05-16 08:36:09 +08:00
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
e214728725 Add new text for reset password flash (#1718)
* Forgot password should use ResetPwdCodeLives, not ActiveCodeLives
 * Improve documentation for different send mail functions related to password reset
 * Improve documentation in conf/app.ini regarding xxx_CODE_LIVE_MINUTES settings
2017-05-14 10:38:30 +08:00
9e627af9a4 gofmt (#1710) 2017-05-12 16:09:53 +08:00
5ca3046da6 Fix rendering of issue checkboxes (#1709) 2017-05-12 15:52:45 +08:00
2cf80f4b18 Hide the create organization button (in dashboard/organization section) (#1705)
when the user has no such permission.
2017-05-12 15:10:25 +08:00
397474ecb1 Added Parent property to the repo API (#1687)
Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
2017-05-12 11:09:26 +08:00
251fb935ff Don't recreate database in integration tests (#1697) 2017-05-11 23:32:43 +08:00
ddb63a7897 Correct spelling mistakes (#1703)
* Nitpicking
2017-05-11 09:03:34 +08:00
524885dd65 LDAP user synchronization (#1478) 2017-05-10 15:10:18 +02:00
fd76f090a2 markup: microoptimise for many short filenames in directory (#1534)
* markup: microoptimise for many short filenames in directory

Move strings.ToLower() after the early-return length check. This is a safe operation in all cases and should slightly improve directory listing performance when a directory contains many thousands of files with short filenames.

* markup: expand test cases for IsReadmeFile()
2017-05-09 22:20:22 +08:00
d98a86d2a2 remove sqlite tag when integration test with mysql/postgres AND recreate database when init integration test (#1693) 2017-05-09 15:42:55 +02:00
377acb9757 Realy don't cache apk index
Actualy the "-U --no-cache" effectivly is treated as --no-cache
was never specified:

/ # apk -U --no-cache add sed
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/1) Installing sed (4.2.2-r0)
Executing busybox-1.25.1-r0.trigger
OK: 4 MiB in 12 packages
/ # ls -la /var/cache/apk/
total 1004
drwxr-xr-x    1 root     root            70 May  8 11:08 .
drwxr-xr-x    1 root     root            29 Mar  3 11:20 ..
-rw-r--r--    1 root     root        732807 May  5 07:11 APKINDEX.c51f8f92.tar.gz
-rw-r--r--    1 root     root        293014 May  1 12:37 APKINDEX.d09172fd.tar.gz

So removing the "-U" fix this behavior.
2017-05-09 15:34:33 +02:00
ab79069dc7 Improve dashboard repo search (#1652)
* Add VueJS

* Improve dashboard search

* Fix tab switching

* Fix input autofocus
2017-05-09 08:31:30 +08:00
51d0becb42 Add configuration option for default permission to create Organizations (#1686) 2017-05-08 21:51:53 +02:00
a85c5ab9ff fix potential sqlite lock #1680 2017-05-08 10:02:44 +02:00
2bb8b3a562 fix bug when push a branch name with / & fix an integration test bug (#1689) 2017-05-08 10:55:27 +08:00
79494047b0 Show commit status icon in commits table (#1688)
* Show commit status icon in commits table

* Add comments

* Fix icons

* Few more places where commit table is displayed

* Change integration test to use goquery for parsing html

* Add integration tests for commit table and status icons

* Fix status to return lates status correctly on all databases

* Rewrote lates commit status selects
2017-05-07 22:40:31 +08:00
c864ccf9b1 Enforce netgo build tag while cross-compilation (#1690) 2017-05-07 22:06:30 +08:00
930d1759ae Remove env user salt since no need to use (#1515)
* remove env user salt since no need to use

* remove unused variable from update.go
2017-05-06 21:21:22 +08:00
9a0b0da1fe Fix commit sha1 URL rendering in markdown (#1677)
* Fix commit sha1 URL rendering in markdown

* Add unit test for commit sha1 markdown rendering when sha1 has space before it

* Change to better variable name
2017-05-05 16:49:13 +08:00
2e17dda8bb Remove sha1 hash display in repository table and add latest commit GPG check (#1678) 2017-05-05 15:15:36 +08:00
935caa7f95 Download files to their original filename (#1676) 2017-05-05 14:03:54 +08:00
98460a8d9d Exposes in API the Repo entity's Size and IsBare property (#1668)
* Exposes in API the Repo entity's IsBare property as IsEmpty

Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>

* Exposes in API the Repo entity's Size property

Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
2017-05-05 10:55:54 +08:00
36f02c0c32 fix potential sqlite lock 2017-05-05 10:13:48 +08:00
a503947fba Upgrade alpine to v3.5 in Dockerfile (#1633) 2017-05-05 08:47:20 +08:00
0f3923c4d7 fix potential lock when sqlite (#1647) 2017-05-05 08:47:03 +08:00
b6206e4788 Fix static files permission under public/ (#1675) 2017-05-05 08:42:28 +08:00
75f1afd1fd fix: tag contain character ) will http 500 on release page (#1670) 2017-05-04 23:38:34 +08:00
700b6b524b Add @lafriks as maintainer 2017-05-04 16:47:48 +02:00
a5f28a4544 gofmt (#1662) 2017-05-04 13:54:56 +08:00
1773e88643 Drop db operations from hook commands (#1514)
* move all database operations from hook command to web command and instead of internal routes

* bug fixed

* adjust the import path sequences

* remove unused return value on hookSetup
2017-05-04 13:42:02 +08:00
59f5bbab0d Fix CSS for wiki markdown (#1660) 2017-05-03 20:22:14 +08:00
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
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
0d1e001b9c fix multiple readme file rendering and fix #1657 (#1658)
* fix multiple readme file rendering and fix #1657

* remove unnecessary loop
2017-05-02 16:57:54 +08:00
98548c83d3 Add primary key and index to external login user table (#1656) 2017-05-02 16:41:44 +08:00
87efc8c6d4 Sort on repo size in admin panel (#1654)
* fix #1653 sort on repo size

* fix minor mistake in en-us locale
2017-05-02 16:34:28 +08:00
3792867955 Update xorm to latest version (#1651)
* Update xorm to latest version

* Update xorm/builder
2017-05-02 08:50:33 +08:00
0144817971 Do not allow commiting to protected branch from online editor (#1502)
* Do not allow commiting to protected branch from online editor

* Add editor integration tests for adding new file and not allowing to add new file to protected branch
2017-05-02 08:49:55 +08:00
3ebbdfaa75 make openid support default false for compitable with v1.1 (#1650) 2017-05-02 00:27:53 +08:00
950f2e2074 Additional OAuth2 providers (#1010)
* add google+

* sort signin oauth2 providers based on the name so order is always the same

* update auth tip for google+

* add gitlab provider

* add bitbucket provider (and some go fmt)

* add twitter provider

* add facebook provider

* add dropbox provider

* add openid connect provider incl. new format of tips section in "Add New Source"

* lower the amount of disk storage for each session to prevent issues while building cross platform (and disk overflow)

* imports according to goimport and code style

* make it possible to set custom urls to gitlab and github provider (only these could have a different host)

* split up oauth2 into multiple files

* small typo in comment

* fix indention

* fix indentation

* fix new line before external import

* fix layout of signin part

* update "broken" dependency
2017-05-01 21:26:53 +08:00
2368bbb672 Optimize png images via Google zopflipng [ci skip] (#1639) 2017-04-30 20:04:36 +08:00
66c803fae2 MySQL, Postgres integration tests in drone (#1638)
* MySQL, Postgres integration tests in drone

* Fix .drone.yml

* sign drone

* resign drone
2017-04-30 14:30:12 +08:00
0308d44a16 fix #1643 and improve integration test (#1645) 2017-04-30 13:08:09 +08:00
00324cea10 Limit clone depth when drone-building (#1644)
* Limit clone depth when drone-building

* sign drone
2017-04-30 12:32:30 +08:00
9a8ca3e877 Fix broken migration v27 (#1504)
Mirror.interval column type needed to be changed to bigint.
Correct interval where the interval set is < MinInterval.
2017-04-30 10:08:16 +08:00
1562e9ab70 Refactor Dockerfile
1. Use `apk -U --no-cache add` instead of `apk update` + `apk add` +
manually cache clean up.
2. Separate package installation and user, group setup, the combination
to reduce a docker image layer didn't bring benefits here, only makes
Dockerfiles more complex.
2017-04-29 21:05:25 +02:00
e31c02d4bf fix bug on issue view when not login (#1624)
* fix bug on issue view when not login

* hide issue watch when not login

* update the tests

* fix test on issue
2017-04-29 13:52:25 +08:00
61b08b5c01 bug fixed for API to get user's repos (#1622)
* bug fixed for API to get user's repos

* add tests and fix another place

* test user2 since user1 has no repos
2017-04-29 12:33:25 +08:00
cebe3a6b2f Revert "Set VERSION from git once, in a variable (#1447)"
This reverts commit 410af6971b87ac5dc7ac198f538d8383c1f47a1f.
2017-04-28 20:28:38 +02:00
91d64656a4 update git which fixes #1133 (#1614) 2017-04-28 16:20:58 +02:00
18f46fd7cf [ci skip] Add "Table of Contents" in CONTRIBUTING.md (#1634) 2017-04-28 21:56:28 +08:00
fca7ddc6ea improve integration test to resue models/fixtures and store git repos with tests (#1627)
* improve integration test to resue models/fixtures and store git repos with source

* use gitea-integration-meta dir instead .tar.gz and cleanup every before every test

* fix import package name
2017-04-28 21:23:28 +08:00
431b26f6d7 Handle display of GPG key without end date (#1628) 2017-04-28 08:44:58 +08:00
6853bf323a fix #1521 (#1621) 2017-04-27 20:15:56 +08:00
e3c2963222 remove unused vendor packages (#1620) 2017-04-27 18:10:34 +08:00
e4a0a04829 Add create_at and updated_at in PR json (#1616)
* Move new fields to object creation (use reference)
 * Vendor: Update SDK
2017-04-27 17:29:46 +08:00
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
b7da5a6cb7 Fix service description in Debian init file (#1538) 2017-04-25 19:30:42 +02:00
c58708d3ee Integration test framework (#1290)
* Integration test framework

* udpate drone sign

* Formatting fixes and move router.go to routers/

* update sign for drone
2017-04-25 15:24:51 +08:00
3012971e92 fix bug on status API (#1533) 2017-04-24 22:33:54 +08:00
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
fcc7cdab11 Fix markdown rendering (#1530) 2017-04-24 12:18:36 +08:00
5b8fe1e181 Do not show empty collaborators segment (#1531) 2017-04-23 08:55:02 +08:00
4bea219128 Status-API (#1332) 2017-04-21 19:32:31 +08:00
52627032bc Add markup package to prepare for org markup format (#1493) 2017-04-21 09:01:08 +02:00
f0db3da713 fix go get sub package and add domain on installation to let go get work defaultly (#1518)
* fix go get sub package and add domain on installation to let go get work defaultly

* fix import sequence

* fix .git problem
2017-04-21 10:43:29 +08:00
42072783c9 support health check via / and fix #969 (#1520) 2017-04-20 20:14:21 +08:00
bb14c97d40 Fix empty file download (#1506) 2017-04-20 10:38:56 +08:00
fa2a513c62 feat: add download count field and unit testing for attachment. (#1512)
* feat: add download count field and unit testing.

* fix: unit testing

* refactor: improve testing.

* fix: update comment

* add default value.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-04-20 10:31:31 +08:00
a2d365c81f fix #1501 ssh hangs caused by #1461 (#1513) 2017-04-19 19:16:36 +08:00
f995bcc87a Add repo mirror sync API endpoint (#1508)
* API: Add repo mirror sync

* Correct error message

* Change http status to 200
2017-04-19 19:09:49 +08:00
2eeae84cbd Add internal routes for ssh hook comands (#1471)
* add internal routes for ssh hook comands

* fix lint

* add comment on why package named private not internal but the route name is internal

* add comment above package private why package named private not internal but the route name is internal

* remove exp time on internal access

* move routes from /internal to /api/internal

* add comment and defer on UpdatePublicKeyUpdated
2017-04-19 11:45:01 +08:00
f42ec6120e Better URL validation (#1507)
* Add correct git branch name validation

* Change git refname validation error constant name

* Implement URL validation based on GoLang url.Parse method

* Backward compatibility with older Go compiler

* Add git reference name validation unit tests

* Remove unused variable in unit test

* Implement URL validation based on GoLang url.Parse method

* Backward compatibility with older Go compiler

* Add url validation unit tests
2017-04-19 11:02:20 +08:00
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
c764a542c0 Adding @sapk to MAINTAINERS (#1497) 2017-04-16 20:51:38 +08:00
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
237270ef50 Orgs: fix org page title when full name is not defined (#1495) 2017-04-15 10:02:46 +08:00
d409d3ab57 Sanitation fix from Gogs (#1461)
* Santiation fix from Gogs

* Linting

* Fix build-errors

* still not working

* Fix all the things!

* gofmt

* Add code-injection checks
2017-04-13 10:52:24 +08:00
21290d4e80 Optimize and fix autolink function (#1442) (#1444)
* Optimize and fix autolink function (#1442)

* Fix bug in autolink recursive fallback function
2017-04-12 16:01:08 +08:00
22295944df refactor: show command help message. (#1486) 2017-04-12 15:44:54 +08:00
be6edaddcb Repo size in admin panel (#1482)
* Implementation of the feature to view repository size in admin panel
 * Move GetRepoSize to git module
 * Repository.RepoSize -> Repository.Size
 * RepoSize -> Size in template
 * Redo a few bits and pieces
 * Update size when syncing mirror or forking
 * Remove GetRepoSize
 * Changed fatal errors to error message

* Copy migration code from Gogs

* make fmt
2017-04-11 21:30:15 +08:00
54f0293f0a Mirror sync interval specified as duration string (#1407)
* Sync interval specifed as duration string

* Changed mirror interval text

* make fmt

* Add MinInterval for mirror sync

* Use duration internally

* Changed min default to 10m

* make fmt

* Incorrect default

* Removed defaults in MustDuration()

* Add Mirror interval migration

* Default values corrected

* Use transaction during migration

* Change http 500 to page with error message

* Cleanup session.commit()
2017-04-08 23:27:26 +08:00
edbb9eefd6 Fix race when running commands with timeout (#1465)
Update vendored module code.gitea.io/git
2017-04-07 19:23:39 -07:00
5c0bee9b20 refactor update ssh key use time (#1466) 2017-04-07 17:40:38 -07:00
d9db188274 Fix #1418 (#1456) 2017-04-07 22:50:40 +08:00
e0df611cbc Autofocus on 2fa passcode fields (#1460)
* Autofocus on 2fa passcode field

* Autofocus on 2fa scratch code field
2017-04-07 06:07:37 -07:00
5acfc7c4bc fix migrate failed and org dashboard failed on MSSQL database (#1448) 2017-04-06 18:47:25 -07:00
cf6699fb4f fix gpg API panic when no verification (#1451)
* fix gpg API panic when no verification

* fix if condition
2017-04-06 18:40:05 -07:00
cbeeaa1b11 Fix and simplify repo branches UI (#1435) 2017-04-06 23:33:57 +08:00
410af6971b Set VERSION from git once, in a variable (#1447) 2017-04-06 23:32:28 +08:00
a78a0266c4 Correct broken unaligned load/store in armv5 (#1355)
Update vendor github.com/boltdb/bolt to take care of the issue #1354.
2017-04-05 18:50:33 -07:00
d800305b34 Commit search appearence fixes (#1254)
* Fix button text to be consisstent with rest of UI

* Make all commits checkbox look nicer
2017-04-05 18:32:59 -07:00
0cee52e0d3 fix: remove str2html from org full name (#1360)
* fix: remove str2html for security issue.

* fix: update
2017-04-05 18:31:31 -07:00
e7493e953f Corrected Mirror.NextUpdate not set (#1388) 2017-04-05 17:56:45 -07:00
2d1efcc270 Add GOFLAGS and EXTRA_GOFLAGS (#1438) 2017-04-05 16:10:32 +08:00
b746757209 Remove unused mutex field (#1440) 2017-04-04 01:54:02 -07:00
93c25c9a35 Fix races in the log module by using syncmap (#1421) 2017-04-03 10:22:26 +08:00
5d6b71fdbb fixes pull request hanging indefinitely when it contains normal and LFS file pointers (#1425) 2017-04-03 10:21:09 +08:00
21fd3da6f5 Fix disabled fields in repo settings UI (#1431) 2017-04-03 10:19:51 +08:00
37a34c1a28 Merge pull request #1410 from andreynering/notification/issue-watch
[Notifications Step 6] Per issue/PR watch/unwatch
2017-04-01 15:12:24 -03:00
f6e5ce65b2 Improve tests a little 2017-04-01 10:05:58 -03:00
e5c56fe30d Code style fixes 2017-04-01 09:58:20 -03:00
88112a5324 Fix "Error: No issue number specified" when pushing (#1393)
* Fix "Error: No issue number specified"  when pushing

* update pr
2017-03-31 18:05:39 -07:00
095e1f5155 Support for custom html meta (#1423)
* Support for custom html meta

* Changed html meta description default
2017-03-31 18:03:01 -07:00
6a39250579 Add length check for the return string (#1420)
* Add length check for the return string

* Differentiate error paths and logging messages

* Rectify error message
2017-03-31 16:42:23 +08:00
fac7a6fecf Merge pull request #1390 from Morlinest/commit-graph-UI
Use whole button (commit graph) as link
2017-03-30 20:29:57 -03:00
e6781d5488 Add unit tests for issue_watch 2017-03-30 20:20:08 -03:00
a90ffffb1a Use variables for times 2017-03-30 19:14:16 -03:00
18952c40f8 Add copyright headers 2017-03-30 19:11:58 -03:00
4b284f814c UI and translation improvements 2017-03-30 19:10:30 -03:00
4fa691c4dd Make issue in commit graph "clickable" (#1392) 2017-03-30 18:05:38 +08:00
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
caed86fc6e Fix lint 2017-03-29 21:18:28 -03:00
e4a33ed4d0 Add octicons to watch/unwatch buttons 2017-03-29 21:08:46 -03:00
cb362513f0 Add updated_unix column on issue_watch 2017-03-29 20:59:28 -03:00
aa6e949b3d Consider issue_watchers while sending notifications 2017-03-29 20:54:57 -03:00
b674460748 Add watch button on issue 2017-03-29 20:31:47 -03:00
a0d0de7233 Create issue_watch table 2017-03-29 19:55:40 -03:00
129b0d6a4b Allow ENABLE_OPENID_SIGNUP to depend on DISABLE_REGISTRATION (#1369)
* Allow ENABLE_OPENID_SIGNUP to depend on DISABLE_REGISTRATION

Omit the configuration variable (the default) to be dependent.
Fixes #1363

* Move OpenID settings under Service object

* Show OpenID SignUp and SignIn status in admin panel / configuration
2017-03-29 18:57:43 +08:00
08f7fded3c refactor: remove workaround after the golang 1.7 release. (#1349)
* refactor: remove workaround after the golang 1.7 release.

* remove unused import.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* refactor: Add remove function.

* refactor: rename

* refactor: update build flag
2017-03-29 10:05:23 +08:00
d0298ea2fb Use whole button as link 2017-03-27 12:46:46 +02:00
6a451a2b59 Minor improvements on commit graph UI (#1380)
* Make "Commit Graph" link a button and translate it

* Add title on Commit Graph page
2017-03-24 10:32:40 +08:00
ae9b02b079 Fix FCGI (over TCP) support (#1368) 2017-03-23 15:57:43 +08:00
fe94032f74 rewrite pre-commit, post-commit and options hooks (fixes #1250) (#1257)
* issue #1250, replace {pre,post}-receive and update hooks with a single shell script that does not require custom hooks to be a sh-script

* issue #1250, make script posix compilant

* v23, add migration script to update {pre,post}-receive and update hooks

* migration: use a more common name and rename v23 to v26 to avoid conflicts

* gofmt'ed and added copyright header

* fix SyncRepositoryHooks to also sync wiki repos
2017-03-23 09:12:51 +08:00
d330a23ce1 fix migration failed when authorized_keys is not exist (#1180) 2017-03-23 00:04:31 +08:00
d349f059af Cleaner IMO (#1361) 2017-03-22 22:30:40 +08:00
bbbd08edc1 Changed text when password reset disabled. (#1364)
Fixes #1340
2017-03-22 22:29:29 +08:00
1b1b85439e Remove href on first/last link when on first/last page (#1345)
Signed-off-by: Arthur Loupforest <arthur.loupforest@outlook.fr>
2017-03-22 19:37:47 +08:00
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
9224405155 LFS: Fix SSH authentication for trailing arguments (#1328)
Fixes #1296
2017-03-22 18:43:28 +08:00
c05bd1789c Reduce conditionals in signin/signup inner forms (#1138) 2017-03-22 00:50:56 +01:00
16732fbfde Removed email copyright year (#1348) 2017-03-21 18:00:39 +08:00
9a9f8fa25b Fix broken table layout (#1344) 2017-03-21 09:44:59 +08:00
f73e734411 Run "make fmt" with go-1.6 (#1333) 2017-03-21 08:55:00 +08:00
888dee3b5f fix delete user failed on sqlite (#1321) 2017-03-20 22:13:52 +08:00
bd8fe49076 fix wiki bugs (#1294) 2017-03-20 21:36:19 +08:00
dbabc35e71 Delete the useless code (#1335) 2017-03-20 21:17:07 +08:00
15f5d8e794 Reduce conditionals in signin/signup inner forms
by always using SignInLink and SignUpLink in the form action
2017-03-20 09:40:42 +01:00
5586445207 LFS: Return 404 for unimplemented endpoints (#1330)
Without this patch a 401 is returned for unspecified endpoints, making
the LFS client ask for HTTP credentials. This behaviour was introduced
with the new locking API:

https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md
2017-03-20 16:40:20 +08:00
9182a35f18 Show user OpenID URIs in their profile (#1314) 2017-03-20 09:31:08 +01:00
e1586898b2 Add change-password admin command (#1304)
* Add change-password admin command
2017-03-20 09:23:38 +01:00
97ee88975a Add captcha support to OpenID based signup 2017-03-20 08:58:00 +01:00
f00a4c8078 Gitea OpenID-2.0 login has been tested with livejournal.com too 2017-03-20 08:51:56 +01:00
a9de85d31d Improve style of user OpenID setting page (#1324)
* Improve user openid list CSS and regenerate CSS
2017-03-20 08:51:33 +01:00
608cd54a68 fix gpg wrong column types 2017-03-20 02:55:07 +01:00
430cc4f42a Use readonly input form to show the validated OpenID URI (#1308) 2017-03-20 09:50:24 +08:00
8bcb643a03 remove empty file (#1326) 2017-03-19 21:43:04 +08:00
2aad4a5f97 Use font-awesome OpenID icon more (#1320) 2017-03-19 16:25:24 +08:00
b57b0c6e40 Fix inconsistency in layout (#1316) 2017-03-18 19:00:09 +08:00
1c3bd436cc feat: Only use issue and wiki on repo. (#1297) 2017-03-18 18:59:07 +08:00
5ecb369dac Specify that time interval units are seconds (#1311) 2017-03-18 11:10:30 +08:00
71d16f69ff Login via OpenID-2.0 (#618) 2017-03-17 15:16:08 +01:00
0693fbfc00 Refactor repo/issue/view_content.tmpl (#1276) 2017-03-17 13:57:43 +08:00
7a81cd16c5 Refactor admin/auth/new.tmpl (#1277) 2017-03-17 13:55:04 +08:00
ebbcf6fe12 Allow push to init a wiki repo (#1279)
* allow push to init a wiki repo

* compact error check
2017-03-17 12:59:42 +08:00
3cf0e513e6 fix wrong log when push to a new branch (#1220) 2017-03-17 10:15:00 +08:00
925b252927 Fix missing less sources for oauth (#1288) 2017-03-17 08:49:24 +08:00
1476bf909e Make wording of commit search more clear 2017-03-17 01:34:35 +01:00
f1d2f16b54 Add notice that LFS mirroring is not supported (#1251)
* Add notice that LFS mirroring is not supported

* Drop German translation
2017-03-16 19:33:22 +08:00
447c9b428f Send notifications to partecipants in issue comments (#1217)
* Send notifications to partecipants in issue comments

Closes #1216

Includes test (still failing)

* Do not include "labelers" to participants

Fix test to expect what GetParticipants return
2017-03-16 09:34:24 +08:00
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
43c5469f81 Merge pull request #1258 from ethantkoenig/fix/access
Fix nil-dereference bug
2017-03-15 21:21:57 -03:00
efbb895ebe Cleaner ui for admin, repo settings, and user settings page (#1269) (#1270) 2017-03-15 23:39:38 +01:00
03d79983ee Cleaner UI for explore page (#1253) (#1255)
* Take navbar out of column
* Add styles to navbar
* Changed navbar classes
* Remove unneeded !important from index.css
* Remove unneeded !important from _explore.less
2017-03-15 19:55:12 +01:00
17f403fbcd Fix nil-dereference bug 2017-03-15 14:09:44 -04:00
780cb692d6 Make sure both scripts/ can live side by side (#1264) 2017-03-15 16:11:26 +01:00
42032fdecf Synced licenses with github repo (#1246)
* Added script to download licenses from github

* Synced licenses with github repo
2017-03-15 13:30:16 +01:00
a06c3ad2c0 Synced gitignores with github repo (#1245)
* Renamed scripts directory into contrib

* Added script to download gitignores from github

* Synced gitignores with github repo
2017-03-15 13:30:00 +01:00
09fe4a2ae9 Batch updates for issues (#926) 2017-03-15 02:10:35 +01:00
021904e4e6 Fix typos in models/ and modules/ (#1248) 2017-03-15 08:52:01 +08:00
ec0ae5d50c Refactor and fix incorrect comment (#1247) 2017-03-15 08:51:46 +08:00
7d8f9d1c46 Rename /forget_password url to /forgot_password
Also renames `forgot_password` translation key to
`forgot_password_title` and `forget_password` to
`forgot_password`

Includes entry in CHANGELOG about the breaking change
(and some markdown fixes in there)
2017-03-14 22:54:07 +01:00
8746fb3385 Fix migration comment (#1241) 2017-03-14 14:39:02 +08:00
79ec33fd60 Update locale_en-US.ini (#1235) 2017-03-14 11:24:46 +08:00
1ccdf19fae fix forget migration for wiki hooks (#1227) 2017-03-13 14:27:29 +08:00
be5738243c fix repo settings external tracker failed and check external urls (#1215) 2017-03-13 09:41:40 +08:00
08aae4952b Add myself to maintainers (#1229) 2017-03-13 08:48:39 +08:00
f0efb615c5 Add LibreJS support (#1201)
See See https://www.gnu.org/software/librejs/

Closes #1200
2017-03-12 22:50:20 +08:00
608bbedee1 fix 500 caused by branches settings introduced by #1198 (#1214) 2017-03-12 21:50:26 +08:00
0475e7351f Reserve the "explore" user/org name (#1222) 2017-03-12 09:39:38 +08:00
bdcc1a23e0 Add integration test for signup (#1135)
* Add integration test for signup

* Remove unused functions

* Refactoring

* Add repo_create_test.go

* Rollback the incomplete repo create test

* Comply with linter requirements and simplify the code a little bit
2017-03-11 22:30:29 +08:00
8a98a25d8e Show a link to password reset from password change and delete account (#862)
It's helpful when you forgot your password thus cannot change it
(can happen if you log in via OAuth2 or OpenID)

Also make sure that both the delete-account and password-change
links to forgot-password will have the primary email pre-filled
2017-03-11 17:11:54 +08:00
c99e7e1a62 Simplify RepositoryList.loadAttributes() (#1211) 2017-03-11 16:50:12 +08:00
3803f257fb Move user_follow to separate file (#1210)
Also add unit tests
2017-03-11 16:46:53 +08:00
1e3548b7e7 Unit tests for issue_list (#1209) 2017-03-11 16:46:23 +08:00
64214a9426 Search bar fixes for #1187 and #1205 (#1207) 2017-03-11 16:45:15 +08:00
e2b2fd6e78 fix #1189, commit messages containing a pipe (#1203) 2017-03-11 12:01:38 +08:00
ccc15b9e1a Make strings translatable (#1188) (#1198)
* Add strings to ini

* Make strings translatable (#1188)
2017-03-11 09:28:25 +08:00
74cde12677 Fix upgrade failed after ever rollback (#1194)
* fix upgrade failed after rollback

* fix upgrade failed after rollback

* fix possible upgrade twice fail after rollback
2017-03-10 23:43:51 +08:00
f5476bdbb1 bug fixed for delete repo failed (#1193) 2017-03-10 22:05:53 +08:00
656efdc1c7 fix ini format incomiptable with crowdin (#1177) 2017-03-10 19:40:25 +08:00
dbcd452758 rename OSX to macOS (#1176) 2017-03-10 16:20:17 +08:00
05f0c4bbf5 Dockerfile for aarch64 (#1128) (#1130) 2017-03-10 10:02:55 +08:00
5463640fe6 Fix double borders on edit page (#1152) (#1153)
* Fix double borders on edit page (#1152)

* Add border modifications to less file
2017-03-10 09:33:35 +08:00
4e716fb0fa add mssql to app.ini db config comment (#1172) 2017-03-10 09:33:19 +08:00
d87596aec4 Add MSSQL to issues template (#1171) 2017-03-10 09:31:57 +08:00
2551 changed files with 90324 additions and 23721 deletions

View File

@ -5,9 +5,10 @@ workspace:
pipeline:
clone:
image: plugins/git
depth: 50
tags: true
test:
build:
image: webhippie/golang:edge
pull: true
environment:
@ -19,11 +20,50 @@ pipeline:
- make generate
- make vet
- make lint
- make test
- make stylesheets-check
- make misspell-check
- make test-vendor
- make build
when:
event: [ push, tag, pull_request ]
test:
image: webhippie/golang:edge
pull: true
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- apk -U add openssh-client
- make test
when:
event: [ tag, pull_request ]
test-coverage:
image: webhippie/golang:edge
pull: true
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- apk -U add openssh-client
- go get github.com/wadey/gocovmerge
- make test-coverage
when:
event: [ push ]
branch: master
test-sqlite:
image: webhippie/golang:edge
pull: true
environment:
TAGS: bindata
GOPATH: /srv/app
commands:
- echo "Needs to be fixed" # make test-sqlite
when:
event: [ push, tag, pull_request ]
test-mysql:
image: webhippie/golang:edge
pull: true
@ -55,16 +95,18 @@ pipeline:
commands:
- make release
when:
event: [ push, tag, pull_request ]
event: [ push, tag ]
coverage:
image: plugins/coverage
server: https://coverage.gitea.io
when:
event: [ push, tag, pull_request ]
# coverage:
# image: plugins/coverage
# server: https://coverage.gitea.io
# when:
# event: [ push ]
# branch: master
docker:
image: plugins/docker
pull: true
repo: gitea/gitea
tags: [ '${DRONE_TAG##v}' ]
when:
@ -73,6 +115,7 @@ pipeline:
docker:
image: plugins/docker
pull: true
repo: gitea/gitea
tags: [ '${DRONE_BRANCH##release/v}' ]
when:
@ -81,6 +124,7 @@ pipeline:
docker:
image: plugins/docker
pull: true
repo: gitea/gitea
tags: [ 'latest' ]
when:
@ -125,8 +169,13 @@ pipeline:
event: [ tag ]
branch: [ refs/tags/* ]
gitter:
image: plugins/gitter
discord:
image: appleboy/drone-discord:0.0.4
webhook_id: ${WEBHOOK_ID}
webhook_token: ${WEBHOOK_TOKEN}
when:
event: [ push, tag, pull_request ]
status: [ changed, failure ]
services:
mysql:

File diff suppressed because one or more lines are too long

View File

@ -15,10 +15,14 @@ indent_size = 8
indent_style = tab
indent_size = 4
[*.{less,yml}]
[*.{less}]
indent_style = space
indent_size = 4
[*.{yml}]
indent_style = space
indent_size = 2
[*.js]
indent_style = space
indent_size = 4

View File

@ -1,9 +1,11 @@
1. Please speak English, this is the language all of us can speak and write.
2. Please ask questions or configuration/deploy problems on our Gitter channel: https://gitter.im/go-gitea/gitea
3. Please take a moment to search check that your issue doesn't already exist.
4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report.
**You MUST delete the content above including this line before posting, otherwise your issue will be invalid.**
<!--
1. Please speak English, this is the language all of us can speak and write.
2. Please ask questions or configuration/deploy problems on our Discord
server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io).
3. Please take a moment to check that your issue doesn't already exist.
4. Please give all relevant information below for bug reports, because
incomplete details will be handled as an invalid report.
-->
- Gitea version (or commit ref):
- Git version:
@ -11,6 +13,7 @@
- Database (use `[x]`):
- [ ] PostgreSQL
- [ ] MySQL
- [ ] MSSQL
- [ ] SQLite
- Can you reproduce the bug at https://try.gitea.io:
- [ ] Yes (provide example URL)
@ -25,4 +28,4 @@
## Screenshots
**If this issue involves the Web Interface, please include a screenshot**
<!-- **If this issue involves the Web Interface, please include a screenshot** -->

4
.gitignore vendored
View File

@ -26,7 +26,7 @@ _testmain.go
*.test
*.prof
coverage.out
*coverage.out
/modules/options/bindata.go
/modules/public/bindata.go
@ -36,6 +36,7 @@ coverage.out
*.log
/gitea
/integrations.test
/bin
/dist
@ -44,3 +45,4 @@ coverage.out
/indexers
/log
/public/img/avatar
/integrations/gitea-integration

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,22 @@
# Contribution Guidelines
## Table of Contents
- [Contribution Guidelines](#contribution-guidelines)
- [Introduction](#introduction)
- [Bug reports](#bug-reports)
- [Discuss your design](#discuss-your-design)
- [Testing redux](#testing-redux)
- [Vendoring](#vendoring)
- [Code review](#code-review)
- [Styleguide](#styleguide)
- [Sign your work](#sign-your-work)
- [Release Cycle](#release-cycle)
- [Maintainers](#maintainers)
- [Owners](#owners)
- [Versions](#versions)
- [Copyright](#copyright)
## Introduction
This document explains how to contribute changes to the Gitea project. It assumes you have followed the [installation instructions](https://docs.gitea.io/en-us/). Sensitive security-related issues should be reported to [security@gitea.io](mailto:security@gitea.io).
@ -81,13 +98,13 @@ The current release cycle is aligned to start on December 25 to February 24, nex
## Maintainers
To make sure every PR is checked, we have [team maintainers](https://github.com/orgs/go-gitea/teams/maintainers). Every PR **MUST** be reviewed by at least two maintainers (or owners) before it can get merged. A maintainer should be a contributor of Gitea (or Gogs) and contributed at least 4 accepted PRs. A contributor should apply as a maintainer in the [Gitter develop channel](https://gitter.im/go-gitea/develop). The owners or the team maintainers may invite the contributor. A maintainer should spend some time on code reviews. If a maintainer has no time to do that, they should apply to leave the maintainers team and we will give them the honor of being a member of the [advisors team](https://github.com/orgs/go-gitea/teams/advisors). Of course, if an advisor has time to code review, we will gladly welcome them back to the maintainers team. If a maintainer is inactive for more than 3 months and forgets to leave the maintainers team, the owners may move him or her from the maintainers team to the advisors team.
To make sure every PR is checked, we have [team maintainers](MAINTAINERS). Every PR **MUST** be reviewed by at least two maintainers (or owners) before it can get merged. A maintainer should be a contributor of Gitea (or Gogs) and contributed at least 4 accepted PRs. A contributor should apply as a maintainer in the [Discord](https://discord.gg/NsatcWJ) #develop channel. The owners or the team maintainers may invite the contributor. A maintainer should spend some time on code reviews. If a maintainer has no time to do that, they should apply to leave the maintainers team and we will give them the honor of being a member of the [advisors team](https://github.com/orgs/go-gitea/teams/advisors). Of course, if an advisor has time to code review, we will gladly welcome them back to the maintainers team. If a maintainer is inactive for more than 3 months and forgets to leave the maintainers team, the owners may move him or her from the maintainers team to the advisors team.
## Owners
Since Gitea is a pure community organization without any company support, to keep the development healthy we will elect three owners every year. All contributors may vote to elect up to three candidates, one of which will be the main owner, and the other two the assistant owners. When the new owners have been elected, the old owners will give up ownership to the newly elected owners. If an owner is unable to do so, the other owners will assist in ceding ownership to the newly elected owners.
After the election, the new owners should proactively agree with our [CONTRIBUTING](CONTRIBUTING.md) requirements on the [Gitter main channel](https://gitter.im/go-gitea/gitea). Below are the words to speak:
After the election, the new owners should proactively agree with our [CONTRIBUTING](CONTRIBUTING.md) requirements in the [Discord](https://discord.gg/NsatcWJ) #general channel. Below are the words to speak:
```
I'm honored to having been elected an owner of Gitea, I agree with [CONTRIBUTING](CONTRIBUTING.md). I will spend part of my time on Gitea and lead the development of Gitea.

View File

@ -1,10 +1,9 @@
FROM alpine:3.4
FROM alpine:3.5
MAINTAINER Thomas Boerger <thomas@webhippie.de>
EXPOSE 22 3000
RUN apk update && \
apk add \
RUN apk --no-cache add \
su-exec \
ca-certificates \
sqlite \
@ -14,10 +13,8 @@ RUN apk update && \
s6 \
curl \
openssh \
tzdata && \
rm -rf \
/var/cache/apk/* && \
addgroup \
tzdata
RUN addgroup \
-S -g 1000 \
git && \
adduser \
@ -27,7 +24,7 @@ RUN apk update && \
-u 1000 \
-G git \
git && \
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
ENV USER git
ENV GITEA_CUSTOM /data/gitea

40
Dockerfile.aarch64 Normal file
View File

@ -0,0 +1,40 @@
FROM multiarch/alpine:aarch64-v3.5
EXPOSE 22 3000
RUN apk --no-cache add \
su-exec \
ca-certificates \
sqlite \
bash \
git \
linux-pam \
s6 \
curl \
openssh \
tzdata
RUN addgroup \
-S -g 1000 \
git && \
adduser \
-S -H -D \
-h /data/git \
-s /bin/bash \
-u 1000 \
-G git \
git && \
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
ENV USER git
ENV GITEA_CUSTOM /data/gitea
COPY docker /
COPY gitea /app/gitea/gitea
ENV GODEBUG=netdns=go
VOLUME ["/data"]
ENTRYPOINT ["/usr/bin/entrypoint"]
CMD ["/bin/s6-svscan", "/etc/s6"]

View File

@ -1,10 +1,9 @@
FROM hypriot/rpi-alpine-scratch:v3.4
FROM multiarch/alpine:armhf-v3.5
MAINTAINER Thomas Boerger <thomas@webhippie.de>
EXPOSE 22 3000
RUN apk update && \
apk add \
RUN apk --no-cache add \
su-exec \
ca-certificates \
sqlite \
@ -14,10 +13,8 @@ RUN apk update && \
s6 \
curl \
openssh \
tzdata && \
rm -rf \
/var/cache/apk/* && \
addgroup \
tzdata
RUN addgroup \
-S -g 1000 \
git && \
adduser \
@ -27,7 +24,7 @@ RUN apk update && \
-u 1000 \
-G git \
git && \
echo "git:$(date +%s | sha256sum | base64 | head -c 32)" | chpasswd
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
ENV USER git
ENV GITEA_CUSTOM /data/gitea

View File

@ -12,3 +12,7 @@ Rémy Boulanouar <admin@dblk.org> (@DblK)
Sandro Santilli <strk@kbt.io> (@strk)
Thibault Meyer <meyer.thibault@gmail.com> (@0xbaadf00d)
Thomas Boerger <thomas@webhippie.de> (@tboerger)
Patrick G <geek1011@outlook.com> (@geek1011)
Antoine Girard <sapk@sapk.fr> (@sapk)
Lauris Bukšis-Haberkorns <lauris@nix.lv> (@lafriks)
Jonas Östanbäck <jonas.ostanback@gmail.com> (@cez81)

242
Makefile

File diff suppressed because it is too large Load Diff

View File

@ -3,19 +3,19 @@
# Gitea - Git with a cup of tea
[![Build Status](https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg)](https://drone.gitea.io/go-gitea/gitea)
[![Join the chat at https://gitter.im/go-gitea/gitea](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-gitea/gitea?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the Discord chat at https://discord.gg/NsatcWJ](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/NsatcWJ)
[![Join the Matrix chat at https://matrix.to/#/#gitea:matrix.org](https://img.shields.io/badge/matrix-%23gitea%3Amatrix.org-7bc9a4.svg)](https://matrix.to/#/#gitea:matrix.org)
[![](https://images.microbadger.com/badges/image/gitea/gitea.svg)](https://microbadger.com/images/gitea/gitea "Get your own image badge on microbadger.com")
[![Coverage Status](https://coverage.gitea.io/badges/go-gitea/gitea/coverage.svg)](https://coverage.gitea.io/go-gitea/gitea)
[![Go Report Card](https://goreportcard.com/badge/code.gitea.io/gitea)](https://goreportcard.com/report/code.gitea.io/gitea)
[![GoDoc](https://godoc.org/code.gitea.io/gitea?status.svg)](https://godoc.org/code.gitea.io/gitea)
[![Release](https://github-release-version.herokuapp.com/github/go-gitea/gitea/release.svg?style=flat)](https://github.com/go-gitea/gitea/releases/latest)
||||
|:-------------:|:-------:|:-------:|
| | | |
|:---:|:---:|:---:|
|![Dashboard](https://i.imgur.com/3iEQsux.jpg)|![Repository](https://i.imgur.com/glqFnj8.jpg)|![Commits History](https://i.imgur.com/ad1FEpi.jpg)|
|![Profile](https://i.imgur.com/q81EcGa.jpg)|![Admin Dashboard](https://i.imgur.com/L2CQeN0.jpg)|![Diff](https://i.imgur.com/cNuvMum.jpg)|
|![Issues](https://i.imgur.com/xCYRqaF.jpg)|![Releases](https://i.imgur.com/ILpRBCe.jpg)|![Organization](https://i.imgur.com/0BHnrcL.jpg)|
||||
## Purpose
@ -29,7 +29,7 @@ The goal of this project is to make the easiest, fastest, and most painless way
## Docs
For more information and instructions about how to install Gitea please look at our [documentation](https://docs.gitea.io/en-us/). If you cannot find some specific information, then head over to our [Gitter](https://gitter.im/go-gitea/gitea) channel to chat with us.
For more information and instructions about how to install Gitea please look at our [documentation](https://docs.gitea.io/en-us/). If you cannot find some specific information, then head over to our [Discord server](https://discord.gg/NsatcWJ) or [Matrix room](https://matrix.to/#/#gitea:matrix.org) to chat with us or use the [forum](https://discourse.gitea.io/).
## Contributing

View File

@ -3,19 +3,18 @@
# Gitea - Git with a cup of tea
[![Build Status](https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg)](https://drone.gitea.io/go-gitea/gitea)
[![Join the chat at https://gitter.im/go-gitea/gitea](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/go-gitea/gitea?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/NsatcWJ)
[![](https://images.microbadger.com/badges/image/gitea/gitea.svg)](https://microbadger.com/images/gitea/gitea "Get your own image badge on microbadger.com")
[![Coverage Status](https://coverage.gitea.io/badges/go-gitea/gitea/coverage.svg)](https://coverage.gitea.io/go-gitea/gitea)
[![Go Report Card](https://goreportcard.com/badge/code.gitea.io/gitea)](https://goreportcard.com/report/code.gitea.io/gitea)
[![GoDoc](https://godoc.org/code.gitea.io/gitea?status.svg)](https://godoc.org/code.gitea.io/gitea)
[![Release](https://github-release-version.herokuapp.com/github/go-gitea/gitea/release.svg?style=flat)](https://github.com/go-gitea/gitea/releases/latest)
||||
|:-------------:|:-------:|:-------:|
| | | |
|:---:|:---:|:---:|
|![Dashboard](https://i.imgur.com/3iEQsux.jpg)|![Repository](https://i.imgur.com/glqFnj8.jpg)|![Commits History](https://i.imgur.com/ad1FEpi.jpg)|
|![Profile](https://i.imgur.com/q81EcGa.jpg)|![Admin Dashboard](https://i.imgur.com/L2CQeN0.jpg)|![Diff](https://i.imgur.com/cNuvMum.jpg)|
|![Issues](https://i.imgur.com/xCYRqaF.jpg)|![Releases](https://i.imgur.com/ILpRBCe.jpg)|![Organization](https://i.imgur.com/0BHnrcL.jpg)|
||||
## 目标
@ -31,7 +30,7 @@ Gitea的首要目标是创建一个极易安装运行非常快速安装和
## 文档
关于如何安装请访问我们的 [文档站](https://docs.gitea.io/zh-cn/),如果没有找到对应的文档,你也可以通过 [Gitter - 英文](https://gitter.im/go-gitea/gitea) 和 QQ群 328432459 来和我们交流。
关于如何安装请访问我们的 [文档站](https://docs.gitea.io/zh-cn/),如果没有找到对应的文档,你也可以通过 [Discord - 英文](https://discord.gg/NsatcWJ) 和 QQ群 328432459 来和我们交流。
## 贡献流程

160
assets/logo.svg Normal file
View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46667 135.46667"
version="1.1"
id="svg8"
sodipodi:docname="logo.svg"
inkscape:version="0.92.1 r15371"
inkscape:export-filename=""
inkscape:export-xdpi="48.000004"
inkscape:export-ydpi="48.000004">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.70710678"
inkscape:cx="418.13805"
inkscape:cy="177.57445"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="false"
units="px"
width="256px"
showguides="false"
inkscape:window-width="1920"
inkscape:window-height="1137"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:measure-start="283.373,243.952"
inkscape:measure-end="290.267,236.527">
<sodipodi:guide
position="0,0"
orientation="0,512"
id="guide3699"
inkscape:locked="false" />
<sodipodi:guide
position="135.46667,0"
orientation="-512,0"
id="guide3701"
inkscape:locked="false" />
<sodipodi:guide
position="135.46667,135.46667"
orientation="0,-512"
id="guide3703"
inkscape:locked="false" />
<sodipodi:guide
position="0,135.46667"
orientation="512,0"
id="guide3705"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-161.53334)"
style="display:inline">
<path
style="fill:#609926;fill-opacity:1;stroke:#428f29;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="m 27.709937,195.15095 c -9.546573,-0.0272 -22.3392732,6.79805 -21.6317552,23.90397 1.105534,26.72889 25.4565952,29.20839 35.1916502,29.42301 1.068023,5.01357 12.521798,22.30563 21.001818,23.21667 h 37.15277 c 22.27763,-1.66785 38.9607,-75.75671 26.59321,-76.03825 -46.781583,2.47691 -49.995146,2.13838 -88.599758,0 -2.495053,-0.0266 -5.972321,-0.49474 -9.707935,-0.5054 z m 2.491319,9.45886 c 1.351378,13.69267 3.555849,21.70359 8.018216,33.94345 -11.382872,-1.50473 -21.069822,-5.22443 -22.851515,-19.10984 -0.950962,-7.4112 2.390428,-15.16769 14.833299,-14.83361 z"
id="path3722"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sscccccsccsc" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<rect
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.24757317;stroke-opacity:1"
id="rect4599"
width="34.762054"
height="34.762054"
x="87.508659"
y="18.291576"
transform="rotate(25.914715)"
ry="5.4825778" />
<path
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26644793px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 79.804947,57.359056 3.241146,1.609954 V 35.255731 h -3.262698 z"
id="path4525"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Layer 3"
style="display:inline">
<g
style="display:inline"
id="g4539">
<circle
transform="rotate(-19.796137)"
r="3.4745038"
cy="90.077766"
cx="49.064713"
id="path4606"
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" />
<circle
transform="rotate(-19.796137)"
r="3.4745038"
cy="102.1049"
cx="36.810425"
id="path4606-3"
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" />
<circle
transform="rotate(-19.796137)"
r="3.4745038"
cy="111.43928"
cx="46.484283"
id="path4606-1"
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" />
<rect
transform="rotate(26.024158)"
y="18.061695"
x="97.333458"
height="27.261492"
width="2.6726954"
id="rect4629-8"
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.27444693;stroke-opacity:1" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4514"
d="m 76.558096,68.116343 c 12.97589,6.395378 13.012989,4.101862 4.890858,20.907244"
style="fill:none;stroke:#609926;stroke-width:2.68000007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -8,10 +8,10 @@ package cmd
import (
"fmt"
"github.com/urfave/cli"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/setting"
"github.com/urfave/cli"
)
var (
@ -23,6 +23,7 @@ var (
to make automatic initialization process more smoothly`,
Subcommands: []cli.Command{
subcmdCreateUser,
subcmdChangePassword,
},
}
@ -57,8 +58,59 @@ to make automatic initialization process more smoothly`,
},
},
}
subcmdChangePassword = cli.Command{
Name: "change-password",
Usage: "Change a user's password",
Action: runChangePassword,
Flags: []cli.Flag{
cli.StringFlag{
Name: "username,u",
Value: "",
Usage: "The user to change password for",
},
cli.StringFlag{
Name: "password,p",
Value: "",
Usage: "New password to set for user",
},
},
}
)
func runChangePassword(c *cli.Context) error {
if !c.IsSet("password") {
return fmt.Errorf("Password is not specified")
} else if !c.IsSet("username") {
return fmt.Errorf("Username is not specified")
}
setting.NewContext()
models.LoadConfigs()
setting.NewXORMLogService(false)
if err := models.SetEngine(); err != nil {
return fmt.Errorf("models.SetEngine: %v", err)
}
uname := c.String("username")
user, err := models.GetUserByName(uname)
if err != nil {
return fmt.Errorf("%v", err)
}
user.Passwd = c.String("password")
if user.Salt, err = models.GetUserSalt(); err != nil {
return fmt.Errorf("%v", err)
}
user.EncodePasswd()
if err := models.UpdateUserCols(user, "passwd", "salt"); err != nil {
return fmt.Errorf("%v", err)
}
fmt.Printf("User '%s' password has been successfully updated!\n", uname)
return nil
}
func runCreateUser(c *cli.Context) error {
if !c.IsSet("name") {
return fmt.Errorf("Username is not specified")

View File

@ -16,6 +16,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/setting"
"github.com/Unknwon/cae/zip"
"github.com/Unknwon/com"
"github.com/urfave/cli"
@ -73,6 +74,11 @@ func runDump(ctx *cli.Context) error {
}
log.Printf("Creating tmp work dir: %s", TmpWorkDir)
// work-around #1103
if os.Getenv("TMPDIR") == "" {
os.Setenv("TMPDIR", TmpWorkDir)
}
reposDump := path.Join(TmpWorkDir, "gitea-repo.zip")
dbDump := path.Join(TmpWorkDir, "gitea-db.sql")

View File

@ -7,20 +7,18 @@ package cmd
import (
"bufio"
"bytes"
"crypto/tls"
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"code.gitea.io/git"
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/httplib"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/private"
"code.gitea.io/gitea/modules/setting"
"github.com/Unknwon/com"
"github.com/urfave/cli"
)
@ -64,6 +62,12 @@ var (
}
)
func hookSetup(logPath string) {
setting.NewContext()
log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))
models.LoadConfigs()
}
func runHookPreReceive(c *cli.Context) error {
if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 {
return nil
@ -75,9 +79,7 @@ func runHookPreReceive(c *cli.Context) error {
setting.CustomConf = c.GlobalString("config")
}
if err := setup("hooks/pre-receive.log"); err != nil {
fail("Hook pre-receive init failed", fmt.Sprintf("setup: %v", err))
}
hookSetup("hooks/pre-receive.log")
// the environment setted on serv command
repoID, _ := strconv.ParseInt(os.Getenv(models.ProtectedBranchRepoID), 10, 64)
@ -119,18 +121,20 @@ func runHookPreReceive(c *cli.Context) error {
}*/
branchName := strings.TrimPrefix(refFullName, git.BranchPrefix)
protectBranch, err := models.GetProtectedBranchBy(repoID, branchName)
protectBranch, err := private.GetProtectedBranchBy(repoID, branchName)
if err != nil {
log.GitLogger.Fatal(2, "retrieve protected branches information failed")
}
if protectBranch != nil {
// check and deletion
if newCommitID == git.EmptySHA {
fail(fmt.Sprintf("branch %s is protected from deletion", branchName), "")
} else {
fail(fmt.Sprintf("protected branch %s can not be pushed to", branchName), "")
//fail(fmt.Sprintf("branch %s is protected from force push", branchName), "")
if !protectBranch.CanPush {
// check and deletion
if newCommitID == git.EmptySHA {
fail(fmt.Sprintf("branch %s is protected from deletion", branchName), "")
} else {
fail(fmt.Sprintf("protected branch %s can not be pushed to", branchName), "")
//fail(fmt.Sprintf("branch %s is protected from force push", branchName), "")
}
}
}
}
@ -149,9 +153,7 @@ func runHookUpdate(c *cli.Context) error {
setting.CustomConf = c.GlobalString("config")
}
if err := setup("hooks/update.log"); err != nil {
fail("Hook update init failed", fmt.Sprintf("setup: %v", err))
}
hookSetup("hooks/update.log")
return nil
}
@ -167,13 +169,10 @@ func runHookPostReceive(c *cli.Context) error {
setting.CustomConf = c.GlobalString("config")
}
if err := setup("hooks/post-receive.log"); err != nil {
fail("Hook post-receive init failed", fmt.Sprintf("setup: %v", err))
}
hookSetup("hooks/post-receive.log")
// the environment setted on serv command
repoUser := os.Getenv(models.EnvRepoUsername)
repoUserSalt := os.Getenv(models.EnvRepoUserSalt)
isWiki := (os.Getenv(models.EnvRepoIsWiki) == "true")
repoName := os.Getenv(models.EnvRepoName)
pusherID, _ := strconv.ParseInt(os.Getenv(models.EnvPusherID), 10, 64)
@ -199,7 +198,7 @@ func runHookPostReceive(c *cli.Context) error {
newCommitID := string(fields[1])
refFullName := string(fields[2])
if err := models.PushUpdate(models.PushUpdateOptions{
if err := private.PushUpdate(models.PushUpdateOptions{
RefFullName: refFullName,
OldCommitID: oldCommitID,
NewCommitID: newCommitID,
@ -210,23 +209,6 @@ func runHookPostReceive(c *cli.Context) error {
}); err != nil {
log.GitLogger.Error(2, "Update: %v", err)
}
// Ask for running deliver hook and test pull request tasks.
reqURL := setting.LocalURL + repoUser + "/" + repoName + "/tasks/trigger?branch=" +
strings.TrimPrefix(refFullName, git.BranchPrefix) + "&secret=" + base.EncodeMD5(repoUserSalt) + "&pusher=" + com.ToStr(pusherID)
log.GitLogger.Trace("Trigger task: %s", reqURL)
resp, err := httplib.Head(reqURL).SetTLSClientConfig(&tls.Config{
InsecureSkipVerify: true,
}).Response()
if err == nil {
resp.Body.Close()
if resp.StatusCode/100 != 2 {
log.GitLogger.Error(2, "Failed to trigger task: not 2xx response code")
}
} else {
log.GitLogger.Error(2, "Failed to trigger task: %v", err)
}
}
return nil

View File

@ -16,7 +16,9 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/private"
"code.gitea.io/gitea/modules/setting"
"github.com/Unknwon/com"
"github.com/dgrijalva/jwt-go"
"github.com/urfave/cli"
@ -105,7 +107,8 @@ func runServ(c *cli.Context) error {
}
if len(c.Args()) < 1 {
fail("Not enough arguments", "Not enough arguments")
cli.ShowSubcommandHelp(c)
return nil
}
cmd := os.Getenv("SSH_ORIGINAL_COMMAND")
@ -123,8 +126,8 @@ func runServ(c *cli.Context) error {
fail("Unknown git command", "LFS authentication request over SSH denied, LFS support is disabled")
}
if strings.Contains(args, " ") {
argsSplit := strings.SplitN(args, " ", 2)
argsSplit := strings.Split(args, " ")
if len(argsSplit) >= 2 {
args = strings.TrimSpace(argsSplit[0])
lfsVerb = strings.TrimSpace(argsSplit[1])
}
@ -140,8 +143,10 @@ func runServ(c *cli.Context) error {
reponame := strings.ToLower(strings.TrimSuffix(rr[1], ".git"))
isWiki := false
unitType := models.UnitTypeCode
if strings.HasSuffix(reponame, ".wiki") {
isWiki = true
unitType = models.UnitTypeWiki
reponame = reponame[:len(reponame)-5]
}
@ -161,8 +166,6 @@ func runServ(c *cli.Context) error {
fail("Internal error", "Failed to get repository owner (%s): %v", username, err)
}
os.Setenv(models.EnvRepoUserSalt, repoUser.Salt)
repo, err := models.GetRepositoryByName(repoUser.ID, reponame)
if err != nil {
if models.IsErrRepoNotExist(err) {
@ -179,8 +182,10 @@ func runServ(c *cli.Context) error {
if verb == lfsAuthenticateVerb {
if lfsVerb == "upload" {
requestedMode = models.AccessModeWrite
} else {
} else if lfsVerb == "download" {
requestedMode = models.AccessModeRead
} else {
fail("Unknown LFS verb", "Unknown lfs verb %s", lfsVerb)
}
}
@ -232,7 +237,7 @@ func runServ(c *cli.Context) error {
fail("internal error", "Failed to get user by key ID(%d): %v", keyID, err)
}
mode, err := models.AccessLevel(user, repo)
mode, err := models.AccessLevel(user.ID, repo)
if err != nil {
fail("Internal error", "Failed to check access: %v", err)
} else if mode < requestedMode {
@ -245,6 +250,12 @@ func runServ(c *cli.Context) error {
user.Name, requestedMode, repoPath)
}
if !repo.CheckUnitUser(user.ID, user.IsAdmin, unitType) {
fail("You do not have allowed for this action",
"User %s does not have allowed access to repository %s 's code",
user.Name, repoPath)
}
os.Setenv(models.EnvPusherName, user.Name)
os.Setenv(models.EnvPusherID, fmt.Sprintf("%d", user.ID))
}
@ -296,6 +307,12 @@ func runServ(c *cli.Context) error {
gitcmd = exec.Command(verb, repoPath)
}
if isWiki {
if err = repo.InitWiki(); err != nil {
fail("Internal error", "Failed to init wiki repo: %v", err)
}
}
os.Setenv(models.ProtectedBranchRepoID, fmt.Sprintf("%d", repo.ID))
gitcmd.Dir = setting.RepoRootPath
@ -308,13 +325,7 @@ func runServ(c *cli.Context) error {
// Update user key activity.
if keyID > 0 {
key, err := models.GetPublicKeyByID(keyID)
if err != nil {
fail("Internal error", "GetPublicKeyById: %v", err)
}
key.Updated = time.Now()
if err = models.UpdatePublicKey(key); err != nil {
if err = private.UpdatePublicKeyUpdated(keyID); err != nil {
fail("Internal error", "UpdatePublicKey: %v", err)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ import (
"net/http"
"code.gitea.io/gitea/modules/log"
"github.com/facebookgo/grace/gracehttp"
)

92
conf/app.ini vendored
View File

@ -32,6 +32,10 @@ LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,
; Separate values by commas. Preview tab in edit mode won't show if the file extension doesn't match
PREVIEWABLE_FILE_MODES = markdown
[repository.local]
; Path for uploads. Defaults to `tmp/local-repo`
LOCAL_COPY_PATH = tmp/local-repo
[repository.upload]
; Whether repository file uploads are enabled. Defaults to `true`
ENABLED = true
@ -74,6 +78,11 @@ ORG_PAGING_NUM = 50
; Number of repos that are showed in one page
REPO_PAGING_NUM = 15
[ui.meta]
AUTHOR = Gitea - Git with a cup of tea
DESCRIPTION = Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go
KEYWORDS = go,git,self-hosted,gitea
[markdown]
; Enable hard line break extension
ENABLE_HARD_LINE_BREAK = false
@ -85,9 +94,11 @@ CUSTOM_URL_SCHEMES =
FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
[server]
; Listen protocol. One of 'http', 'https', 'unix' or 'fcgi'.
PROTOCOL = http
DOMAIN = localhost
ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
; Listen address. Either a IPv4/IPv6 address or the path to a unix socket.
HTTP_ADDR = 0.0.0.0
HTTP_PORT = 3000
; Permission for unix socket
@ -110,11 +121,15 @@ SSH_PORT = 22
SSH_LISTEN_PORT = %(SSH_PORT)s
; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
SSH_ROOT_PATH =
; Directory to create temporary files when test publick key using ssh-keygen,
; Directory to create temporary files when test public key using ssh-keygen,
; default is system temporary directory.
SSH_KEY_TEST_PATH =
; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.
SSH_KEYGEN_PATH = ssh-keygen
; Enable SSH Authorized Key Backup when rewriting all keys, default is true
SSH_BACKUP_AUTHORIZED_KEYS = true
; Enable exposure of SSH clone URL to anonymous visitors, default is false
SSH_EXPOSE_ANONYMOUS = false
; Indicate whether to check minimum key size with corresponding type
MINIMUM_KEY_SIZE_CHECK = false
; Disable CDN even in "prod" mode
@ -138,6 +153,12 @@ APP_DATA_PATH = data
ENABLE_GZIP = false
; Landing page for non-logged users, can be "home" or "explore"
LANDING_PAGE = home
; Enables git-lfs support. true or false, default is false.
LFS_START_SERVER = false
; Where your lfs files put on, default is data/lfs.
LFS_CONTENT_PATH = data/lfs
; LFS authentication secret, changed this to yourself.
LFS_JWT_SECRET =
; Define allowed algorithms and their minimum key length (use -1 to disable a type)
[ssh.minimum_key_sizes]
@ -147,7 +168,7 @@ RSA = 2048
DSA = 1024
[database]
; Either "mysql", "postgres" or "sqlite3", it's your choice
; Either "mysql", "postgres", "mssql" or "sqlite3", it's your choice
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gitea
@ -157,6 +178,8 @@ PASSWD =
SSL_MODE = disable
; For "sqlite3" and "tidb", use absolute path when you start as service
PATH = data/gitea.db
; For "sqlite3" only. Query timeout
SQLITE_TIMEOUT = 500
[indexer]
ISSUE_INDEXER_PATH = indexers/issues.bleve
@ -182,8 +205,44 @@ MIN_PASSWORD_LENGTH = 6
; True when users are allowed to import local server paths
IMPORT_LOCAL_PATHS = false
[openid]
;
; OpenID is an open standard and decentralized authentication protocol.
; Your identity is the address of a webpage you provide, which describes
; how to prove you are in control of that page.
;
; For more info: https://en.wikipedia.org/wiki/OpenID
;
; Current implementation supports OpenID-2.0
;
; Tested to work providers at the time of writing:
; - Any GNUSocial node (your.hostname.tld/username)
; - Any SimpleID provider (http://simpleid.koinic.net)
; - http://openid.org.cn/
; - openid.stackexchange.com
; - login.launchpad.net
; - <username>.livejournal.com
;
; Whether to allow signin in via OpenID
ENABLE_OPENID_SIGNIN = true
; Whether to allow registering via OpenID
; Do not include to rely on DISABLE_REGISTRATION setting
;ENABLE_OPENID_SIGNUP = true
; Allowed URI patterns (POSIX regexp).
; Space separated.
; Only these would be allowed if non-blank.
; Example value: trusted.domain.org trusted.domain.net
WHITELISTED_URIS =
; Forbidden URI patterns (POSIX regexp).
; Space sepaated.
; Only used if WHITELISTED_URIS is blank.
; Example value: loadaverage.org/badguy stackexchange.com/.*spammer
BLACKLISTED_URIS =
[service]
; Time limit to confirm account/email registration
ACTIVE_CODE_LIVE_MINUTES = 180
; Time limit to confirm forgot password reset process
RESET_PASSWD_CODE_LIVE_MINUTES = 180
; User need to confirm e-mail for registration
REGISTER_EMAIL_CONFIRM = false
@ -201,6 +260,9 @@ ENABLE_CAPTCHA = true
; Default value for KeepEmailPrivate
; New user will get the value of this setting copied into their profile
DEFAULT_KEEP_EMAIL_PRIVATE = false
; Default value for AllowCreateOrganization
; New user will have rights set to create organizations depending on this setting
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
; Default value for the domain part of the user's email address in the git log
; if he has set KeepEmailPrivate true. The user's email replaced with a
; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS.
@ -242,8 +304,8 @@ FROM =
; Mailer user name and password
USER =
PASSWD =
; Use text/html as alternative format of content
ENABLE_HTML_ALTERNATIVE = false
; Send mails as plain text
SEND_AS_PLAIN_TEXT = false
; Enable sendmail (override SMTP)
USE_SENDMAIL = false
; Specifiy an alternative sendmail binary
@ -274,9 +336,9 @@ COOKIE_NAME = i_like_gitea
COOKIE_SECURE = false
; Enable set cookie, default is true
ENABLE_SET_COOKIE = true
; Session GC time interval, default is 86400
; Session GC time interval in seconds, default is 86400 (1 day)
GC_INTERVAL_TIME = 86400
; Session life time, default is 86400
; Session life time in seconds, default is 86400 (1 day)
SESSION_LIFE_TIME = 86400
[picture]
@ -400,13 +462,23 @@ SCHEDULE = @every 24h
; Archives created more than OLDER_THAN ago are subject to deletion
OLDER_THAN = 24h
; Synchronize external user data (only LDAP user synchronization is supported)
[cron.sync_external_users]
; Syncronize external user data when starting server (default false)
RUN_AT_START = false
; Interval as a duration between each synchronization (default every 24h)
SCHEDULE = @every 24h
; Create new users, update existing user data and disable users that are not in external source anymore (default)
; or only create new users if UPDATE_EXISTING is set to false
UPDATE_EXISTING = true
[git]
; Disables highlight of added and removed changes
DISABLE_DIFF_HIGHLIGHT = false
; Max number of lines allowed of a single file in diff view
MAX_GIT_DIFF_LINES = 1000
; Max number of characters of a line allowed in diff view
MAX_GIT_DIFF_LINE_CHARACTERS = 500
MAX_GIT_DIFF_LINE_CHARACTERS = 5000
; Max number of files shown in diff view
MAX_GIT_DIFF_FILES = 100
; Arguments for command 'git gc', e.g. "--aggressive --auto"
@ -422,8 +494,10 @@ PULL = 300
GC = 60
[mirror]
; Default interval in hours between each check
DEFAULT_INTERVAL = 8
; Default interval as a duration between each check
DEFAULT_INTERVAL = 8h
; Min interval as a duration must be > 1m
MIN_INTERVAL = 10m
[api]
; Max number of items will response in a page

View File

@ -15,7 +15,7 @@
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Go Git Service"
DESC="Git with a cup of tea"
NAME=gitea
SERVICEVERBOSE=yes
PIDFILE=/var/run/$NAME.pid

Some files were not shown because too many files have changed in this diff Show More