summaryrefslogtreecommitdiffstats
path: root/models
Commit message (Collapse)AuthorAgeFilesLines
* Change UpdateRepoIndex api to include watchers (#7012)zeripath2019-05-231-8/+13
| | | | | | * Change UpdateRepoIndex api to include watchers * Add timeout
* Make webhook http connections resuable (#6976)Lunny Xiao2019-05-211-26/+72
| | | | | | | | * make http connections resuable * add error handler * fix lint
* fix u2f registrationlist ToRegistrations() method (#6980)David Schneiderbauer2019-05-181-1/+1
|
* Fix index produces problem when issues/pulls deleted (#6973)Lunny Xiao2019-05-182-8/+28
| | | | | | | | | | * fix index produces problem when issues/pulls deleted * fix tests * fix tests * fix tests
* Stop running hooks on pr merge (#6963)zeripath2019-05-171-1/+2
| | | | | | * Stop running hooks on pr merge * Remove SSH_ORIGINAL_COMMAND from the pushing environment
* Allow collaborators to view repo owned private org (#6965)mrsdizzie2019-05-162-4/+18
| | | | | | | 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
* SearchRepositoryByName improvements and unification (#6897)zeripath2019-05-152-66/+74
|
* Webhook Logs show proper HTTP Method, and allow change HTTP method in form ↵techknowlogick2019-05-151-10/+15
| | | | | | | | | | | (#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
* Refactor models.NewRepoContext to extract git related codes to modules/git ↵Lunny Xiao2019-05-151-44/+3
| | | | | | | | | | (#6941) * refactor models.NewRepoContext to extract git related codes to modules/git * fix imports * refactor
* Add work path CLI option (#6922)zeripath2019-05-141-1/+1
| | | | | Makes it possible to set the work path as a CLI option instead of relying on environment variables which are somewhat opaque
* Remove macaron dependent on models (#6940)Lunny Xiao2019-05-142-3/+7
|
* Move xorm logger bridge from log to models so that log module could be a ↵Lunny Xiao2019-05-142-3/+108
| | | | | | | | | | 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
* remove macaron dependent on models/mail.go (#6931)Lunny Xiao2019-05-141-13/+18
|
* Use modules/git for git commands (#6775)Mura Li2019-05-131-82/+42
|
* Remove local clones & make hooks run on merge/edit/upload (#6672)zeripath2019-05-119-351/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-1124-24/+24
| | | | | | | | | | | | * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Escape the commit message on issues update and title in telegram hook (#6901)zeripath2019-05-102-2/+4
|
* Show full name if DefaultShowFullName setting activated (#6710)Wim2019-05-082-0/+26
| | | | | Adds a new key DEFAULT_SHOW_FULL_NAME (default false) to the [ui] section. If enabled the full name will be shown (unless it's empty, then the default username will be used)
* Fix 404 when send pull request some situation (#6871)Lunny Xiao2019-05-071-0/+28
|
* Improve migrations to support migrating ↵Lunny Xiao2019-05-073-15/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | milestones/labels/issues/comments/pullrequests (#6290) * add migrations * fix package dependency * fix lints * implements migrations except pull requests * add releases * migrating releases * fix bug * fix lint * fix migrate releases * fix tests * add rollback * pull request migtations * fix import * fix go module vendor * add tests for upload to gitea * more migrate options * fix swagger-check * fix misspell * add options on migration UI * fix log error * improve UI options on migrating * add support for username password when migrating from github * fix tests * remove comments and fix migrate limitation * improve error handles * migrate API will also support migrate milestones/labels/issues/pulls/releases * fix tests and remove unused codes * add DownloaderFactory and docs about how to create a new Downloader * fix misspell * fix migration docs * Add hints about migrate options on migration page * fix tests
* fix 500 when reviewer is deleted with integration tests (#6856)Lunny Xiao2019-05-063-0/+22
|
* Add mssql migration tests (#6852)zeripath2019-05-061-1/+1
|
* Attempt to fix #6707 (#6823)zeripath2019-05-051-1/+8
|
* Add GET requests to webhook (#6771)Simon2019-05-053-15/+47
| | | | | | | | | | | | | | * Add GET requests to webhook * make fmt * Handle invalid http method on webhook * Uppercase http method in webhook * Rename v85.go to v86.go * make fmt
* Fix v85.go: Set UNIQUE constraint later (#6851)zeripath2019-05-051-3/+21
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Hash App token (#6724)techknowlogick2019-05-046-23/+194
|
* Git statistics in Activity tab (#4724)Lauris BH2019-05-041-6/+82
| | | | | | | | | | | | | | | | | | * Initial implementation for git statistics in Activity tab * Create top user by commit count endpoint * Add UI and update src-d/go-git dependency * Add coloring * Fix typo * Move git activity stats data extraction to git module * Fix message * Add git code stats test
* Fix double-generation of scratch token (#6832) (#6833)SagePtr2019-05-021-5/+1
|
* When mirroring we should set the remote to mirror (#6824)zeripath2019-05-021-1/+1
|
* Improve issue reference on commit (#6694)mrsdizzie2019-05-012-9/+155
| | | | | | | | | | | | | | * Improve issue reference on commit Allow commits to properly reference issues in other repositories and also to close/reopen those issues if user has code permission. Should match Github behavior described here: https://help.github.com/en/articles/closing-issues-using-keywords Fixes 6664 * Fix missing return * Match user/repo directly in regex
* Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631)zeripath2019-04-291-0/+1
|
* LDAP: ignore already existing public keys after ldap sync (#6766)Lukas Prettenthaler2019-04-262-2/+6
| | | | | | | | | | | | | | | | | | * fix type in public key exist error, only log trace for ldap public key import if existing Signed-off-by: Lukas Prettenthaler <lukas@noenv.com> * cleanup switch statement Signed-off-by: Lukas Prettenthaler <lukas@noenv.com> * replace switch with if, fix log formatting Signed-off-by: Lukas Prettenthaler <lukas@noenv.com> * fix formatting Signed-off-by: Lukas Prettenthaler <lukas@noenv.com>
* fix pulls broken when fork repository deleted (#6754)Lunny Xiao2019-04-262-0/+22
| | | | | | * fix pulls broken when fork repository deleted * fix lint
* Fix org visibility bug when git cloning (#6743)Lunny Xiao2019-04-257-3/+184
| | | | | | | | | | | | | | * fix org visibility bug * fix permission check * add integration tests * fix tests * change test user name for easier maintainance and fix test * fix test git repo name
* fix new team 500 (#6749)Lunny Xiao2019-04-251-0/+5
| | | | | | | | * fix new team 500 * Update models/unit.go Co-Authored-By: lunny <xiaolunwen@gmail.com>
* Fix: Sort repos on org home page with non-admin login (#6741)Lunny Xiao2019-04-241-3/+11
|
* Drop is_bare IDX only when it exists for MySQL and MariaDB (#6736)Lanre Adelowo2019-04-241-0/+10
| | | | | | * Drop is_bare IDX only when it exists * show indexes only on mysql or mariadb
* Disable web preview for telegram webhook (#6719)techknowlogick2019-04-231-2/+4
|
* Trace Logging on Permission Denied & ColorFormat (#6618)zeripath2019-04-226-1/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add log.ColorFormat and log.ColorFormatted Structs can now implement log.ColorFormatted to provide their own colored format when logged with `%-v` or additional flags. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add basic ColorFormat to repository and user Signed-off-by: Andrew Thornton <art27@cantab.net> * Add basic ColorFormat to access and unit Signed-off-by: Andrew Thornton <art27@cantab.net> * Add ColorFormat to permission and on trace log it Signed-off-by: Andrew Thornton <art27@cantab.net> * Add log.NewColoredIDValue to make ID value coloring consistent Signed-off-by: Andrew Thornton <art27@cantab.net> * formatting changes * Add some better tracing to permission denied for read issues/pulls Signed-off-by: Andrew Thornton <art27@cantab.net> * Add Trace logging on permission denied Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove isTrace() check from deferred func * Adjust repo and allow logging of team * use FormatInt instead of Itoa * Add blank line Signed-off-by: Andrew Thornton <art27@cantab.net> * Update access.go
* Add option to blame files (#5721)Andrzej Ressel2019-04-192-0/+265
|
* Add support for MS Teams webhooks (#6632)Daniel Grier2019-04-192-0/+712
|
* Improve listing performance by using go-git (#6478)Filip Navara2019-04-193-64/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use go-git for tree reading and commit info lookup. Signed-off-by: Filip Navara <navara@emclient.com> * Use TreeEntry.IsRegular() instead of ObjectType that was removed. Signed-off-by: Filip Navara <navara@emclient.com> * Use the treePath to optimize commit info search. Signed-off-by: Filip Navara <navara@emclient.com> * Extract the latest commit at treePath along with the other commits. Signed-off-by: Filip Navara <navara@emclient.com> * Fix listing commit info for a directory that was created in one commit and never modified after. Signed-off-by: Filip Navara <navara@emclient.com> * Avoid nearly all external 'git' invocations when doing directory listing (.editorconfig code path is still hit). Signed-off-by: Filip Navara <navara@emclient.com> * Use go-git for reading blobs. Signed-off-by: Filip Navara <navara@emclient.com> * Make SHA1 type alias for plumbing.Hash in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Make Signature type alias for object.Signature in go-git. Signed-off-by: Filip Navara <navara@emclient.com> * Fix GetCommitsInfo for repository with only one commit. Signed-off-by: Filip Navara <navara@emclient.com> * Fix PGP signature verification. Signed-off-by: Filip Navara <navara@emclient.com> * Fix issues with walking commit graph across merges. Signed-off-by: Filip Navara <navara@emclient.com> * Fix typo in condition. Signed-off-by: Filip Navara <navara@emclient.com> * Speed up loading branch list by keeping the repository reference (and thus all the loaded packfile indexes). Signed-off-by: Filip Navara <navara@emclient.com> * Fix lising submodules. Signed-off-by: Filip Navara <navara@emclient.com> * Fix build Signed-off-by: Filip Navara <navara@emclient.com> * Add back commit cache because of name-rev Signed-off-by: Filip Navara <navara@emclient.com> * Fix tests Signed-off-by: Filip Navara <navara@emclient.com> * Fix code style * Fix spelling * Address PR feedback Signed-off-by: Filip Navara <navara@emclient.com> * Update vendor module list Signed-off-by: Filip Navara <navara@emclient.com> * Fix getting trees by commit id Signed-off-by: Filip Navara <navara@emclient.com> * Fix remaining unit test failures * Fix GetTreeBySHA * Avoid running `git name-rev` if not necessary Signed-off-by: Filip Navara <navara@emclient.com> * Move Branch code to git module * Clean up GPG signature verification and fix it for tagged commits * Address PR feedback (import formatting, copyright headers) * Make blob lookup by SHA working * Update tests to use public API * Allow getting content from any type of object through the blob interface * Change test to actually expect the object content that is in the GIT repository * Change one more test to actually expect the object content that is in the GIT repository * Add comments
* Telegram webhook (#4227)techknowlogick2019-04-183-0/+343
|
* UX + Security current user password reset (#5042)AJ ONeal2019-04-181-1/+1
| | | | | | | | | | | | | | * allow current user to reset their own password * handle reset password edge cases properly and consistently * remove dangling assignment * properly label account recovery instead of reset password * remove 'Click here' from button * update English-only account-recovery templates
* Comments list performance optimization (#5305)Lunny Xiao2019-04-183-35/+533
|
* Fixes 4762 - Content API for Creating, Updating, Deleting Files (#6314)Richard Mahn2019-04-172-18/+152
|
* OAuth2 Grant UI (#6625)Jonas Franz2019-04-172-6/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add oauth2 grants ui Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add delete functionality Add translations Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Signed-off-by: Jonas Franz <info@jonasfranz.software> * Refactor DeleteOAuth2Grant Use results.Close() Signed-off-by: Jonas Franz <info@jonasfranz.software> * Refactor DeleteOAuth2Grant (again) Signed-off-by: Jonas Franz <info@jonasfranz.software> * Check if user ID is zero Signed-off-by: Jonas Franz <info@jonasfranz.software> * Check if grant ID is zero Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add API for manipulating Git hooks (#6436)Segev Finer2019-04-174-6/+52
| | | | | | | | | | | | | | | | | | | | | | | | * Add API for manipulating Git hooks Signed-off-by: Segev Finer <segev@codeocean.com> * Replace code.gitea.io/sdk with PR branch temporarily for CI * Switch back to code.gitea.io/sdk@master * Return 403 instead of 404 on no permission to edit hooks in API * Add tests for Git hooks API * Update models/repo_list_test.go Co-Authored-By: segevfiner <segev208@gmail.com> * Update models/repo_list_test.go Co-Authored-By: segevfiner <segev208@gmail.com> * empty line
* Fix wrong GPG expire date (#6643)Antoine GIRARD2019-04-152-6/+162
| | | | | | * fix expire of gpg relative to key creation https://tools.ietf.org/html/rfc4880#section-5.2.3.6 * add test
* Fix forking an empty repository (#6637)Segev Finer2019-04-151-0/+1
| | | | | Fixes #6633 Signed-off-by: Segev Finer <segev@codeocean.com>