Commit graph

277 commits

Author SHA1 Message Date
Lunny Xiao 6bdc556b7f
Fix some webhooks bugs ()
* fix some webhooks bugs

* update vendor

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix test

* fix clearlabels

* fix pullrequest webhook bug fix 

* update release webhook description

* remove unused code

* fix push webhook in pull request

* small changes
2018-05-21 10:28:29 +08:00
kolaente 95f2e2b57b Multiple assignees () 2018-05-09 19:29:04 +03:00
kolaente 1a97030017 Issue due date ()
* Started adding deadline to ui

* Implemented basic issue due date managing

* Improved UI for due date managing

* Added at least write access to the repo in order to modify issue due dates

* Ui improvements

* Added issue comments creation when adding/modifying/removing a due date

* Show due date in issue list

* Added api support for issue due dates

* Fixed lint suggestions

* Added deadline to sdk

* Updated css

* Added support for adding/modifiying deadlines for pull requests via api

* Fixed comments not created when updating or removing a deadline

* update sdk (will do properly once  is merged)

* enhanced updateIssueDeadline

* Removed unnessecary Issue.DeadlineString

* UI improvements

* Small improvments to comment creation
+ ui & validation improvements

* Check if an issue is overdue is now a seperate function

* Updated go-sdk with govendor as it was merged

* Simplified isOverdue method

* removed unessecary deadline to 0 set

* Update swagger definitions

* Added missing return

* Added an explanary comment

* Improved updateIssueDeadline method so it'll only update `deadline_unix`

* Small changes and improvements
* no need to explicitly load the issue when updating a deadline, just use whats already there
* small optimisations

* Added check if a deadline was modified before updating it

* Moved comment creating logic into its own function

* Code cleanup for creating deadline comment

* locale improvement

* When modifying a deadline, the old deadline is saved with the comment

* small improvments to xorm session handling when updating an issue deadline
+ style nitpicks

* style nitpicks

* Moved checking for if the user has write acces to middleware
2018-05-01 22:05:28 +03:00
Jonas Franz 8d5f58d834 Shows total tracked time in issue and milestone list ()
* Show total tracked time in issue and milestone list
Show total tracked time at issue page

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

* Optimizing TotalTimes by using SumInt

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

* Fixing wrong total times for milestones caused by a missing JOIN
Adding unit tests for total times

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

* Logging error instead of ignoring it

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

* Correcting spelling mistakes

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

* Change error message to a short version

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

* Add error handling to TotalTimes
Add variable for totalTimes

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

* Introduce TotalTrackedTimes as variable of issue
Load TotalTrackedTimes by loading attributes of IssueList
Load TotalTrackedTimes by loading attributes of single issue
Add Sec2Time as helper to use it in templates

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

* Fixed test + gofmt

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

* Load TotalTrackedTimes via MilestoneList instead of single requests

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

* Add documentation for MilestoneList

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

* Add documentation for MilestoneList

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

* Fix test

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

* Change comment from SQL query to description

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

* Fix unit test by using int64 instead of int

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

* Fix unit test by using int64 instead of int

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

* Check if timetracker is enabled

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

* Fix test by enabling timetracking

Signed-off-by: Jonas Franz <info@jonasfranz.de>
2018-04-29 13:58:47 +08:00
Lauris BH 58893384e8 Add issue closed time column to fix activity closed issues list ()
Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
2018-02-19 10:39:26 +08:00
Alberto González Palomo 30fb81c71e Use issue number/index instead of id for API URL. ()
Using the API calls, the issue objects retrieved by
/repos/{owner}/{repo}/issues
contains the wrong value in the "url" field:
it uses the "id" value instead of the "number" value.

For instance, in a new repo in try.gitea.io with just one issue:
[{
  "id": 896,
  "url": "https://try.gitea.io/api/v1/repos/AlbertoGP/uno/issues/896",
  "number": 1,
   ...
}]

