Commit Graph

517 Commits (9182a35f18b6d5cd981486852028e670984145c3)

Author SHA1 Message Date
Bo-Yi Wu 1c3bd436cc feat: Only use issue and wiki on repo. ()
Ethan Koenig ec0ae5d50c Refactor and fix incorrect comment ()
Lunny Xiao f5476bdbb1 bug fixed for delete repo failed ()
Bo-Yi Wu d76d67de23 feat: expose url field on issue api. ()
* 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.
Lunny Xiao 9cb08a3cf5 fix wrong num of user repos because of duplicated click delete button & performance optimization ()
Ethan Koenig 136e6beb0f Fix unused Engine bugs ()
Lunny Xiao 32faec00e6 move all repo list functions as a standalone file ()
Bo-Yi Wu 95574a3640 fix: Admin can see all private repositories on Explore page. ()
* fix: Admin can see all private repositories on Explore page.

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

* create hooks directories

* take control hooks back

* fix lint

* bug fixed and minor changes

* fix imports style

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

* fix: code readable.

* fix: declare variable
Denis Denisov fd941db246 Protected branches system ()
* 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
Ethan Koenig be48b32e63 Unit tests for repo watching ()
Bo-Yi Wu a31f64d639 fix: 500 error on /explore/repos page. ()
Bo-Yi Wu 9d2b830275 refactor: small optimize for sql query ()
* refactor: small optimize for sql query

* fix: get owner name if Searcher is not nil or user star page.
Lunny Xiao 3a91ac51a9 fix bug of multiple forks ()
Bo-Yi Wu 23aba523b5 feat: support search bar on star tab of user profile. ()
* 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>
Bo-Yi Wu 5cc275b1de feat: add git version on admin panel. ()
Morgan Bazalgette 442145dbd3 Fix public activity showing private repos ()
* Fix public activity showing private repos ()

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

* error check after setting is_private to true

* Add test for UpdateRepository w/ visibility change
Andrew 42835c7f82 Implement archive cleanup ()
* Implement archive cleanup

Fixes 

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]
Bo-Yi Wu 71d35dae8c fix: wrong pages number which includes private repository count. ()
Ethan Koenig 027591a3a5 Redirects for renamed repos ()
* Redirects for renamed repos

* Remove unused phrase from locales
Lunny Xiao 8a421b1fd7 Add units concept for modulable functions of a repository ()
* Add units concept for modulable functions of a repository

* remove unused comment codes & fix lints and tests

* remove unused comment codes

* use struct config instead of map

* fix lint

* rm wrong files

* fix tests
Bo-Yi Wu a90a215662 feat: Add search bar on user profile page. ()
Ethan Koenig 68bdaf0a6b Drop redundant columns from issue_user table ()
Gabriel Jackson bf6f61cc69 Cleanup log messaging
This change corrects a few logging issues:

 * Standardized formatting errors with '%v'.
 * Standardized failure warning word usage.
 * Corrected an instance of using the standard log library when
   the gitea log library should be used instead.
Lunny Xiao bb5a6b7a07 fix xorm NewSession uncorrected usages ()
Matthias Loibl d1006150fb Refactor process package and introduce ProcessManager{} with tests ()
* Add a process.Manager singleton with process.GetManager()

* Use process.GetManager everywhere

* Fix godoc comments for process module

* Increment process counter id after locking the mutex
Lunny Xiao 87ad4961f6 bug fixed for update repository ()
Ethan Koenig 8422ab542c API endpoint for subscribers ()
Andrey Nering 03b45284e1 Merge pull request from ethantkoenig/tests/pull
Unit tests for models/pull.go
Andrey Nering 84b7d29d34 Create missing database indexes ()
Ethan Koenig 72bfabfada Unit tests for models/pull.go
Ethan Koenig 1207bda94b Fix typos in models/ ()
Lunny Xiao 6e5fffbd3f resolved : when migrate empty wiki repo, then ignore ()
Andrey Nering b992858883 Tab on user profile to show starred repos ()
* Tab on user profile to show starred repos

* Make golint happy and use transactions on StarRepo function

* x -> sess

* Use sess.Close() instead of sess.Rollback()

* Add copyright

