summaryrefslogtreecommitdiffstats
path: root/models
Commit message (Collapse)AuthorAgeFilesLines
* SetDefaultBranch on pushing to empty repository (#7610)zeripath2019-07-301-0/+11
|
* change length of some repository's columns (#7652)Lunny Xiao2019-07-293-3/+23
|
* fix wrong email when use gitea as OAuth2 provider (#7640)renothing2019-07-271-4/+4
| | | | | | | when you use gitea as OAuth2 provider, the /api/v1/user should return user primary email as identifier, which is unique in OAuth2 clients. this patch use convert.ToUser replace all u.APIFormat in api requests, return primary email when caller is yourself or admin.
* reserve .well-known username (#7637)Andreas Shimokawa2019-07-261-0/+1
|
* Fix bug create/edit wiki pages when code master branch protected (#7580)Lunny Xiao2019-07-252-5/+11
| | | | | | * fix bug create/edit wiki pages when code master branch protected * improve FullPushingEnvironment function
* Make PKCS8, PEM and SSH2 keys work (#7600)zeripath2019-07-252-27/+125
| | | | | | | | * Make PEM and SSH2 keys work * add ssh2 testcases and PEM cases - and fix PEM * Add final test to parse the proposed key
* Fix panic on push at #7611 (#7615)zeripath2019-07-251-1/+1
| | | | | | | | * Fix panic in #7611 Use pr.IssueID instead of pr.Issue.ID as Issue may not be loaded and is unnecessary * Only fetch the head branch from the remote
* Fix #7136: Add paging and extend API GetCommitStatuses (#7141)zeripath2019-07-252-4/+54
| | | | | | | | | | | | | | | | | | | | * Fix #7136: Add paging and extend API GetCommitStatuses * update swagger * Update routers/api/v1/repo/status.go Co-Authored-By: techknowlogick <matti@mdranta.net> * Update routers/api/v1/repo/status.go Co-Authored-By: techknowlogick <matti@mdranta.net> * Update routers/api/v1/repo/status.go Co-Authored-By: techknowlogick <matti@mdranta.net> * Apply suggestions from code review
* Move models.PushUpdate to repofiles.PushUpdate (#7485)Lunny Xiao2019-07-242-118/+7
| | | | | | * move models.PushUpdate to repofiles.PushUpdate * remove duplicated code to load repo
* Added missing error checks in tests (#7554)Christian Muehlhaeuser2019-07-232-0/+3
| | | Whenever we assign a value to err, check for it being nil.
* Removed unnecessary conversions (#7557)Christian Muehlhaeuser2019-07-232-5/+5
| | | No need to convert to the same type.
* Improve SSH key parser to handle newlines in keys (#7522)silverwind2019-07-232-6/+28
| | | | | | | | | | | | | | | | * Strip newlines from SSH keys before adding them Fixes: https://github.com/go-gitea/gitea/issues/7500 * add test for CheckPublicKeyString * add one more test * simplify test * further simplify * make fmt
* Fixed ineffectual assignments (#7555)Christian Muehlhaeuser2019-07-221-1/+1
| | | Don't assign values we never use.
* Fixed ineffectual assignments in tests (#7553)Christian Muehlhaeuser2019-07-221-3/+3
| | | | Just makes it a bit more obvious which values we want to test for, and which ones we want to ignore.
* Fix repository's pull request count error (#7518)Lunny Xiao2019-07-183-12/+38
| | | | | | * fix pr count error * fix tests
* Include thread related headers in issue/coment mail (#7484)mrsdizzie2019-07-173-1/+115
| | | | | | | | | | | | | | * Include thread related headers in issue/coment mail Make it so mail programs will group comments from an issue into the same thread by setting Message-ID on initial issue and then using In-Reply-To and References headers to reference that later on. * Add tests * more tests * fix typo
* Update User.NumRepos atomically in createRepository (#7493)Monty Taylor2019-07-171-2/+6
| | | | | | | | The update call on the user call races if there is more than one repository creation concurrently, leading to incorrect count of repos. Split things in two, so that we call the update for last visibility (which isn't problematic if it races, since it can only ever be best-effort anyway). This way we can atomically increment the count of repos.
* Move status table to cron package (#7370)Lunny Xiao2019-07-154-42/+0
|
* Fix regex for issues in commit messages (#7444)mrsdizzie2019-07-142-1/+21
| | | | | | | | | | * Fix regex for issues in commit messages Use same regex as markup for matching in commits. Fixes #7438 * make fmt
* only return head: null if source branch was deleted (#6705)quantonganh2019-07-082-33/+67
| | | | | | | | | | * only return head: null if source branch was deleted * add URL into GetPullRequest * TestPullRequest_APIFormat * log error if it is not Err(Branch)NotExist
* Display original author and URL information when showing migrated ↵mrsdizzie2019-07-085-23/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | issues/comments (#7352) * Store original author info for migrated issues and comments Keep original author name for displaying in Gitea interface and also store original author user ID for potential future use in linking accounts from old location. * Add original_url for repo Store the original URL for a migrated repo Clean up migrations/tests * fix migration * fix golangci-lint * make 'make revive' happy also * Modify templates to use OriginalAuthor if set Use the original author name in templates if it is set rather than the user who migrated/currently owns the issues * formatting fixes * make generate-swagger * Use default avatar for imported comments * Remove no longer used IgnoreIssueAuthor option * Add OriginalAuthorID to swagger also
* Add additional password hash algorithms (closes #5859) (#6023)EpicCoder2019-07-073-22/+74
|
* Fix mirror sync not automatically sending webhook requests (#7366)Drew2019-07-061-0/+5
|
* Detect migrating batch size (#7353)Lunny Xiao2019-07-061-0/+6
| | | | | | | | * Make migrating batch size as configurable * detect different table batch insert size and remove config item * remove unrelated changes
* Fix bug conflict between SyncReleasesWithTags and InsertReleases (#7337)Lunny Xiao2019-07-012-13/+15
| | | | | | | | * fix bug conflict between SyncReleasesWithTags and InsertReleases * fix tests * fix fmt
* make dropTableColumns drop columns on sqlite and constraints on all (#6849)zeripath2019-07-011-2/+90
|
* #6946 Run hooks on merge/edit and cope with protected branches (#6961)zeripath2019-07-013-8/+18
| | | | | | | | | | | | | | | | | | * Fix #6946 by checking PullRequest ID on pushing * Ensure we have the owner name, the pr attributes and the the issue * Fix TestSearchRepo by waiting till indexing is done * Update integrations/repo_search_test.go * changes as per @mrsdizzie * missing comma * Spelling mistake * Fix full pushing environment
* Add commit statuses reports on pull request view (#6845)Lunny Xiao2019-06-308-74/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add commit statuses reports on pull view * Add some translations * improve the UI * fix fmt * fix tests * add a new test git repo to fix tests * fix bug when headRepo or headBranch missing * fix tests * fix tests * fix consistency * fix tests * fix tests * change the test repo * fix tests * fix tests * fix migration * keep db size consistency * fix translation * change commit hash status table unique index * remove unused table * use char instead varchar * make hashCommitStatusContext private * split merge section with status check on pull view ui * fix tests; fix arc-green theme on pull ui
* Use batch insert on migrating repository to make the process faster (#7050)Lunny Xiao2019-06-291-51/+80
| | | | | | | | | | * Use batch insert on migrating repository to make the process faster * fix lint * fix tests * fix comments
* Show Pull Request button or status of latest PR in branch list (#6990)Mario Lubenka2019-06-271-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Show Pull Request button or status of latest PR in branch list Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Do not show pull request button on deleted branches Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Do not show commit divergence on deleted branches Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Use XORMs Get instead of limit * Links pull request ID and use smaller labels for displaying the pull request status Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Handle error when getting latest pull request Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Indent template Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Check error when loading issue Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* fix extra newlines when copying from diff in Firefox (#7288)silverwind2019-06-261-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix extra newlines when copying from diff See https://bugzilla.mozilla.org/show_bug.cgi?id=1273836 Basically, the <pre><code> seems to add a forced newline that is not possible to get rid of via CSS, so I replaced it with just a <code>. Secondly, .lines-type-marker also forced a newline in the copied text, but that was possible to get rid of via user-select. Safari still has a extraneous newline in the copied text of unknown origin, but this should not block stop this PR. * simplify .line-type-marker * fix selector * remove erronous ^^^ * Fix empty split diff * Fix arc-theme-green * fix add comment * ensure line-num is copied too * Update templates/repo/diff/box.tmpl Co-Authored-By: zeripath <art27@cantab.net> * attempt to fix safari via removing <code> * remove useless whitespace at the end of 'class' * remove inter-tag whitespace for code <td>s * more inter-tag removal * final inter-tag removal * attempt to fix empty line copy * move and comment getLineContent * fix golint * make background grey for missing added code
* Monitor all git commands; move blame to git package and replace git as a ↵Lunny Xiao2019-06-268-303/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variable (#6864) * monitor all git commands; move blame to git package and replace git as a variable * use git command but not other commands * fix build * move exec.Command to git.NewCommand * fix fmt * remove unrelated changes * remove unrelated changes * refactor IsEmpty and add tests * fix tests * fix tests * fix tests * fix tests * remove gitLogger * fix fmt * fix isEmpty * fix lint * fix tests
* Make diff line-marker non-selectable (#7279)zeripath2019-06-242-15/+18
| | | | | | | | * Make diff line-marker non-selectable * Move to use data-* as per @mrsdizzie * fix missing line nums * Add a minimum-width to force right-align of the line num * Move line-type-marker into separate column
* Fix error log when loading issues caused by a xorm bug (#7271)Lunny Xiao2019-06-2325-76/+53
| | | | | | | | | | | | * fix error log when loading issues caused by a xorm bug * upgrade packages * fix fmt * fix Consistency * fix tests
* Fix #732: Add LFS objects to base repository on merging (#7082)zeripath2019-06-221-285/+3
| | | | On merge we walk the merge history and ensure that all lfs objects pointed to in the history are added to the base repository. This switches from relying on having git-lfs installed on the server, (and in fact .gitattributes being correctly installed.)
* Add missing description of label on API (#7159)Lunny Xiao2019-06-161-3/+4
| | | | | | | | * add missing description of label on API * fix comment head * fix swagger
* Use go method to calculate ssh key fingerprint (#7128)Antoine GIRARD2019-06-162-21/+92
| | | | | | | | | | | | * Use go method to calculate key fingerprint * add gitea copyright * use native go method only for built-in server * refactor and add tests * add gitea copyright
* Add LastLogin to the User API (#7196)zeripath2019-06-151-0/+2
|
* Only warn on errors in deleting LFS orphaned files during repo deletion (#7213)zeripath2019-06-152-5/+2
|
* fix duplicated file on pull request conflicted files (#7211)Lunny Xiao2019-06-151-1/+11
|
* Allow colon between fixing word and issue (#7207)zeripath2019-06-152-1/+27
| | | | | | * Allow colon between fixing word and issue * update test
* Add error for fork already existing (#7185)John Olheiser2019-06-123-4/+22
|
* Add golangci (#6418)kolaente2019-06-1243-251/+350
|
* Fix database lock when use random repository fallback image (#7166)Lunny Xiao2019-06-111-11/+10
| | | | | | * fix database lock when use random repository fallback image * remove unused function
* Fixes diff on merged pull requests (#7171)Mario Lubenka2019-06-111-1/+1
|
* Various fixes for issue mail notifications (#7165)silverwind2019-06-112-16/+38
| | | | | | | | | - Send individual mails for actions and comments - Send mail for new issues/prs without a comment - Use correct sender for reopen/close actions - Hopefully fixed all bugs related to missing mails Fixes: https://github.com/go-gitea/gitea/issues/7124 Fixes: https://github.com/go-gitea/gitea/issues/5977
* Move PushUpdate dependency from models to repofiles (#6763)Lunny Xiao2019-06-101-4/+0
| | | | | | * remove push_update * move models.PushUpdate to repofiles.PushUpdate
* Fixes #2738 - Adds the /git/tags API endpoint (#7138)Richard Mahn2019-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixes #2738 - /git/tags API * proper URLs * Adds function comments * Updates swagger * Removes newline from tag message * Removes trailing newline from commit message * Adds integration test * Removed debugging * Adds tests * Fixes bug where multiple tags of same commit show wrong tag name * Fix formatting * Removes unused varaible * Fix to annotated tag function names and response * Update modules/git/repo_tag.go Co-Authored-By: Lauris BH <lauris@nix.lv> * Uses TagPrefix * Changes per review, better error handling for getting tag and commit IDs * Fix to getting commit ID * Fix to getting commit ID * Fix to getting commit ID * Fix to getting commit ID
* Add command to convert mysql database from utf8 to utf8mb4 (#7144)Lunny Xiao2019-06-081-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add command to convert mysql database from utf8 to utf8mb4 * Update cmd/convert.go Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Update cmd/convert.go Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Update cmd/convert.go Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Update models/convert.go Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Update models/convert.go Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Update cmd/convert.go Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Update cmd/convert.go Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com>
* Compare branches, commits and tags with each other (#6991)Mario Lubenka2019-06-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Supports tags when comparing commits or branches Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Hide headline when only comparing and don't load unused data Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Merges compare logics to allow comparing branches, commits and tags with eachother Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Display branch or tag instead of commit when used for comparing Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Show pull request form after click on button Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Transfers relevant pull.go changes from master to compare.go Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Fixes error when comparing forks against a commit or tag Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Removes console.log from JavaScript file Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Show icon next to commit reference when comparing branch or tag Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Updates css file Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Fixes import order * Renames template variable * Update routers/repo/compare.go Co-Authored-By: zeripath <art27@cantab.net> * Update from master Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Allow short-shas in compare * Renames prInfo to compareInfo Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Check PR permissions only if compare is pull request Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Adjusts comment Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Use compareInfo instead of prInfo