81 Commits (52e11b24bf5e395d83ea58c1b0fd6922efe16add)

Author SHA1 Message Date
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
Lauris BH 377cd1ae38 Allow changing integration test database connection using env variables (#2484) 7 years ago
Lauris BH 8c3a2e817b Add missing fixture to clean gpg_key table (#2494)
* Add missing fixture to clean gpg_key table

* Fix possible too fast request execution in timetracker start/stop test
7 years ago
Jonas Franz 5ccecb44ad Feature: Timetracking (#2211)
* 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 #1956 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 go-gitea/gitea#967
* 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 go-gitea/go-sdk#69
* 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>
7 years ago
Antoine GIRARD 69dfe43ffc Fix some tests : make coverage -> test (#2492)
* Fix test : make coverage -> test

* Refactor integration tests to be able to run them in parallel

* Add custom local repository temp path
7 years ago
Thomas Boerger fd85e25f5f Hotfix for integration testing (#2473)
* Hotfix for integration testing

* Comment sqlite tests because of database locking issues
7 years ago
Antoine GIRARD 7c417bbb0d Only check at least one email gpg key (#2266)
* 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
7 years ago
Ethan Koenig d23b36c598 Error message for integration test (#2410) 7 years ago
Morlinest 8e61823ec4 Fix tests code to prevent some runtime errors (#2381)
* Fix tests code to prevent some runtime errors

* Reduce nesting
7 years ago
Sandro Santilli 233bbcfa94 Fix integration test after librejs location change (#2374)
Fixes #2373
7 years ago
Lunny Xiao 64b7068846 Add more test for login links and fix a bug on action retrieve (#2361)
* add more test for login links and fix a bug on action retrieve
7 years ago
David Schneiderbauer 8aadf79f80 Add integration tests for signin (#2363)
Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
7 years ago
Sandro Santilli 951c909a67 Add INTERNAL_TOKEN to integration .ini file (#2346)
Avoids override of source file upon running `make test-pgsql`

Long story: settings.NewContext *adds* an INTERNAL_TOKEN if none
is found; the other ini files under integration/ all have an
INTERNAL_TOKEN
7 years ago
Lunny Xiao 9e9e1e0e52 Add public links check (#2323)
* add public links check

* more links for query parameters
7 years ago
Lunny Xiao aec826b023 fix template error on explore repos (#2319) 7 years ago
Michael Kuhn 934dd41fa6 Make SHOW_USER_EMAIL also apply to profiles (#2258)
The e-mail address is currently only hidden from the explore page.
7 years ago
silverwind fc29a405e8 More tweaks to repo top panel (#2267)
* More tweaks to repo top panel

* undo hiding of compare button on master

* attempt to fix ci issue

* another ci attempt
7 years ago
Ethan Koenig 49df677c47 Check for access in /repositories/:id (#2227)
* Check for access in /repositories/:id

* Integration test
7 years ago
Ethan Koenig fd45a032a7 Fix bare-repo bugs (#2199)
* Fix bare-repo bugs

* Integration tests

* Unused import
7 years ago
Ethan Koenig aff11bc65e Fix hooks for integration repo (#2216) 7 years ago
Lauris BH f33e6ae09e Remove unit types commits and settings (#2161)
* 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
7 years ago
Stefan Kalscheuer 0b177574c9 Only show SSH clone URL if signed in (#2169) (#2170)
* Add configuration flag SSH_EXPOSE_ANONYMOUS

If this flag (default True) is set to false, the SSH clone URL will only be exposed if the current user is signed in.

* Default SSH exposure set to false

To match GitHub and for security reasons, SSH URL exposure is disabled by default.
In addition to that. minor code changes have been applied.

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>

* Add integration tests

* Hide clone button neither HTTP and SSH is enabled

Signed-off-by: Stefan Kalscheuer <stefan@stklcode.de>
7 years ago
Ethan Koenig dd758ad8dc More integration tests for comment API (#2156) 7 years ago
Aaron Walker 6a3c03762a API: support '/orgs/:org/repos' (#2047)
* API: support '/orgs/:org/repos'
7 years ago
Ethan Koenig 858324c21a Fix username rendering bug (#2122)
* Fix username rendering bug

* XSS integration test

* Migration to unescape user full names
7 years ago
Ethan Koenig 93a1de4842 Fix repo API bug (#2133)
Don't require token when not necessary
7 years ago
Ethan Koenig 8f1d62ad3b Fix GET /users/:username/repos endpoint (#2125) 7 years ago
Ethan Koenig 89cd4dd424 Cache session cookies in tests (#2128) 7 years ago
Ethan Koenig 4c57db7924 Remove unused files (#2124) 7 years ago
Ethan Koenig f1adaef458 Less verbose integration tests (#2123)
* Helper functions for intergration test boilerplate
7 years ago
Ethan Koenig f99489d5c5 Fix API for branches with slashes (#2096) 7 years ago
Ethan Koenig fea902adc8 Check for valid renamed usernames (#2077)
* Check for valid renamed usernames

* Integration test

* Test for username with space

* Make name field required
7 years ago
Ethan Koenig eae9154811 Fix SQL bug in models.PullRequests 7 years ago
Lauris BH 783b1967e2 Fix release display and correct paging (#2080) 7 years ago
Ethan Koenig 735676267e Integration tests for issues API (#2059) 7 years ago
Ethan Koenig 4c0e567062 Fix improper setup for integration tests (#2050) 7 years ago
Ethan Koenig f64c232953 Improve integration test helper functions (#2049)
Set request headers in helper functions, and new helper for requests with string-formatted URLs
7 years ago
Ethan Koenig 3ffedeab03 Fix bug in issue labels API (#2048) 7 years ago
Lauris BH 0a5dc640a1 Make branch deletion URL more like GitHub's, fixes #1397 (#1994)
* Make branch deletion URL more like GitHub's, fixes #1397

* Add PR branch deletion integration test

* Do not allow deleting protected branch

* Change http error code to 403 if user has no write rights to repository

* Add check to not panic if forked repository has alrady been deleted
7 years ago
Mura Li 754482bf5d Add integration test for repository migration (#1983) 7 years ago
Mura Li 4d2ea7dc41 Add integration test for issue creating (#2002) 7 years ago
Ethan Koenig 255adc40ae Don't show non-comments in comments API (#2001) 7 years ago
Ethan Koenig 4df1a24096 Let not-logged-in users view releases (#1999) 7 years ago
Bo-Yi Wu 90f9bb12c6 fix golint error and rename func for suggestion. (#1997)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
7 years ago
Antoine GIRARD 6233e88f7f Use testing benchmark interface (#1993) 7 years ago
Ethan Koenig ce9b86082c Consolidate boilerplate in integration tests (#1979) 7 years ago
Ethan Koenig d1e4af66c1 Set console to debug for integration tests 7 years ago
Mura Li 01322af2e8 Add integration test for pull-request merge (#1912) 7 years ago
Shuanglei Tao 13f0e1255a Fix typo (#1974) 7 years ago
Mura Li 033aaf4b38 Add pull-create integration test (#1972) 7 years ago