The given URL does not work, but if you replace the "896" by "1" it
does.
2018-01-03 19:41:33 -06:00
modmew8 9f8349af06 Fixed asterisk based tasklist items, fixed requirement for one char after last blank to be a valid task. ()
Signed-off-by: modmew8 <modmew8@gmail.com>
2018-01-03 21:45:21 +02:00
modmew8 d996da6bab Added progressbar for issues (). ()
* Added progressbar for issues ().

* Updated the generated index.css.

Signed-off-by: modmew8 <modmew8@gmail.com>

* Removed stored progress percentage and changed it to css calc. Also added the issue task progress to the user/dashboard/issues.

Signed-off-by: modmew8 <modmew8@gmail.com>

* Removed unnecessary blanks.

Signed-off-by: modmew8 <modmew8@gmail.com>

* Formatted the files correctly, fmt-check terminates now without errors.

Signed-off-by: modmew8 <modmew8@gmail.com>

* Removed variables, made computing the tasks on demand with precompiled regexp.

Signed-off-by: modmew8 <modmew8@gmail.com>
2018-01-03 02:34:13 -06:00
Ethan Koenig 4c9341f689 Fix bugs in issue dashboard stats () 2017-12-26 01:25:16 +02:00
Ethan Koenig 6abfa48c0e Remove unnecessary updates to issue indexer () 2017-12-17 13:53:02 +02:00
Lunny Xiao f2e20c81b6 Refactor struct's time to remove unnecessary memory usage ()
* refactor struct's time to remove unnecessary memory usage

* use AsTimePtr simple code

* fix tests

* fix time compare

* fix template on gpg

* use AddDuration instead of Add
2017-12-11 06:37:04 +02:00
Lauris BH 5dc37b187c
Add reactions to issues/PR and comments () 2017-12-04 01:14:26 +02:00
Ethan Koenig 3163abedd6 Fix ref parsing in commit messages () 2017-12-03 10:20:12 +08:00
Lunny Xiao 35cc5b0402
Remove GetRepositoryByRef and add GetRepositoryByOwnerAndName ()
* remove GetRepositoryByRef and add GetRepositoryByOwnerAndName

* fix tests

* fix tests bug

* some improvements
2017-12-02 15:34:39 +08:00
Ethan Koenig aa962deec0 Replace deprecated Id method with ID () 2017-10-05 07:43:04 +03:00
Lunny Xiao a8717e5e3a Use AfterLoad instead of AfterSet on Structs ()
* use AfterLoad instead of AfterSet on Structs

* fix the comments on AfterLoad

* fix the comments on action AfterLoad
2017-10-01 19:52:35 +03:00
Morlinest cc84ca40d7 Remove redudant issue LoadAttributes() calls () 2017-09-27 09:41:52 -03:00
Ethan Koenig 4cb9394a97 Fix lint errors () 2017-09-19 11:08:30 +03:00
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
2017-09-16 23:16:21 +03:00
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>
2017-09-16 08:18:25 +08:00
Lunny Xiao 005900baea Use created & updated instead BeforeInsert & BeforeUpdate ()
* 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
2017-09-13 08:18:22 +03:00
Lunny Xiao 5de94a67cf some refactors for issue and comments () 2017-08-30 07:31:33 +03:00
Zsombor da230a2872 Add possibility to record branch or tag information in an issue () 2017-08-24 15:30:27 +03:00
Lunny Xiao 921d90fd8b fix 500 error when view an issue which's milestone deleted () 2017-08-12 10:15:30 +08:00
Ethan Koenig 7e0654bd9e Fix counts on issues dashboard ()
* Fix counts on issues dashboard

* setupSess -> setupSession

* Unit test

* Load repo owners for issues
2017-08-03 13:09:16 +08:00
Ethan Koenig a27863b6d1 Fix issue updated_unix bug () 2017-07-27 09:20:38 +08:00
Ethan Koenig 5f37944dff Fix unclosed session bug () 2017-07-26 17:30:47 +08:00
Ethan Koenig 48898e5d0b Fix PR nil-dereference bug ()
* Fix PR nil-dereference bug

