1806 Commits (911ca0215377b34559f2304a22dce863e219b255)

Author SHA1 Message Date
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
Lunny Xiao 005900baea Use created & updated instead BeforeInsert & BeforeUpdate (#2482)
* use created & updated instead BeforeInsert & BeforeUpdate

* fix vendor checksum

* only show generated SQL when development mode

* remove extra update column updated_unix

* remove trace config
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
techknowlogick 9bdbfbf6f3 Disable custom Git Hooks globally via configuration file (#2450)
* Create option to disable githooks globally via configuration file

* Update comment in app.ini to align with @ethantkoenig's suggestion

Signed-off-by: Matti Ranta <matti@mdranta.net>
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 4f9a28e1f5 Make repo private to no interfere with other tests (#2467) 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
Lauris BH a569d3dedc Fix migration from pre-v15 to 1.2.0 (#2460) 7 years ago
Ethan Koenig b689bb6180 Webhooks for repo creation/deletion (#1663)
* Webhooks for repo creation/deletion

* add createHookTask

* Add handles for GetSlackPayload and GetDiscordPayload
7 years ago
Lunny Xiao 04ec79579c fix orgnization webhooks (#2422)
* fix org webhooks

* remove trace code
7 years ago
Lunny Xiao 5de94a67cf some refactors for issue and comments (#2419) 7 years ago
Lunny Xiao 3e6fed368b fix webhook test (#2415)
* fix webhook test

* fix error message

* fix typo
7 years ago
Lauris BH edb95faba2 Fix releases to be counted from database not tags (#2389) 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
Lunny Xiao ced50e0ec1 Implementation of discord webhook (#2402)
* implementation of discord webhook

* fix webhooks

* fix typo and unnecessary color values

* fix typo

* fix imports and revert changes to webhook_slack.go
7 years ago
Lunny Xiao e41da3845d fix duplicated feed (#2370) 7 years ago
Morlinest 0f2c98adcd Fix "index out of range" runtime error in repo_list tests (#2376) 7 years ago
Manuel d9d8fad230 Add UseCompatSSHURI setting (#2356)
* Add UseCompatSSHURI setting

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com> (+1 squashed commits)

Squashed commits:

[dda2dc79] Add ForceCloneSSHURL setting

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>

* Make protocol if construct more readable

Signed-off-by: Manuel Kroeber <manuel.kroeber@gmail.com>
7 years ago
Lunny Xiao f61a1d210c Fix missing collabrative repos (#2367)
* fix missing collabrative repos

* fix bug of collabrative

* fix SQL quotes
7 years ago
Zsombor da230a2872 Add possibility to record branch or tag information in an issue (#780) 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
Ethan Koenig fd6e91077a Fix SQL condition bug in GetFeeds(..) (#2360) 7 years ago
Bwko 1a5fe4326f Add collaborative repositories to the dashboard (#2205)
* Add collaborative repositories to the dashboard

Remove some unused code from the Dashboard func

* fix some bug and some refactor

* fix tests
7 years ago
Lunny Xiao 2c6a0fdca8 update latest xorm version to vendor (#2353) 7 years ago
Ethan Koenig 7907786040 Trigger sync webhooks on UI commit (#2302)
* Trigger sync webhooks on UI commit

* Also fix UI upload/delete
7 years ago
Lunny Xiao f960e19c59 Only update needed columns when update user (#2296)
* only update needed columns when update user

* fix missing update_unix column
7 years ago
Lunny Xiao 921d90fd8b fix 500 error when view an issue which's milestone deleted (#2297) 7 years ago
G 34df9deff1 Convert xorm literal queries to method calls (#2253) 7 years ago
Ethan Koenig 7e0654bd9e Fix counts on issues dashboard (#2215)
* Fix counts on issues dashboard

* setupSess -> setupSession

* Unit test

* Load repo owners for issues
7 years ago
Ethan Koenig f29458bd3a EnableUnit() -> UnitEnabled() (#2242) 7 years ago
G 66e8262530 Replace calls to xorm UseBool with Where (#2237) 7 years ago
Ethan Koenig fd45a032a7 Fix bare-repo bugs (#2199)
* Fix bare-repo bugs

* Integration tests

* Unused import
7 years ago
Ethan Koenig a27863b6d1 Fix issue updated_unix bug (#2204) 7 years ago
Ethan Koenig 5f37944dff Fix unclosed session bug (#2214) 7 years ago
Lauris BH 1d032f5220 Fix compiling without sqlite and gcc (#2177) 7 years ago
Ethan Koenig 48898e5d0b Fix PR nil-dereference bug (#2195)
* Fix PR nil-dereference bug

* Revert to original error format
7 years ago
Lauris BH dde0052ca2 Fix key usage time update if the key is used in parallel for multiple operations (#2185) 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
Lauris BH b639fa1648 Ignore invalid issue numbers in commit messages. Fixes #2022 (#2150) 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
Antoine GIRARD 30787e48f2 Improve org error handling (#2117)
* Improve ErrOrgNotExist type
Return new error type
Use good error check
Use new method to check error
Update tests

* Fix unchanged method name report
7 years ago
Ethan Koenig a52cd59727 Fix unchecked error bug (#2110) 7 years ago
Lauris BH f189ccd2d6 Fix git hooks update to receive required arguments. Fixes #2090 (#2095)
* Changed migration calling so that migrations can use models package
7 years ago
Ethan Koenig eae9154811 Fix SQL bug in models.PullRequests 7 years ago
Lauris BH 12cb6cd3c9 Merge pull request #2087 from Bwko/fix_error_exit
Fix exit status 1 not handled @ getMergeCommit (#2087)
7 years ago
Bwko b36849dc1f
Fix exit status 1 not handled @ getMergeCommit 7 years ago