Commit Graph

159 Commits (f2b4b0f491014753f509eccbcd157c198dd287b3)

Author SHA1 Message Date
Morlinest a04718a2a6 Remove repo unit index ()
* Remove repo unit index

* Fix sqlite
Morlinest 1ad902d529 Fix implementation of repo Home func ()
* Fix implementation of repo Home func

* Make fixture changes for testing
Morlinest ca68a75b5b Expand fixtures ()
* Add more repo search tests

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

* Add owner to access table for organization repositories

* Remove tests
Ethan Koenig b0f7457d9e Improve issue search ()
* Improve issue indexer

* Fix new issue sqlite bug

* Different test indexer paths for each db

* Add integration indexer paths to make clean
David Schneiderbauer d766d0c4e0 Prevent sending emails and notifications to inactive users ()
* 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>
Lauris BH 8c3a2e817b Add missing fixture to clean gpg_key table ()
* Add missing fixture to clean gpg_key table

* Fix possible too fast request execution in timetracker start/stop test
Jonas Franz 5ccecb44ad Feature: Timetracking ()
* Added comment's hashtag to url for mail notifications.
* Added explanation to return statement + documentation.
* Replacing in-line link generation with HTMLURL. (+gofmt)
* Replaced action-based model with nil-based model. (+gofmt)
* Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants.
* Updating comment for mailIssueCommentToParticipants
* Added link to comment in "Dashboard"
* Deleting feed entry if a comment is going to be deleted
* Added migration
* Added improved migration to add a CommentID column to action.
* Added improved links to comments in feed entries.
* Fixes  by filtering for deleted comments that are referenced in actions.
* Introducing "IsDeleted" column to action.
* Adding design draft (not functional)
* Adding database models for stopwatches and trackedtimes
* See 
* Adding design draft (not functional)
* Adding translations and improving design
* Implementing stopwatch (for timetracking)
* Make UI functional
* Add hints in timeline for time tracking events
* Implementing timetracking feature
* Adding "Add time manual" option
* Improved stopwatch
* Created report of total spent time by user
* Only showing total time spent if theire is something to show.
* Adding license headers.
* Improved error handling for "Add Time Manual"
* Adding @sapks 's changes, refactoring
* Adding API for feature tracking
* Adding unit test
* Adding DISABLE/ENABLE option to Repository settings page
* Improving translations
* Applying @sapk 's changes
* Removing repo_unit and using IssuesSetting for disabling/enabling timetracker
* Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu
* Improving documentation
* Fixing vendor/ folder
* Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks )
* Restricting write access to timetracking based on the repo settings (Proposed by @lafriks )
* Fixed minor permissions bug.
* Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo
* Allow assignees and authors to track there time too.
* Fixed some build-time-errors + logical errors.
* Removing unused Get...ByID functions
* Moving IsTimetrackerEnabled from context.Repository to models.Repository
* Adding a seperate file for issue related repo functions
* Adding license headers
* Fixed GetUserByParams return 404
* Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons
* Adding /repos/:username/times to get all tracked times of the repo
* Updating sdk-dependency
* Updating swagger.v1.json
* Adding warning if user has already a running stopwatch (auto-timetracker)
* Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions)
* Changing code.gitea.io/sdk back to code.gitea.io/sdk
* Correcting spelling mistake
* Updating vendor.json
* Changing GET stopwatch/toggle to POST stopwatch/toggle
* Changing GET stopwatch/cancel to POST stopwatch/cancel
* Added migration for stopwatches/timetracking
* Fixed some access bugs for read-only users
* Added default allow only contributors to track time value to config
* Fixed migration by chaging x.Iterate to x.Find
* Resorted imports
* Moved Add Time Manually form to repo_form.go
* Removed "Seconds" field from Add Time Manually
* Resorted imports
* Improved permission checking
* Fixed some bugs
* Added integration test
* gofmt
* Adding integration test by @lafriks
* Added created_unix to comment fixtures
* Using last event instead of a fixed event
* Adding another integration test by @lafriks
* Fixing bug Timetracker enabled causing error 500 at sidebar.tpl
* Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning.
* Returning TrackedTime instead of AddTimeOption at AddTime.
* Updating SDK from 
* Resetting Go-SDK back to default repository
* Fixing test-vendor by changing ini back to original repository
* Adding "tags" to swagger spec
* govendor sync
* Removed duplicate
* Formatting templates
* Adding IsTimetrackingEnabled checks to API
* Improving translations / english texts
* Improving documentation
* Updating swagger spec
* Fixing integration test caused be translation-changes
* Removed encoding issues in local_en-US.ini.
* "Added" copyright line
* Moved unit.IssuesConfig().EnableTimetracker into a != nil check
* Removed some other encoding issues in local_en-US.ini
* Improved javascript by checking if data-context exists
* Replaced manual comment creation with CreateComment
* Removed unnecessary code
* Improved error checking
* Small cosmetic changes
* Replaced int>string>duration parsing with int>duration parsing
* Fixed encoding issues
* Removed unused imports

