summaryrefslogtreecommitdiffstats
path: root/models
Commit message (Collapse)AuthorAgeFilesLines
* disable git fsck for mirrored repos by default (#6018)Lanre Adelowo2019-02-091-1/+1
|
* Feature - #3031 - search for org repos (#5986)Richard Mahn2019-02-081-0/+9
|
* Add API to list tags (#5850)Lunny Xiao2019-02-071-0/+24
| | | | | | | | | | | | | | * Add API to list tags * update dependency gitea sdk vendor * fix swagger generation * fix swagger * add tests * update code.gitea.io/git vendor
* Fix empty ssh key importing in ldap (#5984)zeripath2019-02-061-3/+6
|
* Fix serving of raw wiki files other than .md (#5814)Gabriel Silva Simões2019-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix serving of raw wiki files other than .md Closes #4690. Closes #4395. Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Simplify code at routers/repo/wiki.go Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add more files to user2/repo1.wiki for testing Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Update macaron to v1.3.2 Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add tests for WikiRaw Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Fix NewResponseWriter usage due to macaron update Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add raw to reserved wiki names Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Pull request conflict files detection (#5951)Lunny Xiao2019-02-051-5/+30
| | | | | | | | | | * add conflict detection * test pull request conflict files * fix detection files number * fix comments
* Automatically clear stopwatch on merging a PR (#4327)Lanre Adelowo2019-02-051-2/+14
| | | | | | | | | | | | | | | | | | | | * Don't display buttons if there are no notices * clear stopwatch on merging a PR * remove redundant gt check * use ctx.Flash as per @bkcsoft comment * stop timer on closing issues/PRs too * updated translation as per review * redirect to login page after successfully activating account * remove unrelated changes * stop timer for issues that are closed via commits too..Not just the 'close' UI button
* Add label names as filter in issue search api (#5946)Lanre Adelowo2019-02-042-1/+38
|
* Fix ssh deploy and user key constraints (#1357) (#5939)zeripath2019-02-032-35/+73
| | | | | | | | | | | | | | | | 1. A key can either be an ssh user key or a deploy key. It cannot be both. 2. If a key is a user key - it can only be associated with one user. 3. If a key is a deploy key - it can be used in multiple repositories and the permissions it has on those repositories can be different. 4. If a repository is deleted, its deploy keys must be deleted too. We currently don't enforce any of this and multiple repositories access with different permissions doesn't work at all. This PR enforces the following constraints: - [x] You should not be able to add the same user key as another user - [x] You should not be able to add a ssh user key which is being used as a deploy key - [x] You should not be able to add a ssh deploy key which is being used as a user key - [x] If you add an ssh deploy key to another repository you should be able to use it in different modes without losing the ability to use it in the other mode. - [x] If you delete a repository you must delete all its deploy keys. Fix #1357
* show user who created the repository instead of the organization in action ↵Lanre Adelowo2019-02-041-2/+2
| | | | feed (#5948)
* handle milestone events for issues and PR (#5947)Lanre Adelowo2019-02-031-0/+8
|
* Remove all CommitStatus when a repo is deleted (#5940)John Olheiser2019-02-021-0/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* fix log output (#5938)Sergey Romanov2019-02-021-1/+1
|
* support reviewing on a deleted file path (#5880)Lanre Adelowo2019-02-011-2/+3
|
* Only allow local login if password is non-empty (#5906)zeripath2019-01-301-1/+1
|
* Fix go-get URL generation (#5905)Lauris BH2019-01-301-1/+2
|
* Don't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886)Lanre Adelowo2019-01-302-0/+45
| | | | | * Consider the configuration value of DISABLE_REGULAR_ORG_CREATION when creating a user
* Also ensure the repo is loaded (#5895)zeripath2019-01-291-0/+4
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Ensure issue.Poster is loaded in mailIssueCommentToParticipants (#5891)zeripath2019-01-291-2/+2
| | | | | | Previous code could potentially dereference nil - this PR ensures that the poster is loaded before dereferencing it. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix an error while adding a dependency via UI. (#5862)Harshit Bansal2019-01-272-2/+3
| | | Fixes: #5783
* Config option to disable automatic repo watching (#5852)sebastian-sauer2019-01-272-14/+24
| | | | | | | | | Add a new config option to enable / disable the automatic watching of repos for new repositories and if a user is added to a team. Fixes #653 Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
* Fix failing migration v67 (#5849)Jakub Arbet2019-01-261-8/+8
| | | Fixes #5848
* fix delete correct temp directory (#5839)yasuokav2019-01-251-1/+1
|
* Ensure valid git author names passed in signatures (#5774)zeripath2019-01-244-7/+60
| | | | | | | | | | | | | | | | | | | | * Ensure valid git author names passed in signatures Fix #5772 - Git author names are not allowed to include `\n` `<` or `>` and must not be empty. Ensure that the name passed in a signature is valid. * Account for pathologically named external users LDAP and the like usernames are not checked in the same way that users who signup are. Therefore just ensure that user names are also git safe and if totally pathological - Set them to "user-$UID" * Add Tests and adjust test users Make our testcases a little more pathological so that we be sure that integration tests have a chance to spot these cases. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Make sure .git/info is created before generating .git/info/sparse-che… (#5825)Mura Li2019-01-241-1/+5
| | | | | | * Make sure .git/info is created before generating .git/info/sparse-checkout * fix permissions
* When creating new repository fsck option should be enabled (#5817)Lauris BH2019-01-231-6/+7
|
* New API routes added (#5594)Shashvat Kedia2019-01-231-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New API routes added * Comments added * Build fix * swagger_v1_json.tmpl without new line character * Typo fix * Code review changes * Code review changes * Add copyright * Add copyright * Add copyright * Update per @lafriks feedback * Update org.go * Update user.go * Update user.go * make fmt
* Feature: Archive repos (#5009)kolaente2019-01-231-2/+11
|
* Optimize pulls merging (#4921)Mura Li2019-01-231-16/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Optimize pulls merging By utilizing `git clone -s --no-checkout` rather than cloning the whole repo. * Use sparse-checkout to speedup pulls merge * Use bytes.Buffer instead of strings.Builder for backward compatibility * Fix empty diff-tree output for repos with only the initial commit * Fix missing argument for the format string * Rework diff-tree-list generation * Remove logging code * File list for sparse-checkout must be prefix with / Otherwise, they would match all files with the same name under subdirectories. * Update onto the rebased head * Use referecen repo to avoid fetching objects
* Pooled and buffered gzip implementation (#5722)zeripath2019-01-231-8/+8
| | | | | | | | | | | | | | | | | | | * Pooled and buffered gzip implementation * Add test for gzip * Add integration test * Ensure lfs check within transaction The previous code made it possible for a race condition to occur whereby a LFSMetaObject could be checked into the database twice. We should check if the LFSMetaObject is within the database and insert it if not in one transaction. * Try to avoid primary key problem in postgres The integration tests are being affected by https://github.com/go-testfixtures/testfixtures/issues/39 if we set the primary key high enough, keep a count of this and remove at the end of each test we shouldn't be affected by this.
* Add the ability to use multiple labels as filters(#5786)Lauris BH2019-01-223-15/+41
|
* fix migration 78 error mssql (#5791)Lunny Xiao2019-01-211-3/+2
|
* Fix the v78 migration script (#5776)zeripath2019-01-191-0/+12
| | | | | | | | Unfortunately the last fix didn't completely fix the migration to v79 of the db due to bug with schema locking during Sync2. This should fix this issue. Fix #5759 Signed-off-by: Andrew Thornton <art27@cantab.net>
* fix migration bug (#5762)Lunny Xiao2019-01-181-8/+28
|
* Refactor repo.isBare to repo.isEmpty #5629 (#5714)zeripath2019-01-175-14/+58
| | | | | | | | * Refactor repo.isBare to repo.isEmpty #5629 Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Sync call
* Refactor notification for indexer (#5111)Lunny Xiao2019-01-174-15/+1
| | | | | | * notification for indexer * use NullNotifier as parent struct
* api: Add missing GET teams endpoints (#5382)Harshit Bansal2019-01-163-6/+32
| | | | | | | | | | | | | | | | | | | | * api: Add an endpoint to list a particular member of team. * models: Rename `GetUserTeams()` to `GetUserOrgTeams()` in `org_team` model. `GetUserTeams()` sounds a bit misnomer since it actually returns the teams that user belongs to in a given organization rather than all the teams across all the organization that the user has joined. * models: Add `GetUserTeams()`. Returns all the teams that a user belongs to. * api: Add an endpoint for GET '/user/teams'. A GET request to this endpoint lists all the teams that a user belongs to.
* Ensure that sessions are passed into queries that could use the database to ↵zeripath2019-01-136-22/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prevent deadlocks (#5718) * Fixed deadlock in CreateComment * Fix possible deadlock in UpdateIssueDeadline from createDeadlineComment * Ensure that calls to IsTimeTracker enabled are called within session Signed-off-by: Andrew Thornton <art27@cantab.net> * Ensure that calls to reactionList are also called within session Signed-off-by: Andrew Thornton <art27@cantab.net> * Ensure all calls in NewPullRequest with the session are called within the session Signed-off-by: Andrew Thornton <art27@cantab.net> * Deal with potential deadlocks in repo Signed-off-by: Andrew Thornton <art27@cantab.net> * Ensure that isStaring is checked within our transaction Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix mistake in isOrganizationMember Sorry.
* Discord Oauth2 support (#4476)techknowlogick2019-01-131-0/+1
| | | | | | | | | | | | | | * add discord auth * add vendor for discord * fix syntax error * make fmt * update version of goth in use * update markbates/goth
* Refactor mail notification (#5110)Lunny Xiao2019-01-133-9/+5
| | | | | | | | * mail notification implement interface * fix file comment year * use NullNotifier as parent struct of notifiers
* Fix migration for user defined themes (#5682)Lanre Adelowo2019-01-121-1/+1
|
* fix public will not be reused as public key after deleting as deploy key (#5671)Lunny Xiao2019-01-091-0/+5
|
* Allow for user specific themes (#5668)Lanre Adelowo2019-01-093-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | * add migration and basic UI for changing a user's theme * update user themem * use right text on button * load theme based on users' selection * load theme based on users' selection in pwa too * update sample config * delete older theme loading * implement AfterLoad to set users' theme properly * set up default theme when creating a user. This uses the installation wide theme * use flash messages for error * set default theme when creating a user from the cli * fix @lunny review
* Added URL mapping for Release attachments like on github.com (#1707)gdeverlant2019-01-062-0/+27
|
* Only count users own actions for heatmap contributions (#5647)Julian2019-01-061-3/+13
| | | | Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
* Fix sqlite deadlock when assigning to a PR (#5640)zeripath2019-01-046-9/+17
| | | | | | | | | | | | * Fix sqlite deadlock when assigning to a PR Fix 5639 Signed-off-by: Andrew Thornton <art27@cantab.net> * More possible deadlocks found and fixed Signed-off-by: Andrew Thornton <art27@cantab.net>
* Don't close issues via commits on non-default branch. (#5622)Harshit Bansal2019-01-042-40/+63
| | | | | | | | Adds a small check to close the issues only if the referencing commits are on the default branch. Fixes: #2314.
* mirror: Delete tags in mirror which are removed for original repo. (#5609)Harshit Bansal2018-12-312-2/+57
| | | | | | This bug was being caused by an error in the logic in `release.go`. Credit to @yasuokav for tracing the root of the issue. Fixes: #5192.
* update v71.go to resolve #5595 (#5613)Daniel Wolf2018-12-311-1/+1
|
* Webhook for Pull Request approval/rejection (#5027)Lanre Adelowo2018-12-275-19/+167
|