542 Commits (69dfe43ffc865bfa9c7a81375752d064a0013df3)

Author SHA1 Message Date
Ethan Koenig b689bb6180 Webhooks for repo creation/deletion (#1663)
* Webhooks for repo creation/deletion

* add createHookTask

* Add handles for GetSlackPayload and GetDiscordPayload
7 years ago
Lauris BH edb95faba2 Fix releases to be counted from database not tags (#2389) 7 years ago
Manuel d9d8fad230 Add UseCompatSSHURI setting (#2356)
* Add UseCompatSSHURI setting

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com> (+1 squashed commits)

Squashed commits:

[dda2dc79] Add ForceCloneSSHURL setting

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>

* Make protocol if construct more readable

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>
7 years ago
Ethan Koenig f29458bd3a EnableUnit() -> UnitEnabled() (#2242) 7 years ago
Lauris BH 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
7 years ago
Lauris BH f189ccd2d6 Fix git hooks update to receive required arguments. Fixes #2090 (#2095)
* Changed migration calling so that migrations can use models package
7 years ago
Lauris BH 6db387a21e Refactor session close as xorm already does everything needed internally (#2020) 7 years ago
Lunny Xiao e2ec4b7c23 fix bu ong normal user visit public repo (#1984) 7 years ago
Lunny Xiao 31b5e9177f fix collborators lack of units on orgnization repositories (#1968)
* fix collborators lack of units on orgnization repositories

* also change log level to debug
7 years ago
Ethan Koenig e0a63a20e0 Fix errors caused by force push (#1927) 7 years ago
Phil Hopper 6ec07a6bd7 Make `LocalCopyPath` a setting instead of a hard-coded path (#1881) 7 years ago
Ethan Koenig bfb44f8854 Fix status table race condition (#1835) 7 years ago
Ethan Koenig 474d636794 Update code.gitea.io/git (#1824)
* Update code.gitea.io/git

* Update function calls

* govendor fetch
7 years ago
Ethan Koenig 9c66d1d9ea Fix deadlock in updateRepository (#1813) 7 years ago
Ethan Koenig bdc90aeaee Delete repo redirects on repo deletion (#1776) 7 years ago
Ethan Koenig b0308d86dc Fix unloaded owner (#1770) 7 years ago
Lunny Xiao 6362462da8
fix admin lost permission caused by #947 7 years ago
Lunny Xiao 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
7 years ago
Ethan Koenig 9e627af9a4 gofmt (#1710) 7 years ago
guyzmo 397474ecb1 Added Parent property to the repo API (#1687)
Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
7 years ago
guyzmo 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>
7 years ago
Kim "BKC" Carlbäcker 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
7 years ago
Jonas 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
7 years ago
Jonas 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()
7 years ago
Philippe Kueck 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
7 years ago
Bo-Yi Wu 1c3bd436cc feat: Only use issue and wiki on repo. (#1297) 7 years ago
Ethan Koenig ec0ae5d50c Refactor and fix incorrect comment (#1247) 7 years ago
Lunny Xiao f5476bdbb1 bug fixed for delete repo failed (#1193) 7 years ago
Bo-Yi Wu d76d67de23 feat: expose url field on issue api. (#982)
* Add api url func.

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

* fix: Add unit testing.

* fix: conflicts

* fix: remove trim

* fix: revert test function name.
7 years ago
Lunny Xiao 9cb08a3cf5 fix wrong num of user repos because of duplicated click delete button & performance optimization (#1092) 7 years ago
Ethan Koenig 136e6beb0f Fix unused Engine bugs (#1064) 7 years ago
Lunny Xiao 32faec00e6 move all repo list functions as a standalone file (#1061) 7 years ago
Bo-Yi Wu 95574a3640 fix: Admin can see all private repositories on Explore page. (#1026)
* fix: Admin can see all private repositories on Explore page.

* refactor: fix session
7 years ago
Andrey Nering 946f3078d3 Add "mirror" field to repo API 7 years ago
Bo-Yi Wu f1412142e0 refactor: repo counts for SearchRepositoryByName func (#1045) 7 years ago
Lunny Xiao c0ea3963be fix delete repo will hang on postgres (#1044) 7 years ago
Lunny Xiao 0e6b9ea786 Take back control of hooks (#1006)
* git: delegate all server-side Git hooks (#1623)

* create hooks directories

* take control hooks back

* fix lint

* bug fixed and minor changes

* fix imports style

* fix migration scripts
7 years ago
Ethan Koenig ec3a696e2d Fix lint errors 7 years ago
Bo-Yi Wu 83b6d03231 fix: Wrong repo list on Explore page if user already loggin. (#1009)
* fix: Wrong repo list on Explore page if user already loggin.

* fix: code readable.

* fix: declare variable
7 years ago
Denis Denisov fd941db246 Protected branches system (#339)
* Protected branches system

* Moved default branch to branches section (`:org/:reponame/settings/branches`).
* Initial support Protected Branch.
  - Admin does not restrict
  - Owner not to limit
  - To write permission restrictions

* reformat tmpl

* finished the UI and add/delete protected branch response

* remove unused comment

* indent all the template files and remove ru translations since we use crowdin

* fix the push bug
7 years ago
Ethan Koenig be48b32e63 Unit tests for repo watching (#963) 7 years ago
Bo-Yi Wu a31f64d639 fix: 500 error on /explore/repos page. (#946) 7 years ago
Bo-Yi Wu 9d2b830275 refactor: small optimize for sql query (#940)
* refactor: small optimize for sql query

* fix: get owner name if Searcher is not nil or user star page.
7 years ago
Lunny Xiao 3a91ac51a9 fix bug of multiple forks (#928) 7 years ago
Bo-Yi Wu 23aba523b5 feat: support search bar on star tab of user profile. (#917)
* feat: support search bar on star tab of user profile.

* fix: update testing.

* fix: Using loadAttributes

* fix: remove empty line.

* remove LOWER

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
7 years ago
Bo-Yi Wu 5cc275b1de feat: add git version on admin panel. (#921) 7 years ago
Morgan Bazalgette 442145dbd3 Fix public activity showing private repos (#892)
* Fix public activity showing private repos (#811)

Signed-off-by: Morgan Bazalgette <the@howl.moe>

* error check after setting is_private to true

* Add test for UpdateRepository w/ visibility change
7 years ago
Andrew 42835c7f82 Implement archive cleanup (#885)
* Implement archive cleanup

Fixes #769

Signed-off-by: Andrew <write@imaginarycode.com>

* Make sure to close the directory file

* Resolve issues noted by @strk

* edit cheatsheet app.ini [ci skip]

* oops [ci skip]
7 years ago
Bo-Yi Wu 71d35dae8c fix: wrong pages number which includes private repository count. (#844) 7 years ago
Ethan Koenig 027591a3a5 Redirects for renamed repos (#807)
* Redirects for renamed repos

* Remove unused phrase from locales
7 years ago