Signed-off-by: Jonas Franz <info@jonasfranz.software>
Antoine GIRARD 4f9a28e1f5 Make repo private to no interfere with other tests ()
Antoine GIRARD 7c417bbb0d Only check at least one email gpg key ()
* Only require one email (possibly not yet validated)

* Update message error and check validation of commit

* Add integrations tests

* Complete integration for import

* Add pre-check/optimization

* Add some test (not finished)

* Finish

* Fix fixtures

* Fix typo

* Don't guess key ID
Ethan Koenig fd45a032a7 Fix bare-repo bugs ()
* Fix bare-repo bugs

* Integration tests

* Unused import
Lauris BH f33e6ae09e Remove unit types commits and settings ()
* Remove unit types commits and settings

* Can not limit units in administrator teams

* Limit changing units only to teams with read and write access mode

* Small code optimization
Lauris BH 783b1967e2 Fix release display and correct paging ()
Ethan Koenig ce9b86082c Consolidate boilerplate in integration tests ()
Lunny Xiao 31b5e9177f fix collborators lack of units on orgnization repositories ()
* fix collborators lack of units on orgnization repositories

* also change log level to debug
Ethan Koenig b900c04316 Display draft releases ()
* Display draft releases

* Include ctx.User in user cache

* Integration test
Ethan Koenig 4e5ee2b67a Fix user profile activity feed ()
* Fix user profile activity feed

* gofmt, and avoid overlapping database connections
Ethan Koenig 5554165a0c Fix pull request compare link ()
* Fix pull request compare link

* Integration test
Ethan Koenig 7e6ff69c00 Fix 500 for GET /teams/:id endpoints ()
* Fix 500 for GET /teams/:id endpoints

* Integration test for GET /team/:id

* Clean up integration test
Ethan Koenig 0c332f0480 Fix activity feed ()
* Fix activity feed

Preserve actions after user/repo name change

* Add missing comment

* Fix migration, and remove fields completely

* Tests
Ethan Koenig cf02cd7ba0 Fix and test for delete user ()
* Fix and test for delete user

* Run updates in batches

* Unit test
Lunny Xiao fd6034aaf2 Add units to team ()
* add units to team

* fix lint

* finish team setting backend

* finished permission controll on routes

* fix import blank line

* add unit check on ssh/http pull and push and fix test failed

* fix fixtures data

* remove unused code
Ethan Koenig 251fb935ff Don't recreate database in integration tests ()
Lauris BH 0144817971 Do not allow commiting to protected branch from online editor ()
* Do not allow commiting to protected branch from online editor

* Add editor integration tests for adding new file and not allowing to add new file to protected branch
Ethan Koenig 66c803fae2 MySQL, Postgres integration tests in drone ()
* MySQL, Postgres integration tests in drone

