summaryrefslogtreecommitdiffstats
path: root/models/repo_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Added missing error checks in tests (#7554)Christian Muehlhaeuser2019-07-231-0/+1
| | | Whenever we assign a value to err, check for it being nil.
* Add error for fork already existing (#7185)John Olheiser2019-06-121-1/+1
|
* Repository avatars (#6986)Sergey Dryabzhinsky2019-05-291-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Remove local clones & make hooks run on merge/edit/upload (#6672)zeripath2019-05-111-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add options to git.Clone to make it more capable * Begin the process of removing the local copy and tidy up * Remove Wiki LocalCopy Checkouts * Remove the last LocalRepo helpers * Remove WithTemporaryFile * Enable push-hooks for these routes * Ensure tests cope with hooks Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Repository.LocalCopyPath() * Move temporary repo to use the standard temporary path * Fix the tests Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove LocalWikiPath * Fix missing remove Signed-off-by: Andrew Thornton <art27@cantab.net> * Use AppURL for Oauth user link (#6894) * Use AppURL for Oauth user link Fix #6843 * Update oauth.go * Update oauth.go * internal/ssh: ignore env command totally (#6825) * ssh: ignore env command totally * Remove commented code Needed fix described in issue #6889 * Escape the commit message on issues update and title in telegram hook (#6901) * update sdk to latest (#6903) * improve description of branch protection (fix #6886) (#6906) The branch protection description text were not quite accurate. * Fix logging documentation (#6904) * ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG * Allow DISABLE_ROUTER_LOG to be set in the [log] section * [skip ci] Updated translations via Crowdin * Move sdk structs to modules/structs (#6905) * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Improve issue autolinks (#6273)mrsdizzie2019-04-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * Improve issue autolinks Update autolinks to match what github does here: Issue in same repo: #1 Issue in different repo: org/repo#1 Fixes #6264 * Use setting.AppURL when parsing URL Using setting.AppURL here is a more reliable way of parsing the current URL and what other functions in this file seem to use. * Make ComposeMetas always return a valid context * Add per repository markdown renderers for better context * Update for use of context metas Now that we include the user and repo name inside context metas, update various code and tests for this new logic
* Fix repo-transfer-and-team-repo-count bug (#3241)Ethan Koenig2017-12-191-0/+23
|
* Restructure markup & markdown to prepare for multiple markup language… (#2411)Lunny Xiao2017-09-161-6/+6
| | | | | | | | | | * restructure markup & markdown to prepare for multiple markup languages support * adjust some functions between markdown and markup * fix tests * improve the comments
* Webhooks for repo creation/deletion (#1663)Ethan Koenig2017-09-031-6/+5
| | | | | | | | * Webhooks for repo creation/deletion * add createHookTask * Add handles for GetSlackPayload and GetDiscordPayload
* Include formatting check to the `make test` (and thus also `check`) rule (#1366)Sandro Santilli2017-06-061-1/+1
| | | | | | | | | | | | | | | | | | * 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`
* Make `LocalCopyPath` a setting instead of a hard-coded path (#1881)Phil Hopper2017-06-061-0/+22
|
* feat: expose url field on issue api. (#982)Bo-Yi Wu2017-03-031-0/+7
| | | | | | | | | | | | | | * 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.
* refactor: move SearchRepositoryByName testing. (#1083)Bo-Yi Wu2017-02-281-52/+0
|
* fix: Wrong repo list on Explore page if user already loggin. (#1009)Bo-Yi Wu2017-02-221-0/+52
| | | | | | | | * fix: Wrong repo list on Explore page if user already loggin. * fix: code readable. * fix: declare variable
* test: Add testing for GetUserFork function (#944)Bo-Yi Wu2017-02-151-0/+33
|
* Fix public activity showing private repos (#892)Morgan Bazalgette2017-02-111-0/+19
| | | | | | | | | | * 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
* Use assert in legacy unit tests (#867)Ethan Koenig2017-02-081-59/+30
|
* fix: wrong pages number which includes private repository count. (#844)Bo-Yi Wu2017-02-061-2/+36
|
* Add units concept for modulable functions of a repository (#742)Lunny Xiao2017-02-041-8/+16
| | | | | | | | | | | | | | | | * 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
* fixed test build errorLunny Xiao2016-11-251-6/+6
|
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-2/+2
| | | | | | | - Update import paths from github.com/go-gitea to code.gitea.io - Fix import path for travis See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
* Run goimports on the whole project (#34)Matthias Loibl2016-11-041-2/+2
| | | Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-2/+2
|
* The pruning for the synchronized mirrors is a option now. Default value: ↵Pablo Saavedra2016-07-091-13/+13
| | | | | | | | | | | | | enable_prune = true (#3246) Executed go fmt getEngine() not handles DB parameters (#2972) (#2974) Uses .AllCols() for Update in updateMirror() Spanish traslation removed Fixed a wrong way to ommit the --prune option in process.ExecDir() for MirrorUpdate function
* Support alphanumeric issue style (ABC-1234) for external issue tracker (#2992)Cosmin Stroe2016-04-221-0/+62