summaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Do not attempt to return blob on submodule (#6996)zeripath2019-05-211-1/+1
|
* fix missing repo description when migrating (#7000)Lunny Xiao2019-05-201-0/+3
|
* Stop colorizing files by default (#6949)zeripath2019-05-151-2/+0
|
* Refactor models.NewRepoContext to extract git related codes to modules/git ↵Lunny Xiao2019-05-153-3/+29
| | | | | | | | | | (#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/+4
| | | | | Makes it possible to set the work path as a CLI option instead of relying on environment variables which are somewhat opaque
* Move xorm logger bridge from log to models so that log module could be a ↵Lunny Xiao2019-05-142-115/+0
| | | | | | | | | | 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 modules/log (#6933)Lunny Xiao2019-05-132-103/+83
|
* rotate unusual logs and stop stacktracing (#6935)zeripath2019-05-141-1/+1
|
* Handle CORS requests (#6289)Tamal Saha2019-05-132-0/+42
|
* Remove local clones & make hooks run on merge/edit/upload (#6672)zeripath2019-05-1110-590/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-1151-19/+1839
| | | | | | | | | | | | * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Fix logging documentation (#6904)zeripath2019-05-111-0/+2
| | | | | | * ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG * Allow DISABLE_ROUTER_LOG to be set in the [log] section
* internal/ssh: ignore env command totally (#6825)Antoine GIRARD2019-05-091-12/+0
| | | | | | | | * ssh: ignore env command totally * Remove commented code Needed fix described in issue #6889
* Show full name if DefaultShowFullName setting activated (#6710)Wim2019-05-082-0/+5
| | | | | 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)
* Improve migrations to support migrating ↵Lunny Xiao2019-05-0720-4/+2010
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add GET requests to webhook (#6771)Simon2019-05-051-0/+1
| | | | | | | | | | | | | | * 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
* Number of commits ahead/behind in branch overview (#6695)Mario Lubenka2019-05-053-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Call Git API to determine divergence of a branch and its base branch Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Show commit divergance in branch list Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds missing comment Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adds test for diverging commits Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Try comparing commits instead of branches Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Removes test as CI can't run it Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adjusts signature of percentage function to allow providing multiple integers as numerator Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Moves CountDivergingCommits function into repofiles module Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* add french specific rule for translating plural texts (#6846)ngourdon2019-05-041-0/+6
|
* Hash App token (#6724)techknowlogick2019-05-042-0/+15
|
* Git statistics in Activity tab (#4724)Lauris BH2019-05-042-0/+143
| | | | | | | | | | | | | | | | | | * 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 #6813: Allow git.GetTree to take both commit and tree names (#6816)Filip Navara2019-05-024-11/+17
| | | | | | | | | | * Allow git.GetTree to take both commit and tree names, return full paths on entries listed through Tree.ListEntriesRecursive Signed-off-by: Filip Navara <filip.navara@gmail.com> * Fix the SHA returned on Git Tree APIs called with commit hash or symbolic name Signed-off-by: Filip Navara <filip.navara@gmail.com>
* Allow Recaptcha service url to be configured (#6820)zeripath2019-05-023-2/+9
|
* Remove `seen` map from `getLastCommitForPaths` (#6807)Filip Navara2019-04-301-8/+2
| | | | | | | | | Ensures correctly traversing the commit graph for all path and avoids erroneously skipping some. Also preallocate some arrays to correct size to prevent unnecessary reallocations. Fixes #6708. Signed-off-by: Filip Navara <filip.navara@gmail.com>
* Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631)zeripath2019-04-291-13/+26
|
* Restore IsWindows variable assignment (#6722) (#6790)Nicola Scattaglia2019-04-281-0/+2
| | | Signed-off-by: Nicola Scattaglia <scattaglia.nicola.work@gmail.com>
* Set user search base field optional in DLDAP edit page (#6779)ngourdon2019-04-281-0/+4
|
* UI: Detect and restore encoding and BOM in content (#6727)zeripath2019-04-263-7/+114
| | | | | | | | | | | | | | | | | | | | | | * detect and remove a decoded BOM Signed-off-by: Andrew Thornton <art27@cantab.net> * Restore the previous encoding and BOM * On error keep as UTF-8 Signed-off-by: Andrew Thornton <art27@cantab.net> * create remove BOM function * Deal with LFSed content * Update modules/repofiles/update.go * Fix final LFS bug * Keep LFS sections referring to opts.Content
* OAuth2 token can be used in basic auth (#6747)techknowlogick2019-04-251-2/+16
|
* Fix org visibility bug when git cloning (#6743)Lunny Xiao2019-04-251-6/+0
| | | | | | | | | | | | | | * 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
* Handle redirects in git clone commands (#6688)James E. Blair2019-04-251-0/+3
| | | | | | | | | | Add support for repo_redirect objects in the git smart http handler so that when a user clones a repo that has been moved or renamed, they are redirected to the new location. This requires that the query string be included in the redirect as well, so that is added. Signed-off-by: James E. Blair <jeblair@redhat.com>
* Fix domain name pattern in email regex (#6739)mrsdizzie2019-04-242-1/+16
| | | Fixes #6735
* Trace Logging on Permission Denied & ColorFormat (#6618)zeripath2019-04-223-8/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix one performance/correctness regression in #6478 found on Rails ↵Filip Navara2019-04-211-38/+33
| | | | | | | | | | | | | | | | repository. (#6686) * Fix flaw in the commit history lookup that caused unnecessary traversal when the repository contains a lot of merge commits. Also return the merge commit as the changed one if the file or directory was changed as part of the merge, eg. through conflict resolution. Signed-off-by: Filip Navara <filip.navara@gmail.com> * Perform history simplification. If a file is present on multiple parents in a merge commit follow only the first parent.
* Unfortunately MemProvider Init does not actually Init properly (#6692)zeripath2019-04-202-1/+218
| | | | | | | | | | | * Unfortunately MemProvider Init does not actually Init properly Worse all of its members are private and you cannot update them. Simple fix copy it in to modules session. Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix misspelling
* Prevent creating empty sessions (#6677)zeripath2019-04-202-0/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prevent creating empty sessions Signed-off-by: Andrew Thornton <art27@cantab.net> * Update modules/setting/session.go * Remove unnecessary option Signed-off-by: Andrew Thornton <art27@cantab.net> * Add destory to list of ignored misspellings * rename cookie.go -> virtual.go * Delete old file * Add test to ensure that sessions are not created without being logged in Signed-off-by: Andrew Thornton <art27@cantab.net> * fix tests Signed-off-by: Andrew Thornton <art27@cantab.net> * Update integrations/create_no_session_test.go
* Unifies pagination template usage (#6531) (#6533)Mario Lubenka2019-04-202-10/+60
|
* Add support for MS Teams webhooks (#6632)Daniel Grier2019-04-192-1/+12
|
* Improve listing performance by using go-git (#6478)Filip Navara2019-04-1928-646/+676
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* API OTP Context (#6674)techknowlogick2019-04-193-1/+48
| | | | | | | | | | | | | | | | | | | | | | * API OTP Context * Update api.go * token * token * fix per discord * copyright header * remove check for token in OTP * Update auth.go * simplify * Update api.go
* Telegram webhook (#4227)techknowlogick2019-04-182-1/+13
|
* Fixes 4762 - Content API for Creating, Updating, Deleting Files (#6314)Richard Mahn2019-04-1728-275/+2074
|
* Pre-calculate the absolute path of git (#6575)Mura Li2019-04-172-1/+12
| | | | | | | | * Pre-caculate the absolute path of git * Do not repeat string literals which has been defined somewhere Also make it flexible to accept customized/user-defined value.
* Add API for manipulating Git hooks (#6436)Segev Finer2019-04-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add SUBJECT_PREFIX mailer config option (#6605)zeripath2019-04-172-1/+7
| | | | | | | | * Add SUBJECT_PREFIX mailer config option * Add space between subject prefix and subject (Change from Gogs) Signed-off-by: Andrew Thornton <art27@cantab.net>
* Use ctx.metas for SHA hash links (#6645)mrsdizzie2019-04-163-4/+16
| | | | | | | | Since #6273 was merged, we now have access to proper context metas always. Update SHA generated links to use these instead of urlPrefix. Update tests as well. Fixes #4536.
* Fix forking an empty repository (#6637)Segev Finer2019-04-151-7/+7
| | | | | Fixes #6633 Signed-off-by: Segev Finer <segev@codeocean.com>
* Add json tags for oauth2 form (#6627)Jonas Franz2019-04-151-7/+7
|
* Add option to disable refresh token invalidation (#6584)Jonas Franz2019-04-122-1/+2
| | | | | | | | | | | | | | | | | | * Add option to disable refresh token invalidation Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add integration tests and remove wrong todos Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix typo Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix tests and add documentation Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Improve issue autolinks (#6273)mrsdizzie2019-04-123-16/+52
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Support search operators for commits search (#6479)Mura Li2019-04-122-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support searching commits with prefix syntax For now, support auther: committer: When more than one prefix is supplied is presented, the result is the union. When different prefixes are supplied, the result is the intersection. For example, "author:alice author:bob" => the result is all commits authored by Alice OR Bob "hello committer:alice" => the result is all commits committed by Alice AND has the keyword 'hello' in the message. Note that there should NOT have any space after the colon(:) of the prefix. For example, "author:bill" => correct "author: bill" => wrong * Remove unneeded logging * Add missing files of test repository * Add missing repo_unit entries to test fixtures * Update test cases * Add tooltip for commits search button * Update tooltip text I have no idea about how to format it with line breaks. * Make the usage example more real * Add a test case * Add new options struct for SearchCommits * Prefer len(s) > 0 over s != "" * Add NewSearchCommitsOptions