7582 Commits (8bf405986e9940be863088e65903d4e2e2fe84ce)
 

Author SHA1 Message Date
Rob Watson 8bf405986e Add Rust highlighting (#7125) 5 years ago
John Olheiser 2a8037fe4e 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
GiteaBot 160e7edd04 [skip ci] Updated translations via Crowdin 5 years ago
mrsdizzie 2ac2a5b0ba 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 ago
Sandro Santilli 45f588e85d Avoid arbitrary format strings upon calling fail() function (#7112) 5 years ago
GiteaBot 9002c5157b [skip ci] Updated translations via Crowdin 5 years ago
Lunny Xiao 83b90e4199 Use vfsgen instead of go-bindata (#7080)
* use vfsgen instead of go-bindata

* fix templates

* fix fmt

* vendor vsfgen
5 years ago
Mario Lubenka 8eba27c792 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 ago
zeripath 356854fc5f 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 ago
Lunny Xiao 8a343dda39 update go git from v4.10.0 to v4.11.0 (#7096) 5 years ago
zeripath fb4438a815
Improve git test (#7086)
* Ensure that the lfs files are created with a different prefix
* Reduce the replication in git_test.go
5 years ago
mrsdizzie de6ef14d04 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 ago
Robert A. Nowak 592924a34b Fix Erlang and Elixir highlight mappings (#7044) 5 years ago
Lunny Xiao 7d12ec2abd improve github downloader on migrations (#7049)
* improve github downloader on migrations

* fix tests

* fix  uppercase function parameters
5 years ago
Richard Mahn 43cf2f3b55 Fixes #7023 - API Org Visibility (#7028) 5 years ago
GiteaBot d95caf50ec [skip ci] Updated translations via Crowdin 5 years ago
John Olheiser 97b6368b7d 1.8.2 changelog (#7079) (#7088)
* 1.8.2 changelog
5 years ago
Richard Mahn 1831b3b571 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
GiteaBot cdd10f145b [skip ci] Updated translations via Crowdin 5 years ago
Sergey Dryabzhinsky 3fd18838aa 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 ago
Rob Watson d7494046ac bug fix: add single comment in split diff mode (#4745) (#7052)
Signed-off-by: Rob Watson <rfwatson@users.noreply.github.com>
5 years ago
zeripath 57b2ce03d5
Handle early git version's lack of get-url (#7065) 5 years ago
GiteaBot d01e728090 [skip ci] Updated translations via Crowdin 5 years ago
Bo-Yi Wu 743697a549
refactor: append, build variable and type switch (#4940)
* refactor: append, build variable and type switch

* fix: remove redundant space.
5 years ago
zeripath 31557b1274
Fix LFS Locks over SSH (#6999)
* Fix LFS Locks over SSH
* Mark test as skipped
5 years ago
GiteaBot 27b271d457 [skip ci] Updated translations via Crowdin 5 years ago
Bo-Yi Wu 66863ab770 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 ago
zeripath bd9ed96da5
Install page - Handle invalid administrator username better (#7060)
* Install page - detect invalid admin username before installing

* Also fix #6954
5 years ago
zeripath 69d81b6569
Handle insecure and ports in go get (#7041)
* Handle insecure and ports in go get

* Fix IsExternalURL for non-standard ports
5 years ago
Sandro Santilli 9ca7fcddbb "It's all in GitHub" isn't true anymore, update the home template (#7059)
NOTE: this commit only updates the english section
5 years ago
Hui Hui cf3ffebfde 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 ago
zeripath 2c412f517a Add FHS-compliant-script (#6923) 5 years ago
Lunny Xiao d67fd69474 fix charset was not saved after installation finished (#7048) 5 years ago
Lunny Xiao f3d87da3e2 Revert "Bugfix: Align comment label and actions to the right (#7024)" (#7055)
This reverts commit 0c432d26fe.
5 years ago
Lunny Xiao c2f3938a58 fix possbile mysql invalid connnection error (#7051) 5 years ago
Lunny Xiao 063fa99159
when git version >= 2.18, git command could run with git wire protocol version 2 param if enabled (#7047) 5 years ago
Tekaoh 6c16febe4d Update config-cheat-sheet.en-us.md (#7046) 5 years ago
Mura Li 5a722ae812 Timeout test commands without complicated tricks (#7020) 5 years ago
Rob Watson daaae2aad5 migrations: ensure rollback on error (#7039) (#7040) 5 years ago
Lunny Xiao 355ab0c62c Fix wrong init dependency on markup extensions (#7038)
* fix wrong init dependency on markup extensions
5 years ago
Mario Lubenka 0c432d26fe 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 ago
Rob Watson df2557835b 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
GiteaBot 5f05aa13e0 [skip ci] Updated translations via Crowdin 5 years ago
techknowlogick a83c80a000 Disable arm7 builds (#7037)
* Disable arm7 builds

As arm6 works on arm7 platforms with no noticeable performance difference

* 386
5 years ago
Marat Radchenko 844f9a4bd8 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
GiteaBot 61f00bc238 [skip ci] Updated translations via Crowdin 5 years ago
jpicht 8cd4c2242c 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
GiteaBot 6ff9349a09 [skip ci] Updated translations via Crowdin 5 years ago
Vladimir Panteleev a98e085031 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 ago
Lunny Xiao d5a98a2969 Add support of utf8mb4 for mysql (#6992) 5 years ago