* Fix .drone.yml

* sign drone

* resign drone
Lunny Xiao e31c02d4bf fix bug on issue view when not login ()
* fix bug on issue view when not login

* hide issue watch when not login

* update the tests

* fix test on issue
Kim "BKC" Carlbäcker 4bea219128 Status-API ()
Bo-Yi Wu fa2a513c62 feat: add download count field and unit testing for attachment. ()
* feat: add download count field and unit testing.

* fix: unit testing

* refactor: improve testing.

* fix: update comment

* add default value.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Andrey Nering e6781d5488 Add unit tests for issue_watch
Sandro Santilli 9182a35f18 Show user OpenID URIs in their profile ()
Sandro Santilli 447c9b428f Send notifications to partecipants in issue comments ()
* Send notifications to partecipants in issue comments

Closes 

Includes test (still failing)

* Do not include "labelers" to participants

Fix test to expect what GetParticipants return
Ethan Koenig 3803f257fb Move user_follow to separate file ()
Also add unit tests
Ethan Koenig 4b286f282a Consistency checks for action unit tests ()
Lunny Xiao cd1821a7e2 Move push update to post-receive and protected branch check to pre-receive ()
* move all push update to git hook post-receive and protected branch check to git hook pre-receive

* add SSH_ORIGINAL_COMMAND check back

* remove all unused codes

* fix the import
Ethan Koenig f1ab906c51 Unit tests for models/repo_collaboration ()
Ethan Koenig 4f3880ff15 Bug fixes and unit tests for org_team ()
Bo-Yi Wu 83b6d03231 fix: Wrong repo list on Explore page if user already loggin. ()
* fix: Wrong repo list on Explore page if user already loggin.

* fix: code readable.

* fix: declare variable
Ethan Koenig be48b32e63 Unit tests for repo watching ()
Ethan Koenig 140967f002 Unit tests for repo redirects ()
Bo-Yi Wu 43c94d0a6c test: Add testing for GetUserFork function ()
Morgan Bazalgette 442145dbd3 Fix public activity showing private repos ()
* Fix public activity showing private repos ()

Signed-off-by: Morgan Bazalgette <the@howl.moe>

* error check after setting is_private to true

* Add test for UpdateRepository w/ visibility change
Ethan Koenig a6751cec04 Unit tests for issue_milestone ()
Ethan Koenig 181c8d9c99 Fix consistency check ()
Ethan Koenig 5fbab97373 Fix broken test fixture ()
Bo-Yi Wu 71d35dae8c fix: wrong pages number which includes private repository count. ()
Ethan Koenig 438e1a7d46 Fix inconsistencies in unit test fixtures
Ethan Koenig 5972aa9af3 Fix inconsistencies in test fixtures
Ethan Koenig d0960b8035 Move IssueUser code to separate file ()
Also add unit tests
Bo-Yi Wu b6da658553 test: Add user mail testing. ()
Bo-Yi Wu d7d094bd8a fix: ignore email notifications if user is not active. ()
Ethan Koenig 10644d6dd7 Bug fixes and unit tests for models/issue_label ()
Ethan Koenig 2eb15f4a61 Unit tests and remove unused functions in models/notification ()
* Unit tests and remove unused functions in models/notification

* Read -> Unread
Ethan Koenig a2412492da Unit tests and bug fix for models/org
Ethan Koenig 0934d1b1ea Bug fixes and unit tests for models/webhook ()
Ethan Koenig a6832c234d Unit tests for models/star ()
Ethan Koenig b316b2e740 Unit tests for models/admin
Ethan Koenig 4b23e6a694 Unit tests for models/action ()
Ethan Koenig 6072b03291 Unit tests for models/access.go ()
Ethan Koenig 72bfabfada Unit tests for models/pull.go
Ethan Koenig de8b73dd92 Unit tests for token and update models