1851 Commits (4d01ecaef350c6df0c27913f05cc0537bed5f7e9)

Author SHA1 Message Date
Lauris BH 6a107e57f6 Add checks for commits with missing author and time (#2771)
* Add checks for commits with missing author and time

* Fix validate commits with emails if it has no Author
7 years ago
Gibheer bc84110989 don't check minimum key size when disabled (#1754)
* cleanup old comments for ed25519

These comments were added when x/crypto/ed25519 could not yet handle
ed25519. It does now, so it should be removed.
Also the key type is now replaced with the proper constant.

* move the minimum key size config before the check

This moves the actual config lookup before any check is done. This
avoids problems with calling to ssh-keygen which doesn't support the
expected output format and returning an error, when the check is disabled.
7 years ago
Lauris BH eca05b09aa Add commit count caching (#2774)
* Add commit count caching

* Small refactoring

* Add different key prefix for refs and commits

* Add configuratuion option to allow to change caching time or disable it
7 years ago
Bwko 3ab580c8d6 Add branch overiew page (#2108)
* Add branch overiew page

* fix changed method name on sub menu

* remove unused code
7 years ago
Lunny Xiao 796be03e9b fix discord hook bug (#2778) 7 years ago
Lunny Xiao 6eeadb2082 Hide unactive on explore users and some refactors (#2741)
* hide unactive on explore users and some refactors

* fix test for removed Organizations

* fix test for removed Organizations

* fix imports

* fix logic bug

* refactor the toConds

* Rename TestOrganizations to TestSearchUsers and add tests for users

* fix other tests

* fix other tests

* fix watchers tests

* fix comments and remove unused code
7 years ago
harry 81d1e54a49 Use identicon image for default gravatar. (#2767)
* Use identicon image for default gravatar.

* Fixed tests.
7 years ago
Lunny Xiao 985a39590b Use buffersize to reduce database connection when iterate (#2724)
* use buffersize to reduce database connection when iterate

* fix typo

* add default value on app.ini comment
7 years ago
Jonas Bröms 847272a70d Only update mirror last update after successful sync (#2730) 7 years ago
Morlinest ccd3577970 Fix repository search function (#2689)
* Fix and remove FIXME

* Respect membership visibility

* Fix/rewrite searchRepositoryByName function

* Add unit tests

* Add integration tests

* Remove Searcher completely

* Remove trailing space
7 years ago
Lauris BH c7f4f07765 Integration test for activity page (#2704)
* Integration test for activity page

* Small code refactoring for acitvity page

* Move activity stats calculation logic to model
7 years ago
Lauris BH f3833b7ce4 Create new branch from branch selection dropdown (#2130)
* Create new branch from branch selection dropdown and rewrite it to VueJS

* Make updateLocalCopyToCommit as not exported

* Move branch name validation to model

* Fix possible race condition
7 years ago
Lauris BH 1ec4dc6c1d Fix so that user can still fork his own repository to owned organizations (#2699)
* Fix so that user can still fork his own repository to his organizations

* Fix to only use owned organizations

* Add integration test for forking own repository to owned organization
7 years ago
Lauris BH f42dbdbae5 Add Activity page to repository (#2674)
* Add Activity page to repository

* Add request data for activity

* Add issue data for activity

* Add user unit right checks

* Add releases to activity

* Log repository unit loading error
7 years ago
Lauris BH 8863e74f2a Fix organization watch migration (#2703) 7 years ago
Patrick G e89bb7ef6a Allow custom SSH user in UI for built-in SSH server (#2617) (#2678)
* Allow custom SSH user in UI for built-in SSH server (#2617)

* Some fixes

* Did make fmt

* Updated according to review

- Renamed config to BUILTIN_SSH_SERVER_USER
- Removed unnecessary default string value for config item

* Updated according to review

* Fixed some minor issues
7 years ago
Lunny Xiao 514006a2e5 Fix orgnization user watch repository (#2670)
* remove orgnization watch repositories

* fix migration

* fix typo and missing change

* remove unused code
7 years ago
Morlinest dff26e25ca Remove redudant functions and code (#2652)
* Remove redudant functions and code
7 years ago
Morlinest c2346e4469 Add repository search unit and integration tests (#2575)
* Add more repo search tests

* Fix repo search tests

* Always test returned repos length

* Add test with lower pagesize limit (test more pages)

* Add and fix /api/repo/search integration tests

* Simplify unit tests code

* Simplify and unify integration tests code

* Improve test coverage

* Temporary fix tests due to bugs in current repo search implementation

* Revert removing not nil Searcher

* Add more checks to tests

* Simplify privacy checks in /api/repo tests

* Temporary remove privacy check from repo search tests
7 years ago
David Schneiderbauer ebac051e72 Rewrite migrations to not depend on future code changes (#2604)
* v38 migration used an outdated version of RepoUnit model (#2602)

* change repoUnit model in migration

* fix v16 migration repo_unit table

* fix lint error

* move type definition inside function

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* fix lint error

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* Fix time tracking migration

* Refactor code

* Fix migration from Gogs

* v38 migration used an outdated version of RepoUnit model (#2602)

* change repoUnit model in migration

* fix v16 migration repo_unit table

* fix lint error

* move type definition inside function

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* fix lint error

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* Fix time tracking migration

* Refactor code

* Fix migration from Gogs

* add error check

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* Additiomal fixes for migrations

* Fix timetracking migration

* Add back nil check
7 years ago
Julian Scholle 92123fe82a GPG key email verification no longer case sensitive (#2661) (#2663)
* GPG key email verification no longer case sensitive (#2661)

* case insensitive GPG key email verification now cached (#2661)

Signed-off-by: Julian Scholle <julian.scholle@googlemail.com>
7 years ago
Kazuki Sawada ffab139c91 table `pull_request` wasn't updated correctly (#2649)
* Fix: table `pull_request` won't be updated correctly

* Update also status column when manually merged
7 years ago
Ethan Koenig aa962deec0 Replace deprecated Id method with ID (#2655) 7 years ago
Morlinest a79af9cf6f Fix index column deletion (#2651) 7 years ago
Ethan Koenig 4b2c8ca533 Use session when creating user (#2638) 7 years ago
Morlinest a04718a2a6 Remove repo unit index (#2621)
* Remove repo unit index

* Fix sqlite
7 years ago
Lunny Xiao a8717e5e3a Use AfterLoad instead of AfterSet on Structs (#2628)
* use AfterLoad instead of AfterSet on Structs

* fix the comments on AfterLoad

* fix the comments on action AfterLoad
7 years ago
Morlinest 1ad902d529 Fix implementation of repo Home func (#2601)
* Fix implementation of repo Home func

* Make fixture changes for testing
7 years ago
David Schneiderbauer 26e49b8e3d Fix doubled issue tab introduced in migration v16 (#2611)
* fix duplicate issue tab as UnitTypeIssue and UnitTypeExternalTracker are existing at the same time

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
7 years ago
Morlinest cc84ca40d7 Remove redudant issue LoadAttributes() calls (#2614) 7 years ago
Lunny Xiao dd55534b82 Reduce usage of allcols on update (#2596)
* reduce usage of allcols on update

* fix bug and tests
7 years ago
Ethan Koenig fa28de820e Make indexer code more reusable (#2590) 7 years ago
Lauris BH 2db424c3f1 Fix broken migration to add can_push field back to table (#2574) 7 years ago
Morlinest 9a75a5d59b Use custom type and constants to hold order by options (#2572) 7 years ago
Morlinest ca68a75b5b Expand fixtures (#2571)
* Add more repo search tests

* Add and fix /api/repo/search integration tests

* Add owner to access table for organization repositories

* Remove tests
7 years ago
David Schneiderbauer 1eedd983ea Complete push webhooks (#2530)
* implemented missing 'delete' push webhooks

moreover created ActionDeleteBranch and ActionDeleteTag

* add CommitRepoAction tests for tag/branch creation/deletion

* fixed error where push webhook not called if is new branch or tag
removed unnecessary code

* moved prepare unit test environment into separate method to be used across unit tests

* add missing if clause in pushUpdate

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
7 years ago
Lunny Xiao 0d80af649a Add init support of orgmode document type on file view and readme (#2525)
* add init support of orgmode document type on file view and readme

* fix imports

* fix imports and readmeExist

* fix imports order

* fix format

* remove unnecessary convert
7 years ago
Rémi Saurel 66bc0ac251 Fix sending mail with a non-latin display name. #2102 (#2559)
* Fix sending mail with a non-latin display name. #2102

Signed-off-by: Rémi Saurel <contact@remi-saurel.com>

* Take into account the possibility that setting.MailService.From is in `name <email@address>` format. #2102

Signed-off-by: Rémi Saurel <contact@remi-saurel.com>
7 years ago
Lauris BH 6718ea6ff1 Fix can_push value to false in protected_branch (#2560) 7 years ago
Lauris BH 7a0297819d Sync releases table with tags on push and for mirrors (#2459)
* Sync releases table with tags on push and for mirrors

* Code style fixes

* Fix api to return only releases

* Optimize release creation and update
Minimize posibility of race conditions

* Fix release lower tag name updating

* handle tag reference update by addionally comparing commit id
7 years ago
Ethan Koenig acecedc410 Use named ActionType constants in template helper (#2545) 7 years ago
Ethan Koenig 4cb9394a97 Fix lint errors (#2547) 7 years ago
Jonas Franz 566e8ecce0 Fork permission bug fixes (#2534)
* Hotfix for "Add time manually" (https://github.com/go-gitea/gitea/pull/2211#issuecomment-328780125)

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Checking if Code unit is enabled before creating a fork.

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Adding a discrete function for RepoIDAssignment

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Improved Documentation
7 years ago
Ethan Koenig b0f7457d9e Improve issue search (#2387)
* Improve issue indexer

* Fix new issue sqlite bug

* Different test indexer paths for each db

* Add integration indexer paths to make clean
7 years ago
Lunny Xiao 52e11b24bf Restructure markup & markdown to prepare for multiple markup language… (#2411)
* restructure markup & markdown to prepare for multiple markup languages support

* adjust some functions between markdown and markup

* fix tests

* improve the comments
7 years ago
David Schneiderbauer d766d0c4e0 Prevent sending emails and notifications to inactive users (#2384)
* Filter inactive users before sending emails or creating browser notifications

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* fix formatting issues

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* included requested changes

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>

* optimized database queries

* rebasing new master and add tablenames for clarification in xorm queries

* remove escaped quotationmarks using backticks

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
7 years ago
Ethan Koenig b496e3e1cc Fix unit test race condition (#2516) 7 years ago
bradder555 ad24a3134d Fixes 500 error on dashboard when using MSSQL (#2504)
MSSQL rejects the query:
  SELECT "repository"."id" FROM "repository"
  INNER JOIN "team_repo" ON "team_repo".repo_id="repository".id AND
  "repository".is_mirror=1
  WHERE (
    ("repository".owner_id=2 AND "repository".is_private=0)
        OR team_repo.team_id IN (1)
        )
        GROUP BY "repository".id ORDER BY updated_unix DESC

when the order by term (updated_unix) is not included in the group by
term.
7 years ago
Lunny Xiao 1739e84ac0 improve protected branch to add whitelist support (#2451)
* improve protected branch to add whitelist support

* fix lint

* fix style check

* fix tests

* fix description on UI and import

* fix test

* bug fixed

* fix tests and languages

* move isSliceInt64Eq to util pkg; improve function names & typo
7 years ago
Rémy Boulanouar be3319b3d5 Display commit status on landing page of repo (#1784)
* Display commit status on landing page of repo

* improve last status of commits and add link to ci

* fix last commit status since the order of ids are desc
7 years ago