]> source.dussan.org Git - gitea.git/log
gitea.git
5 years agoMove PushUpdate dependency from models to repofiles (#6763)
Lunny Xiao [Mon, 10 Jun 2019 11:35:13 +0000 (19:35 +0800)]
Move PushUpdate dependency from models to repofiles (#6763)

* remove push_update

* move models.PushUpdate to repofiles.PushUpdate

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 10 Jun 2019 01:06:14 +0000 (01:06 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoarchived repos can be starred and watched (#7163)
Lanre Adelowo [Mon, 10 Jun 2019 01:02:42 +0000 (02:02 +0100)]
archived repos can be starred and watched (#7163)

5 years agoFixes #2738 - Adds the /git/tags API endpoint (#7138)
Richard Mahn [Sat, 8 Jun 2019 14:31:11 +0000 (10:31 -0400)]
Fixes #2738 - Adds the /git/tags API endpoint (#7138)

* Fixes #2738 - /git/tags API

* proper URLs

* Adds function comments

* Updates swagger

* Removes newline from tag message

* Removes trailing newline from commit message

* Adds integration test

* Removed debugging

* Adds tests

* Fixes bug where multiple tags of same commit show wrong tag name

* Fix formatting

* Removes unused varaible

* Fix to annotated tag function names and response

* Update modules/git/repo_tag.go

Co-Authored-By: Lauris BH <lauris@nix.lv>
* Uses TagPrefix

* Changes per review, better error handling for getting tag and commit IDs

* Fix to getting commit ID

* Fix to getting commit ID

* Fix to getting commit ID

* Fix to getting commit ID

5 years agoAdd command to convert mysql database from utf8 to utf8mb4 (#7144)
Lunny Xiao [Sat, 8 Jun 2019 13:53:45 +0000 (21:53 +0800)]
Add command to convert mysql database from utf8 to utf8mb4 (#7144)

* add command to convert mysql database from utf8 to utf8mb4

* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
* Update models/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
* Update models/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
* Update cmd/convert.go

Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
5 years agofix GCArgs load from ini (#7156)
Lunny Xiao [Sat, 8 Jun 2019 11:47:46 +0000 (19:47 +0800)]
fix GCArgs load from ini (#7156)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 7 Jun 2019 20:32:49 +0000 (20:32 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoCompare branches, commits and tags with each other (#6991)
Mario Lubenka [Fri, 7 Jun 2019 20:29:29 +0000 (22:29 +0200)]
Compare branches, commits and tags with each other (#6991)

* Supports tags when comparing commits or branches

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Hide headline when only comparing and don't load unused data

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Merges compare logics to allow comparing branches, commits and tags with eachother

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Display branch or tag instead of commit when used for comparing

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Show pull request form after click on button

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Transfers relevant pull.go changes from master to compare.go

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Fixes error when comparing forks against a commit or tag

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Removes console.log from JavaScript file

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Show icon next to commit reference when comparing branch or tag

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Updates css file

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Fixes import order

* Renames template variable

* Update routers/repo/compare.go

Co-Authored-By: zeripath <art27@cantab.net>
* Update from master

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Allow short-shas in compare

* Renames prInfo to compareInfo

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Check PR permissions only if compare is pull request

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

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Use compareInfo instead of prInfo

5 years agoDetect noreply email address as user (#7133)
zeripath [Thu, 6 Jun 2019 05:54:25 +0000 (06:54 +0100)]
Detect noreply email address as user (#7133)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 6 Jun 2019 00:40:56 +0000 (00:40 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoAdd state param to milestone listing API (#7131)
Lanre Adelowo [Thu, 6 Jun 2019 00:37:45 +0000 (01:37 +0100)]
Add state param to milestone listing API (#7131)

* Support state params

* update tests

* fix tests

* add state=all support

* update tests

* update swagger

* update swagger

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 5 Jun 2019 16:26:53 +0000 (16:26 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoadd docs for #6847 (#7132)
Lanre Adelowo [Wed, 5 Jun 2019 16:24:09 +0000 (17:24 +0100)]
add docs for #6847 (#7132)

5 years agominor fixes in en-US locale (#7130)
katherine [Wed, 5 Jun 2019 14:16:06 +0000 (07:16 -0700)]
minor fixes in en-US locale (#7130)

a few spelling fixes and one rewritten line

Signed-off-by: katherine <ageha@airen-no-jikken.icu>
5 years agoExclude pull_request from fetch-tags step, fixes #7108 (#7120)
Nick Meyer [Wed, 5 Jun 2019 01:17:17 +0000 (20:17 -0500)]
Exclude pull_request from fetch-tags step, fixes #7108 (#7120)

Signed-off-by: Nick Meyer <nick@e3b0c442.io>
5 years agoAdd Rust highlighting (#7125)
Rob Watson [Tue, 4 Jun 2019 21:01:47 +0000 (23:01 +0200)]
Add Rust highlighting (#7125)

5 years agoMigration Tweaks (#6260)
John Olheiser [Tue, 4 Jun 2019 19:36:09 +0000 (14:36 -0500)]
Migration Tweaks (#6260)

* Adds auto-name if repo name is blank
Adds error checking before sanitization in migration

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Changed err from sanitization to a different variable

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Remove handleCreatePost and implement separately

Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Make fmt

Signed-off-by: jolheiser <john.olheiser@gmail.com>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 3 Jun 2019 15:13:51 +0000 (15:13 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoRefactor submodule URL parsing (#7100)
mrsdizzie [Mon, 3 Jun 2019 15:11:20 +0000 (11:11 -0400)]
Refactor submodule URL parsing (#7100)

Use combination of url.Parse and regex to parse refURL rather than by
hand with indexes & attempt to check if refURL is from same instance and
adjust output to match.

Also now return empty string instead of our original
guess at URL if we are unable to parse it.

Fixes #1526

5 years agoAvoid arbitrary format strings upon calling fail() function (#7112)
Sandro Santilli [Mon, 3 Jun 2019 08:07:03 +0000 (10:07 +0200)]
Avoid arbitrary format strings upon calling fail() function (#7112)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sun, 2 Jun 2019 21:46:35 +0000 (21:46 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoUse vfsgen instead of go-bindata (#7080)
Lunny Xiao [Sun, 2 Jun 2019 21:43:47 +0000 (05:43 +0800)]
Use vfsgen instead of go-bindata (#7080)

* use vfsgen instead of go-bindata

* fix templates

* fix fmt

* vendor vsfgen

5 years agoRepository avatar fallback configuration (#7087)
Mario Lubenka [Sun, 2 Jun 2019 06:40:12 +0000 (08:40 +0200)]
Repository avatar fallback configuration (#7087)

* Only show repository avatar in list when one was selected

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Adds fallback configuration option for repository avatar

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Implements repository avatar fallback

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Adds admin task for deleting generated repository avatars

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Solve linting issues

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Save avatar before updating database

* Linting

* Update models/repo.go

Co-Authored-By: zeripath <art27@cantab.net>
5 years agoMove serv hook functionality & drop GitLogger (#6993)
zeripath [Sat, 1 Jun 2019 15:00:21 +0000 (16:00 +0100)]
Move serv hook functionality & drop GitLogger (#6993)

* Move hook functionality internally

* Internalise serv logic

* Remove old internal paths

* finally remove the gitlogger

* Disallow push on archived repositories

* fix lint error

* Update modules/private/key.go

* Update routers/private/hook.go

* Update routers/private/hook.go

* Update routers/private/hook.go

* Updated routers/private/serv.go

* Fix LFS Locks over SSH

* rev-list needs to be run by the hook process

* fixup

* Improve git test

* Ensure that the lfs files are created with a different prefix

* Reduce the replication in git_test.go

* slight refactor

* Remove unnecessary "/"

* Restore ensureAnonymousClone

* Restore ensureAnonymousClone

* Run rev-list on server side

* Try passing in the alternative directories instead

* Mark test as skipped

* Improve git test

* Ensure that the lfs files are created with a different prefix
* Reduce the replication in git_test.go
* Remove unnecessary "/"

5 years agoupdate go git from v4.10.0 to v4.11.0 (#7096)
Lunny Xiao [Fri, 31 May 2019 19:34:46 +0000 (03:34 +0800)]
update go git from v4.10.0 to v4.11.0 (#7096)

5 years agoImprove git test (#7086)
zeripath [Fri, 31 May 2019 10:12:15 +0000 (11:12 +0100)]
Improve git test (#7086)

* Ensure that the lfs files are created with a different prefix
* Reduce the replication in git_test.go

5 years agoValidate External Tracker URL Format (#7089)
mrsdizzie [Fri, 31 May 2019 09:21:15 +0000 (05:21 -0400)]
Validate External Tracker URL Format (#7089)

* Validate External Tracker URL Format

Add some validation checks for external tracker URL format.

Fixes #7068

* Don't make {index} a hard requirement

* Fix Description

* make fmt

* move regex to package level

* fix copyright date

5 years agoFix Erlang and Elixir highlight mappings (#7044)
Robert A. Nowak [Thu, 30 May 2019 21:23:16 +0000 (23:23 +0200)]
Fix Erlang and Elixir highlight mappings (#7044)

5 years agoimprove github downloader on migrations (#7049)
Lunny Xiao [Thu, 30 May 2019 20:26:57 +0000 (04:26 +0800)]
improve github downloader on migrations (#7049)

* improve github downloader on migrations

* fix tests

* fix  uppercase function parameters

5 years agoFixes #7023 - API Org Visibility (#7028)
Richard Mahn [Thu, 30 May 2019 17:57:55 +0000 (13:57 -0400)]
Fixes #7023 - API Org Visibility (#7028)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 30 May 2019 16:49:44 +0000 (16:49 +0000)]
[skip ci] Updated translations via Crowdin

5 years ago1.8.2 changelog (#7079) (#7088)
John Olheiser [Thu, 30 May 2019 16:46:31 +0000 (11:46 -0500)]
1.8.2 changelog (#7079) (#7088)

* 1.8.2 changelog

5 years agoFixes #5960 - Adds API Endpoint for Repo Edit (#7006)
Richard Mahn [Thu, 30 May 2019 15:09:05 +0000 (11:09 -0400)]
Fixes #5960 - Adds API Endpoint for Repo Edit (#7006)

* Feature - #5960 - API Endpoint for Repo Editing

* Revert from merge

* Adds integration testing

* Updates to integration tests

* Revert changes

* Update year in file header

* Misspell fix

* XORM = test

* XORM = test

* revert XORM = file

* Makes RepoUnit.ID be pk and autoincr

* Fix to units

* revert header

* Remove print statement

* Adds other responses

* Improves swagger for creating repo

* Fixes import order

* Better Unit Type does not exist error

* Adds editable repo properties to the response repo structure

* Fix to api_repo_edit_test.go

* Fixes repo test

* Changes per review

* Fixes typo and standardizes comments in the EditRepoOption struct for swagger

* Fixes typo and standardizes comments in the EditRepoOption struct for swagger

* Actually can unarchive through the API

* Unlike delete, user doesn't have to be the owner of the org, just admin to the repo

* Fix to swagger comments for field name change

* Update to swagger docs

* Update swagger

* Changes allow_pull_requests to has_pull_requests

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Thu, 30 May 2019 02:25:01 +0000 (02:25 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoRepository avatars (#6986)
Sergey Dryabzhinsky [Thu, 30 May 2019 02:22:26 +0000 (05:22 +0300)]
Repository avatars (#6986)

* Repository avatars

- first variant of code from old work for gogs
- add migration 87
- add new option in app.ini
- add en-US locale string
- add new class in repository.less

* Add changed index.css, remove unused template name

* Update en-us doc about configuration options

* Add comments to new functions, add new option to docker app.ini

* Add comment for lint

* Remove variable, not needed

* Fix formatting

* Update swagger api template

* Check if avatar exists

* Fix avatar link/path checks

* Typo

* TEXT column can't have a default value

* Fixes:

- remove old avatar file on upload
- use ID in name of avatar file - users may upload same files
- add simple tests

* Fix fmt check

* Generate PNG instead of "static" GIF

* More informative comment

* Fix error message

* Update avatar upload checks:

- add file size check
- add new option
- update config docs
- add new string to en-us locale

* Fixes:

- use FileHEader field for check file size
- add new test - upload big image

* Fix formatting

* Update comments

* Update log message

* Removed wrong style - not needed

* Use Sync2 to migrate

* Update repos list view

- bigger avatar
- fix html blocks alignment

* A little adjust avatar size

* Use small icons for explore/repo list

* Use new cool avatar preparation func by @lafriks

* Missing changes for new function

* Remove unused import, move imports

* Missed new option definition in app.ini

Add file size check in user/profile avatar upload

* Use smaller field length for Avatar

* Use session to update repo DB data, update DeleteAvatar - use session too

* Fix err variable definition

* As suggested @lafriks - return as soon as possible, code readability

5 years agobug fix: add single comment in split diff mode (#4745) (#7052)
Rob Watson [Wed, 29 May 2019 15:16:13 +0000 (17:16 +0200)]
bug fix: add single comment in split diff mode (#4745) (#7052)

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>
5 years agoHandle early git version's lack of get-url (#7065)
zeripath [Wed, 29 May 2019 05:49:08 +0000 (06:49 +0100)]
Handle early git version's lack of get-url (#7065)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 28 May 2019 16:02:55 +0000 (16:02 +0000)]
[skip ci] Updated translations via Crowdin

5 years agorefactor: append, build variable and type switch (#4940)
Bo-Yi Wu [Tue, 28 May 2019 15:45:54 +0000 (23:45 +0800)]
refactor: append, build variable and type switch (#4940)

* refactor: append, build variable and type switch

* fix: remove redundant space.

5 years agoFix LFS Locks over SSH (#6999)
zeripath [Tue, 28 May 2019 10:32:41 +0000 (11:32 +0100)]
Fix LFS Locks over SSH (#6999)

* Fix LFS Locks over SSH
* Mark test as skipped

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Tue, 28 May 2019 09:44:31 +0000 (09:44 +0000)]
[skip ci] Updated translations via Crowdin

5 years agochore: change issue mail title. (#7064)
Bo-Yi Wu [Tue, 28 May 2019 09:41:48 +0000 (17:41 +0800)]
chore: change issue mail title. (#7064)

* chore: change issue mail title.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* change to fullname method

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
5 years agoInstall page - Handle invalid administrator username better (#7060)
zeripath [Tue, 28 May 2019 06:18:40 +0000 (07:18 +0100)]
Install page - Handle invalid administrator username better (#7060)

* Install page - detect invalid admin username before installing

* Also fix #6954

5 years agoHandle insecure and ports in go get (#7041)
zeripath [Mon, 27 May 2019 21:08:38 +0000 (22:08 +0100)]
Handle insecure and ports in go get (#7041)

* Handle insecure and ports in go get

* Fix IsExternalURL for non-standard ports

5 years ago"It's all in GitHub" isn't true anymore, update the home template (#7059)
Sandro Santilli [Mon, 27 May 2019 17:43:37 +0000 (19:43 +0200)]
"It's all in GitHub" isn't true anymore, update the home template (#7059)

NOTE: this commit only updates the english section

5 years agofix issuer of OTP URI should be URI-encoded. (#6634)
Hui Hui [Mon, 27 May 2019 17:00:32 +0000 (01:00 +0800)]
fix issuer of OTP URI should be URI-encoded. (#6634)

* fix: Issuer of OTP URI should be URI-encoded.

follow this link https://github.com/google/google-authenticator/wiki/Key-Uri-Format .

* filter unsafe character ':' in issuer

* Use Replace rather than ReplaceAll

5 years agoAdd FHS-compliant-script (#6923)
zeripath [Sun, 26 May 2019 21:49:54 +0000 (22:49 +0100)]
Add FHS-compliant-script (#6923)

5 years agofix charset was not saved after installation finished (#7048)
Lunny Xiao [Sun, 26 May 2019 17:36:33 +0000 (01:36 +0800)]
fix charset was not saved after installation finished (#7048)

5 years agoRevert "Bugfix: Align comment label and actions to the right (#7024)" (#7055)
Lunny Xiao [Sun, 26 May 2019 16:55:53 +0000 (00:55 +0800)]
Revert "Bugfix: Align comment label and actions to the right (#7024)" (#7055)

This reverts commit 0c432d26fe20d3e50da566cf75fa483376ed8bef.

5 years agofix possbile mysql invalid connnection error (#7051)
Lunny Xiao [Sun, 26 May 2019 13:28:33 +0000 (21:28 +0800)]
fix possbile mysql invalid connnection error (#7051)

5 years agowhen git version >= 2.18, git command could run with git wire protocol version 2...
Lunny Xiao [Sun, 26 May 2019 09:50:06 +0000 (17:50 +0800)]
when git version >= 2.18, git command could run with git wire protocol version 2 param if enabled (#7047)

5 years agoUpdate config-cheat-sheet.en-us.md (#7046)
Tekaoh [Sun, 26 May 2019 05:23:30 +0000 (00:23 -0500)]
Update config-cheat-sheet.en-us.md (#7046)

5 years agoTimeout test commands without complicated tricks (#7020)
Mura Li [Sat, 25 May 2019 23:13:01 +0000 (07:13 +0800)]
Timeout test commands without complicated tricks (#7020)

5 years agomigrations: ensure rollback on error (#7039) (#7040)
Rob Watson [Sat, 25 May 2019 21:18:27 +0000 (23:18 +0200)]
migrations: ensure rollback on error (#7039) (#7040)

5 years agoFix wrong init dependency on markup extensions (#7038)
Lunny Xiao [Sat, 25 May 2019 17:15:39 +0000 (01:15 +0800)]
Fix wrong init dependency on markup extensions (#7038)

* fix wrong init dependency on markup extensions

5 years agoBugfix: Align comment label and actions to the right (#7024)
Mario Lubenka [Sat, 25 May 2019 13:37:44 +0000 (15:37 +0200)]
Bugfix: Align comment label and actions to the right (#7024)

* Bugfix: Align comment label and actions to the right

Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Restores relative position

* CSS autofixer

5 years agoImprove handling of non-square avatars (#7025)
Rob Watson [Sat, 25 May 2019 11:46:14 +0000 (13:46 +0200)]
Improve handling of non-square avatars (#7025)

* Crop avatar before resizing (#1268)

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>
* Fix spelling error

Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Sat, 25 May 2019 08:41:06 +0000 (08:41 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoDisable arm7 builds (#7037)
techknowlogick [Sat, 25 May 2019 08:38:15 +0000 (04:38 -0400)]
Disable arm7 builds (#7037)

* Disable arm7 builds

As arm6 works on arm7 platforms with no noticeable performance difference

* 386

5 years agoFix /verify LFS handler expecting wrong content-type (#7015)
Marat Radchenko [Fri, 24 May 2019 21:21:00 +0000 (00:21 +0300)]
Fix /verify LFS handler expecting wrong content-type (#7015)

Fixes #6960

According to [spec][1], /verify requests must have `Accept: application/vnd.git-lfs+json`

Previous code works because `git-lfs` also [violates spec and doesn't send any Accept header at all][2]
For other clients that DO set `Accept: application/vnd.git-lfs+json`, addition of `Accept: application/vnd.git-lfs`
either forces them to violate the spec or is ignored, depending on order in what they create header list.

[1]: https://github.com/git-lfs/git-lfs/blob/master/docs/api/basic-transfers.md#verification
[2]: https://github.com/git-lfs/git-lfs/issues/3662

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 24 May 2019 16:44:08 +0000 (16:44 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoFix default for allowing new organization creation for new users (#7017)
jpicht [Fri, 24 May 2019 16:40:45 +0000 (18:40 +0200)]
Fix default for allowing new organization creation for new users (#7017)

Fixed #6542

When creating users DefaultAllowCreateOrganization was ignored.

Signed-off-by: Julian Picht <julian.picht@gmail.com>
* fix TestCreateUser_Issue5882

Signed-off-by: Julian Picht <julian.picht@gmail.com>
5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Fri, 24 May 2019 09:12:13 +0000 (09:12 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoShow git-notes (#6984)
Vladimir Panteleev [Fri, 24 May 2019 07:52:05 +0000 (10:52 +0300)]
Show git-notes (#6984)

* Show git-notes

* Make git-notes heading text localizable

* Refactor git-notes data fetching to a separate function

* Display the author and time of git notes

* Move note bubble inside the commit bubble

* Revert "Move note bubble inside the commit bubble"

This reverts commit c0951fe0e3b4dea38064515546b1825c1bcf19e1.

* Add test for git-notes

* testing ui

* Polish CSS

* Apply suggestions from code review

Co-Authored-By: Lauris BH <lauris@nix.lv>
5 years agoAdd support of utf8mb4 for mysql (#6992)
Lunny Xiao [Fri, 24 May 2019 04:15:26 +0000 (12:15 +0800)]
Add support of utf8mb4 for mysql (#6992)

5 years agoAdded Note about arm7 version to doc (#6983)
suisseWalter [Thu, 23 May 2019 17:12:59 +0000 (19:12 +0200)]
Added Note about arm7 version to doc (#6983)

Appended the Troubleshooting section with a subsection about the problems with the arm7 version and the recommendation to switch to arm6.

5 years agoChange UpdateRepoIndex api to include watchers (#7012)
zeripath [Thu, 23 May 2019 16:00:07 +0000 (17:00 +0100)]
Change UpdateRepoIndex api to include watchers (#7012)

* Change UpdateRepoIndex api to include watchers

* Add timeout

5 years agoFix documentation on Oauth2.Enable flag (#7011)
Monty Taylor [Wed, 22 May 2019 01:48:34 +0000 (20:48 -0500)]
Fix documentation on Oauth2.Enable flag (#7011)

* Fix documentation on Oauth2.Enable flag

The docs list this as ENABLED, but in the source code it's
ENABLE, meaning following the docs leads to confusion.

* Update sample config for oauth2.ENABLE

5 years agoDo not attempt to return blob on submodule (#6996)
zeripath [Tue, 21 May 2019 21:32:52 +0000 (22:32 +0100)]
Do not attempt to return blob on submodule (#6996)

5 years agoFix TestSearchRepo by waiting till indexing is done (#7004)
zeripath [Tue, 21 May 2019 19:11:09 +0000 (20:11 +0100)]
Fix TestSearchRepo by waiting till indexing is done (#7004)

* Fix TestSearchRepo by waiting till indexing is done

* Update integrations/repo_search_test.go

* changes as per @mrsdizzie

5 years agoMake webhook http connections resuable (#6976) 6559/head
Lunny Xiao [Tue, 21 May 2019 07:20:17 +0000 (15:20 +0800)]
Make webhook http connections resuable (#6976)

* make http connections resuable

* add error handler

* fix lint

5 years agofix missing repo description when migrating (#7000)
Lunny Xiao [Mon, 20 May 2019 12:43:43 +0000 (20:43 +0800)]
fix missing repo description when migrating (#7000)

5 years agofix u2f registrationlist ToRegistrations() method (#6980)
David Schneiderbauer [Sat, 18 May 2019 13:40:05 +0000 (15:40 +0200)]
fix u2f registrationlist ToRegistrations() method (#6980)

5 years agoFix index produces problem when issues/pulls deleted (#6973)
Lunny Xiao [Sat, 18 May 2019 02:37:49 +0000 (10:37 +0800)]
Fix index produces problem when issues/pulls deleted (#6973)

* fix index produces problem when issues/pulls deleted

* fix tests

* fix tests

* fix tests

5 years agoStop running hooks on pr merge (#6963)
zeripath [Fri, 17 May 2019 12:41:01 +0000 (13:41 +0100)]
Stop running hooks on pr merge (#6963)

* Stop running hooks on pr merge

* Remove SSH_ORIGINAL_COMMAND from the pushing environment

5 years agoremove and disable package-lock (#6969)
silverwind [Thu, 16 May 2019 19:33:54 +0000 (21:33 +0200)]
remove and disable package-lock (#6969)

* remove and disable package-lock

Using exact versions in package.json has the same effect as lockfiles
without all the troubles the lockfiles bring (different versions of
package manager generating different lockfiles primarily).

Ensured we only use exact versions in package.json and stopped
generation of new lockfiles via .npmrc which is support by both the npm
and yarn package managers.

Fixes: https://github.com/go-gitea/gitea/issues/6967
* enable save-exact

5 years agoAllow collaborators to view repo owned private org (#6965)
mrsdizzie [Thu, 16 May 2019 15:48:40 +0000 (11:48 -0400)]
Allow collaborators to view repo owned private org (#6965)

Handle case where an orginization is private but a user who is not a
member of the orgninization has been added as a collaborator of a repo
within that org

Fixes #6962

5 years agoadd make targets for js and css, add js linter (#6952)
silverwind [Thu, 16 May 2019 05:57:47 +0000 (07:57 +0200)]
add make targets for js and css, add js linter (#6952)

* add make targets for js,css, add javascript linter

- add `make js`, deprecating `make javascripts`
- add `make css`, deprecating `make generate-stylesheets` and
  `make stylesheets-check`
- changed the unclean css check to only run on CI
- add JS linting via eslint with basic configuration and fixed
  discovered issues
- changed autoprefixer to use official `postcss-cli` avoiding the need
  to loop in the makefile
- moved browserslist to package.json so other future tools can use it
  too.
- update documentation for new make targets and added JS section

* fix indentation

* move functions used in html to 'exported' list

* Run lessc binary without having to install anything to node_modules

* use relative paths to node bin scripts, removing npx

* Revert "use relative paths to node bin scripts, removing npx"

This reverts commit 119b725525a8430b32ee7a6e6009b4ece544e39b.

* fix lessc and postcss plugins

* check for node_modules and use actual bin names

5 years agoStop colorizing files by default (#6949)
zeripath [Wed, 15 May 2019 21:37:06 +0000 (22:37 +0100)]
Stop colorizing files by default (#6949)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Wed, 15 May 2019 15:52:29 +0000 (15:52 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoSearchRepositoryByName improvements and unification (#6897)
zeripath [Wed, 15 May 2019 15:24:39 +0000 (16:24 +0100)]
SearchRepositoryByName improvements and unification (#6897)

5 years agoWebhook Logs show proper HTTP Method, and allow change HTTP method in form (#6953)
techknowlogick [Wed, 15 May 2019 12:01:53 +0000 (08:01 -0400)]
Webhook Logs show proper HTTP Method, and allow change HTTP method in form (#6953)

* Fix #6951 - logs show proper HTTP Method, and allow change HTTP method
in form

* enforce POST method for webhook

* set default if method is empty

5 years agoRefactor models.NewRepoContext to extract git related codes to modules/git (#6941)
Lunny Xiao [Wed, 15 May 2019 01:57:00 +0000 (09:57 +0800)]
Refactor models.NewRepoContext to extract git related codes to modules/git (#6941)

* refactor models.NewRepoContext to extract git related codes to modules/git

* fix imports

* refactor

5 years agoFix code overflow (#6914)
Xaver Maierhofer [Tue, 14 May 2019 16:02:59 +0000 (18:02 +0200)]
Fix code overflow (#6914)

5 years agoAdd work path CLI option (#6922)
zeripath [Tue, 14 May 2019 15:20:35 +0000 (16:20 +0100)]
Add work path CLI option (#6922)

Makes it possible to set the work path as a CLI option instead of
relying on environment variables which are somewhat opaque

5 years agoIgnore non-standard refs in git push (#6758)
James E. Blair [Tue, 14 May 2019 14:40:27 +0000 (07:40 -0700)]
Ignore non-standard refs in git push (#6758)

When replicating to gitea from a remote system which makes use of
git refs to store extra data (for example, gerrit), pushing a lot
of refs to gitea can cause problems due to the extra processing
that the pre and post receive hooks perform.  But it's still
useful for gitea to be able to serve those refs.  This change
skips unecessary processing of refs other than branches or tags.

We don't need to check any ref that isn't a branch for branch
protection (protection will never be enabled).  So in the
pre-receive hook, we wrap that check in a test for whether the
ref is a branch.

We also don't need to add information to the activity stream about
pushes to non-standard refs, so we skip that step in the
post-receive hook for refs which are not branches or tags.

For some concrete examples, gerrit maintains a ref for every
patchset of every change in the form refs/changes/XX/YYYY/Z.
Many systems use refs/notes to store additonal data about commits.
This change allows these and other schemes to be used without
affecting gitea.

5 years agoRemove macaron dependent on models (#6940)
Lunny Xiao [Tue, 14 May 2019 13:52:18 +0000 (21:52 +0800)]
Remove macaron dependent on models (#6940)

5 years agoMove xorm logger bridge from log to models so that log module could be a standalone...
Lunny Xiao [Tue, 14 May 2019 07:04:07 +0000 (15:04 +0800)]
Move xorm logger bridge from log to models so that log module could be a standalone package (#6944)

* move xorm logger bridge from log to models so that log module could be a standalone package

* fix tests

* save logger on xorm log bridge

5 years agoFix plain text overflow line wrap (#6915)
Xaver Maierhofer [Tue, 14 May 2019 04:11:22 +0000 (06:11 +0200)]
Fix plain text overflow line wrap (#6915)

5 years agoRemove macaron dependent on modules/log (#6933)
Lunny Xiao [Tue, 14 May 2019 02:55:52 +0000 (10:55 +0800)]
Remove macaron dependent on modules/log (#6933)

5 years agoAdd less linter via npx (#6936)
Xaver Maierhofer [Tue, 14 May 2019 00:54:23 +0000 (02:54 +0200)]
Add less linter via npx (#6936)

5 years agorotate unusual logs and stop stacktracing (#6935)
zeripath [Tue, 14 May 2019 00:08:34 +0000 (01:08 +0100)]
rotate unusual logs and stop stacktracing (#6935)

5 years agoremove macaron dependent on models/mail.go (#6931)
Lunny Xiao [Mon, 13 May 2019 22:53:54 +0000 (06:53 +0800)]
remove macaron dependent on models/mail.go (#6931)

5 years ago[docker] support for custom GITEA_CUSTOM env var (#6608)
Jakob Ackermann [Mon, 13 May 2019 22:19:38 +0000 (00:19 +0200)]
[docker] support for custom GITEA_CUSTOM env var (#6608)

5 years agoStyle orgs list in user profile (#6911)
Xaver Maierhofer [Mon, 13 May 2019 20:52:59 +0000 (22:52 +0200)]
Style orgs list in user profile (#6911)

5 years agoUse single line per selector & don't strip license comments (#6919)
Xaver Maierhofer [Mon, 13 May 2019 19:25:21 +0000 (21:25 +0200)]
Use single line per selector & don't strip license comments (#6919)

5 years ago[skip ci] Updated translations via Crowdin
GiteaBot [Mon, 13 May 2019 15:41:18 +0000 (15:41 +0000)]
[skip ci] Updated translations via Crowdin

5 years agoHandle CORS requests (#6289)
Tamal Saha [Mon, 13 May 2019 15:38:53 +0000 (08:38 -0700)]
Handle CORS requests (#6289)

5 years agoClean less files (#6921)
Xaver Maierhofer [Mon, 13 May 2019 06:26:32 +0000 (08:26 +0200)]
Clean less files (#6921)

5 years agoUse modules/git for git commands (#6775)
Mura Li [Mon, 13 May 2019 05:06:47 +0000 (13:06 +0800)]
Use modules/git for git commands (#6775)