* Revert to original error format
2017-07-26 15:16:45 +08:00
Lauris BH b639fa1648 Ignore invalid issue numbers in commit messages. Fixes () 2017-07-12 22:35:47 -05:00
Ethan Koenig 80707c4736 Fix default ghost assignee bug () 2017-06-28 09:27:12 +08:00
Győrvári Gábor f2afed3098 Enable assignee e-mail notification ()
* Enable assignee e-mail notification

* Check assignee and doer to avoid self made comment notifications.

* Assignee not always defined

* New method to avoid error when assignee deleted

* Assignee empty check
2017-06-23 21:43:37 +08:00
Lunny Xiao d71fad2ab7 Fix and fix issue comments hidden ()
* revert  and fix issue comments hidden

* fix 

* fix import

* improve comment type

* reduce unnecessary join

* fix comment on FindCommentsOptions
2017-06-21 09:00:44 +08:00
Lauris BH 6db387a21e Refactor session close as xorm already does everything needed internally () 2017-06-21 08:57:05 +08:00
Ethan Koenig 8fcda0442e Fix search by issue type ()
* Fix search by issue type
2017-06-15 05:09:03 +02:00
Ethan Koenig 9fbdd7d787 Fix engine bug in getIssueByID () 2017-06-11 14:39:12 +08:00
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
2017-05-26 09:38:18 +08:00
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
2017-03-16 09:34:24 +08:00
Ethan Koenig 09fe4a2ae9 Batch updates for issues () 2017-03-15 02:10:35 +01:00
Ethan Koenig 021904e4e6 Fix typos in models/ and modules/ () 2017-03-15 08:52:01 +08:00
Ethan Koenig ec0ae5d50c Refactor and fix incorrect comment () 2017-03-15 08:51:46 +08:00
Bo-Yi Wu d76d67de23 feat: expose url field on issue api. ()
* Add api url func.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix: Add unit testing.

* fix: conflicts

* fix: remove trim

* fix: revert test function name.
2017-03-03 22:35:42 +08:00
Ethan Koenig 22f7aa6e9c LableIDs -> LabelIDs () 2017-03-01 09:08:45 +08:00
Ethan Koenig cf80e19157 Optimize and unit test Issue_ReplaceLabels () 2017-02-28 09:35:55 +08:00
Lunny Xiao 1f7837d6d6 Refactor for issues loadattributes of a repository ()
* refactor for issues loadattributes of a repository

* refactors
2017-02-22 22:03:59 +08:00
Lunny Xiao 847527fd6d Fix all the bugs in issues and pulls on dashboard ()
* fix all the bugs in issues and pulls on dashboard

* small fix and refactor

* add method getRepoIDs for IssueList
2017-02-17 08:58:19 +08:00
Lunny Xiao 7a9a5c8a69 Fix assigned issues dashboard ()
* Fix assigned/created issues in dashboard. ()

* Fix assigned/created issues in dashboard.

* Use GetUserIssueStats for getting all Dashboard stats.

* Use gofmt to format the file properly.

* Replace &Issue{} with new(Issue).

* Check if user has access to given repository.

* Remove unnecessary filtering of issues.

* Return 404 error if invalid repository is given.

* Use correct number of issues in paginater.

* fix issues on dashboard
2017-02-14 22:15:18 +08:00
Ethan Koenig 076f940f1f Fix logging bug
Error logged everytime an assignee was removed
2017-02-12 08:54:15 +01:00
Lunny Xiao cf0f451c37 Add delete branch track on pull request comments ()
* add delete branch track on pull request comments

* don't change vendor
2017-02-11 12:00:29 +08:00
Lunny Xiao b6dd6210ea bug fixed for issue count () 2017-02-09 17:59:57 +08:00
Ethan Koenig a6751cec04 Unit tests for issue_milestone () 2017-02-09 14:39:26 +08:00