* Fix lint
Bwko 331316894e Replace Gogs with Gitea ()
Fabian Zaremba 2e7ccecfe6 Git LFS support v2 ()
* Import github.com/git-lfs/lfs-test-server as lfs module base

Imported commit is 3968aac269a77b73924649b9412ae03f7ccd3198

Removed:

Dockerfile CONTRIBUTING.md mgmt* script/ vendor/ kvlogger.go
.dockerignore .gitignore README.md

* Remove config, add JWT support from github.com/mgit-at/lfs-test-server

Imported commit f0cdcc5a01599c5a955dc1bbf683bb4acecdba83

* Add LFS settings

* Add LFS meta object model

* Add LFS routes and initialization

* Import github.com/dgrijalva/jwt-go into vendor/

* Adapt LFS module: handlers, routing, meta store

* Move LFS routes to /user/repo/info/lfs/*

* Add request header checks to LFS BatchHandler / PostHandler

* Implement LFS basic authentication

* Rework JWT secret generation / load

* Implement LFS SSH token authentication with JWT

Specification: https://github.com/github/git-lfs/tree/master/docs/api

* Integrate LFS settings into install process

* Remove LFS objects when repository is deleted

Only removes objects from content store when deleted repo is the only
referencing repository

* Make LFS module stateless

Fixes bug where LFS would not work after installation without
restarting Gitea

* Change 500 'Internal Server Error' to 400 'Bad Request'

* Change sql query to xorm call

* Remove unneeded type from LFS module

* Change internal imports to code.gitea.io/gitea/

* Add Gitea authors copyright

* Change basic auth realm to "gitea-lfs"

* Add unique indexes to LFS model

* Use xorm count function in LFS check on repository delete

* Return io.ReadCloser from content store and close after usage

* Add LFS info to runWeb()

* Export LFS content store base path

* LFS file download from UI

* Work around git-lfs client issue with unauthenticated requests

Returning a dummy Authorization header for unauthenticated requests
lets git-lfs client skip asking for auth credentials
See: https://github.com/github/git-lfs/issues/1088

* Fix unauthenticated UI downloads from public repositories

* Authentication check order, Finish LFS file view logic

* Ignore LFS hooks if installed for current OS user

Fixes Gitea UI actions for repositories tracking LFS files.
Checks for minimum needed git version by parsing the semantic version
string.

* Hide LFS metafile diff from commit view, marking as binary

* Show LFS notice if file in commit view is tracked

* Add notbefore/nbf JWT claim

* Correct lint suggestions - comments for structs and functions

- Add comments to LFS model
- Function comment for GetRandomBytesAsBase64
- LFS server function comments and lint variable suggestion

* Move secret generation code out of conditional

Ensures no LFS code may run with an empty secret

* Do not hand out JWT tokens if LFS server support is disabled
Bwko fa3abc22c0 Added sorting to organizations, repos & users page ()
Lunny Xiao a822bba3e1 Add default values for settings ()
* add default values for settings

* more default values

* more default settings and labels resource

* mv locale to options
Thomas Boerger b33078fa33 Bindata is optional and over-writable on restart ()
* Moved conf assets into options folder

* Dropped old bindata

* Started to integrate options bindata and accessors

* Do not enforce a builtin app.ini

* Replaced bindata calls with options

* Dropped bindata task from makefile, it's the generate task now

* Always embedd app.ini to provide sane config defaults

* Use sane defaults for the configuration

* Defined default value for SSH_KEYGEN_PATH

* Dropped "NEVER EVER MODIFY THIS FILE" header from app.ini

* Fixed new paths in latest test additions

* Drop bindata with make clean task

* Set more proper default values
Richie B2B 0d6e88baef Fix typo ()
Ethan Koenig 401a8db0ed Remove stale comment in models/repo.go ()
Ethan Koenig 04b9a7e7a2 Bug fixes for repo permissions in API
Also move duplicated code into repo.APIFormat(..)
Bwko 4ff0db0246 Catch os... errors
Bwko 5ab85372da Added rel="noopener" to target="_blank" hrefs ()
* Added rel="noopener" to target="_blank" hrefs

* Replaced gogs.io/docs with docs.gitea.io
Bwko bad1bc6518 Lint models/repo.go