aboutsummaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Prevent upload (overwrite) of lfs locked file (#8769)David Svantesson2019-11-021-7/+17
| | | | | | | | | | | | * Check if file is locked on upload file commit. * Better user message if file is locked. * Check lfs lock before creating temporary repository. fix some errors. * move lines * Add comment that enabled setting is checked.
* On windows set core.longpaths true (#8776)zeripath2019-11-021-0/+8
|
* Move issue milestone assign to issue service and move webhook to ↵Lunny Xiao2019-11-024-4/+46
| | | | notification (#8780)
* Rename HookQueue to hookQueue (#8778)Lunny Xiao2019-11-024-37/+16
| | | | | | * Rename HookQueue to hookQueue * fix lint
* Move labels webhooks to notification (#8749)Lunny Xiao2019-11-021-0/+47
| | | | | | * Move webhooks to notification * fix notification
* Move webhook to a standalone package under modules (#8747)Lunny Xiao2019-11-016-37/+509
| | | | | | | | * Move webhook to a standalone package under modules * fix test * fix comments
* Unifies commit list in repository commit table and wiki revision page (#7907)Mario Lubenka2019-11-011-0/+12
| | | Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Fix commit expand button to not go to commit link (#8745)Lauris BH2019-11-011-14/+27
| | | | | | | | | | * Fix commit expand button to not go to commit link * Fix message rendering to have correct HTML in result * Fix check for empty commit message * Code optimization
* Allow cross-repository dependencies on issues (#7901)Brad Albright2019-10-317-23/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
* Rewrite markdown rendering to blackfriday v2 and rewrite orgmode rendering ↵Lauris BH2019-10-316-335/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to go-org (#8560) * Rewrite markdown rendering to blackfriday v2.0 * Fix style * Fix go mod with golang 1.13 * Fix blackfriday v2 import * Inital orgmode renderer migration to go-org * Vendor go-org dependency * Ignore errors :/ * Update go-org to latest version * Update test * Fix go-org test * Remove unneeded code * Fix comments * Fix markdown test * Fix blackfriday regression rendering HTML block
* Configurable close and reopen keywords for PRs (#8120)guillep2k2019-10-303-76/+190
| | | | | | | | | | * Add settings for CloseKeywords and ReopenKeywords * Fix and improve tests * Use sync.Once() for initialization * Fix unintended exported function
* Move webhook codes from service to webhook notification (#8712)Lunny Xiao2019-10-302-0/+88
| | | | | | | | * Move webhook codes from service to webhook notification * move deletecomment webhook to notifications * fix notification
* Move issue change content from models to service (#8711)Lunny Xiao2019-10-301-0/+38
| | | | | | * Move issue change content from models to service * fix lint
* Add basic repository lfs management (#7199)zeripath2019-10-287-3/+205
| | | | | | | | | | | | This PR adds basic repository LFS management UI including the ability to find all possible pointers within the repository. Locks are not managed at present but would be addable through some simple additions. * Add basic repository lfs management * add auto-associate function * Add functionality to find commits with this lfs file * Add link to find commits on the lfs file view * Adjust commit view to state the likely branch causing the commit * Only read Oid from database
* Move issue notifications (#8713)Lunny Xiao2019-10-291-0/+15
|
* Move issue change status from models to service (#8691)Lunny Xiao2019-10-281-1/+42
|
* Move more issue assignee code from models to issue service (#8690)Lunny Xiao2019-10-281-0/+92
| | | | | | * Move more issue assignee code from models to issue service * fix test
* Move some repositories' operations to a standalone service package (#8557)Lunny Xiao2019-10-262-0/+65
| | | | | | | | | | | | * Move some repositories' operations to a standalone service package * improve code * remove unused codes * add rollback when fork failed * add repo when return
* Mail assignee when issue/pull request is assigned (#8546)David Svantesson2019-10-254-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Send email to assigned user * Only send mail if enabled * Mail also when assigned through API * Need to refactor functions from models to issue service * Refer to issue index rather than ID * Disable email notifications completly at initalization if global disable * Check of user enbled mail shall be in mail notification function only * Initialize notifications from routers init function. * Use the assigned comment when sending assigned mail * Refactor so that assignees always added as separate step when new issue/pr. * Check error from AddAssignees * Check if user can be assiged to issue or pull request * Missing return * Refactor of CanBeAssigned check. CanBeAssigned shall have same check as UI. * Clarify function names (toggle rather than update/change), and clean up. * Fix review comments. * Flash error if assignees was not added when creating issue/pr * Generate error if assignee users doesn't exist
* Use AppSubUrl for more redirections (#8647)zeripath2019-10-231-1/+1
| | | | Fix #8461 - fix misspelling of {{AppSubUrl}} and other misspelling in template Fixes /explore and organisation redirection
* Graceful fixes (#8645)zeripath2019-10-234-7/+33
| | | | | | | | | | * Only attempt to kill parent once * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Add waitgroup for running servers
* Add SubURL to redirect path (#8632)John Olheiser2019-10-221-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* [assets] configurable URL for static resources (#7911)Jakob Ackermann2019-10-222-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * static url * add cors support for static resources * [assets] work on the migration to configurable url for assets Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [misc] fix whitespace Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [assets] fix the loading of the manifest.json It is generated dynamically, and as such can not be served by the cdn. Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * Revert "add cors support for static resources" This reverts commit 42f964fd181dbb8b139808b9be623470d4f0e40f Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [docs] add the STATIC_URL_PREFIX option Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [docs] reverse-proxy: nginx: add two setups for STATIC_URL_PREFIX Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [assets] migrate the url of a new asset to the static url prefix REF: f2a3abc683ad4b2177b7c7c6160a2c0b4316120a Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* Expose db.SetMaxOpenConns and allow non MySQL dbs to set conn pool params ↵zeripath2019-10-211-5/+9
| | | | | | | | (#8528) * Expose db.SetMaxOpenConns and allow other dbs to set their connection params * Add note about port exhaustion Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Allow Protected Branches to Whitelist Deploy Keys (#8483)zeripath2019-10-212-1/+4
| | | | | | | | | | | | | | | Add an option to protected branches to add writing deploy keys to the whitelist for pushing. Please note this is technically a breaking change: previously if the owner of a repository was on the whitelist then any writing deploy key was effectively on the whitelist. This option will now need to be set if that is desired. Closes #8472 Details: * Allow Protected Branches to Whitelist Deploy Keys * Add migration * Ensure that IsDeployKey is set to false on the http pushes * add not null default false
* Ensure default gpg settings not nil and found commits have reference to repo ↵zeripath2019-10-201-0/+1
| | | | | | | | | | (#8604) * Ensure defaultGPGSettings not nil * Ensure that coerced commits gain a reference to the repo * Add warning if trying to get defaultgpgsetting on an unattached commit
* Fix #8582 by handling empty repos (#8587)Jonas Franz2019-10-192-0/+19
| | | | | | | | | | * Fix #8582 by handling empty repos Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix tests Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add setting to disable BASIC authentication (#8586)zeripath2019-10-192-0/+5
| | | Closes #8561.
* Improve webhooks (#8583)John Olheiser2019-10-181-0/+8
| | | | | | | | | | | | | | * Improve webhooks Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update MSTeams and ReviewPayload comment Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add repo.FullName to comments Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Fix bug on pull requests when transfer head repository (#8564)Lunny Xiao2019-10-181-8/+7
| | | | | | | | * fix bug on pull requests when transfer head repository * add migration and fix lint * fix tests and add a cache check on LoadBaseRepo
* Upgrade xorm to v0.8.0 (#8536)Lunny Xiao2019-10-171-1/+1
|
* Allow externalID to be UUID (#8551)Wenxuan Zhao2019-10-171-7/+1
| | | Signed-off-by: Wenxuan Zhao <viz@linux.com>
* Allow committing / adding empty files using the web ui (#8420) (#8532)Lukas2019-10-161-1/+1
| | | | | | | | | | * Allow committing / adding empty files from the web ui (#8420) Signed-off-by: LukBukkit <luk.bukkit@gmail.com> * Add a modal to confirm the commit of an empty file Signed-off-by: LukBukkit <luk.bukkit@gmail.com>
* Restrict modules/graceful to non-windows build and shim the IsChild marker ↵zeripath2019-10-168-0/+25
| | | | (#8537)
* Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631)zeripath2019-10-1610-17/+166
| | | | | | | | | | | | | | | | | | | This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
* Ensure that GitRepo is set on Empty repositories (#8539)zeripath2019-10-161-2/+8
| | | | | | Both issues/new and settings/hooks/git expect `ctx.Repo.GitRepo` to be set. This PR changes the context code to open the GitRepo. Fixes #8538
* Fix password complexity regex for special characters (on master) (#8525)guillep2k2019-10-163-42/+120
| | | | | | | | | | | | | | | | | | | | * Fix extra space * Fix regular expression * Fix error template name * Simplify check code, fix default values, add test * Fix router tests * Fix fmt * Fix setting and lint * Move cleaning up code to test, improve comments * Tidy up variable declaration
* upgrade gopkg.in/editorconfig/editorconfig-core-go.v1 (#8501)Colin Arnott2019-10-152-3/+7
| | | | | editorconfig-core-go made breaking api changes and has recently released v2.1.1. This change consumes the new api and fixes up any breaking references.
* upgrade gopkg.in/ini.v1 (#8500)Colin Arnott2019-10-151-1/+1
| | | | ini released v1.48.0 and deprecated the ini.AllCapsUnderscore symbol, as such, during the upgrade we migrated to using ini.SnackCase.
* Restore Graceful Restarting & Socket Activation (#7274)zeripath2019-10-1516-93/+1083
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prevent deadlock in indexer initialisation during graceful restart * Move from gracehttp to our own service to add graceful ssh * Add timeout for start of indexers and make hammer time configurable * Fix issue with re-initialization in indexer during tests * move the code to detect use of closed to graceful * Handle logs gracefully - add a pid suffix just before restart * Move to using a cond and a holder for indexers * use time.Since * Add some comments and attribution * update modules.txt * Use zero to disable timeout * Move RestartProcess to its own file * Add cleanup routine
* Enable Uploading/Removing Attachments When Editing an Issue/Comment (#8426)blueworrybear2019-10-151-0/+10
|
* Move clearlabels from models to issue service (#8326)Lunny Xiao2019-10-152-0/+69
| | | | | | | | | | * move clearlabels from models to issue service * improve code * Apply suggestions from code review Co-Authored-By: zeripath <art27@cantab.net>
* Move AddTestPullRequestTask to pull service package from models (#8324)Lunny Xiao2019-10-151-1/+2
| | | | | | * move AddTestPullRequestTask to pull service package from models * fix fmt
* Support inline rendering of CUSTOM_URL_SCHEMES (#8496)guillep2k2019-10-154-11/+66
| | | | | | | | | | * Support inline rendering of CUSTOM_URL_SCHEMES * Fix lint * Add tests * Fix lint
* Make static resouces web browser cache time customized on app.ini (#8442)Lunny Xiao2019-10-141-0/+2
| | | | | | | | | | | | | | * make static resouces web browser cache time customized on app.ini * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-Authored-By: zeripath <art27@cantab.net> * Update custom/conf/app.ini.sample Co-Authored-By: Antoine GIRARD <sapk@users.noreply.github.com> * fix docs
* Fix errors in create org UI regarding team access permission. (#8506)David Svantesson2019-10-141-2/+3
|
* Password Complexity Checks (#6230)Maxim Tkachenko2019-10-142-0/+95
| | | | | | | | | Add password complexity checks. The default settings require a lowercase, uppercase, number and a special character within passwords. Co-Authored-By: T-M-A <maxim.tkachenko@gmail.com> Co-Authored-By: Lanre Adelowo <adelowomailbox@gmail.com> Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-Authored-By: Lauris BH <lauris@nix.lv>
* Update migrated repositories' issues/comments/prs poster id if user has a ↵Lunny Xiao2019-10-148-75/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | github external user saved (#7751) * update migrated issues/comments when login as github * add get userid when migrating or login with github oauth2 * fix lint * add migrations for repository service type * fix build * remove unnecessary dependencies on migrations * add cron task to update migrations poster ids and fix posterid when migrating * fix lint * fix lint * improve code * fix lint * improve code * replace releases publish id to actual author id * fix import * fix bug * fix lint * fix rawdata definition * fix some bugs * fix error message
* Rewrite reference processing code in preparation for opening/closing from ↵guillep2k2019-10-137-152/+1016
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | comment references (#8261) * Add a markdown stripper for mentions and xrefs * Improve comments * Small code simplification * Move reference code to modules/references * Fix typo * Make MarkdownStripper return [][]byte * Implement preliminary keywords parsing * Add FIXME comment * Fix comment * make fmt * Fix permissions check * Fix text assumptions * Fix imports * Fix lint, fmt * Fix unused import * Add missing export comment * Bypass revive on implemented interface * Move mdstripper into its own package * Support alphanumeric patterns * Refactor FindAllMentions * Move mentions test to references * Parse mentions from reference package * Refactor code to implement renderizable references * Fix typo * Move patterns and tests to the references package * Fix nil reference * Preliminary rendering attempt of closing keywords * Normalize names, comments, general tidy-up * Add CSS style for action keywords * Fix permission for admin and owner * Fix golangci-lint * Fix golangci-lint
* IsBranchExist: return false if provided name is empty (#8485)zeripath2019-10-131-2/+8
| | | | | | * IsBranchExist: return false if provided name is empty * Ensure that the reference returned is actually of a valid type