1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-01 17:05:48 +00:00
Commit Graph

455 Commits

Author SHA1 Message Date
Lunny Xiao
aa7c34cf86 Fix error log when loading issues caused by a xorm bug (#7271)
* fix error log when loading issues caused by a xorm bug

* upgrade packages

* fix fmt

* fix Consistency

* fix tests
2019-06-23 18:22:43 +03:00
kolaente
f9ec2f89f2 Add golangci (#6418) 2019-06-12 15:41:28 -04:00
Lunny Xiao
c385dcc26b
Fix index produces problem when issues/pulls deleted (#6973)
* fix index produces problem when issues/pulls deleted

* fix tests

* fix tests

* fix tests
2019-05-18 10:37:49 +08:00
Lunny Xiao
34eee25bd4
Move sdk structs to modules/structs (#6905)
* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
2019-05-11 18:21:34 +08:00
Lunny Xiao
dd1acd7ce4 Comments list performance optimization (#5305) 2019-04-18 01:00:03 -04:00
zeripath
704da08fdc
Better logging (#6038) (#6095)
* Panic don't fatal on create new logger

Fixes #5854

Signed-off-by: Andrew Thornton <art27@cantab.net>

* partial broken

* Update the logging infrastrcture

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Reset the skip levels for Fatal and Error

Signed-off-by: Andrew Thornton <art27@cantab.net>

* broken ncsa

* More log.Error fixes

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove nal

* set log-levels to lowercase

* Make console_test test all levels

* switch to lowercased levels

* OK now working

* Fix vetting issues

* Fix lint

* Fix tests

* change default logging to match current gitea

* Improve log testing

Signed-off-by: Andrew Thornton <art27@cantab.net>

* reset error skip levels to 0

* Update documentation and access logger configuration

* Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE

* Fix broken level caching

* Refactor the router log

* Add Router logger

* Add colorizing options

* Adjust router colors

* Only create logger if they will be used

* update app.ini.sample

* rename Attribute ColorAttribute

* Change from white to green for function

* Set fatal/error levels

* Restore initial trace logger

* Fix Trace arguments in modules/auth/auth.go

* Properly handle XORMLogger

* Improve admin/config page

* fix fmt

* Add auto-compression of old logs

* Update error log levels

* Remove the unnecessary skip argument from Error, Fatal and Critical

* Add stacktrace support

* Fix tests

* Remove x/sync from vendors?

* Add stderr option to console logger

* Use filepath.ToSlash to protect against Windows in tests

* Remove prefixed underscores from names in colors.go

* Remove not implemented database logger

This was removed from Gogs on 4 Mar 2016 but left in the configuration
since then.

* Ensure that log paths are relative to ROOT_PATH

* use path.Join

* rename jsonConfig to logConfig

* Rename "config" to "jsonConfig" to make it clearer

* Requested changes

* Requested changes: XormLogger

* Try to color the windows terminal

If successful default to colorizing the console logs

* fixup

* Colorize initially too

* update vendor

* Colorize logs on default and remove if this is not a colorizing logger

* Fix documentation

* fix test

* Use go-isatty to detect if on windows we are on msys or cygwin

* Fix spelling mistake

* Add missing vendors

* More changes

* Rationalise the ANSI writer protection

* Adjust colors on advice from @0x5c

* Make Flags a comma separated list

* Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING

* Ensure matching is done on the non-colored message - to simpify EXPRESSION
2019-04-02 08:48:31 +01:00
oscar.lofwenhamn
2019983e77 Make "Ghost" not link to 404 page (#6410)
* Make Ghost not link to 404 page

* Make correct localization label show

* Create and use GetLastEventLabelFake for when a Ghost user has made the action, thus not linking to a user profile
* Add corresponding _fake entries to locale_en-US

* Make Ghost avatar not link to 404 page

* Make Ghost on milestone_issues not link to 404 page
2019-03-27 18:22:39 -04:00
stevegt
b257e0456b Add ability to sort issues by due date (#6206) (#6244)
Signed-off-by: Steve Traugott <stevegt@t7a.org>
2019-03-05 09:39:41 -05:00
zeripath
f066bd2b3f Prevent double-close of issues (#6233) 2019-03-04 21:52:52 -05:00
Lunny Xiao
477ef46251
Add more tests and docs for issue indexer, add db indexer type for searching from database (#6144)
* add more tests and docs for issue indexer, add db indexer type for searching from database

* fix typo

* fix typo

* fix lint

* improve docs
2019-02-21 13:01:28 +08:00
Lunny Xiao
0751153613
refactor issue indexer, add some testing and fix a bug (#6131)
* refactor issue indexer, add some testing and fix a bug

* fix error copyright year on comment header

* issues indexer package import keep consistent
2019-02-21 08:54:05 +08:00
Lunny Xiao
830ae61456 Refactor issue indexer (#5363) 2019-02-19 09:39:39 -05:00
Lanre Adelowo
44114b38e6 Implement "conversation lock" for issue comments (#5073) 2019-02-18 22:55:04 +02:00
Zsombor
23414ac2a1 Fix panic: template: repo/issue/list:210: unexpected "=" in operand (#6041) 2019-02-13 10:14:17 +02:00
Lauris BH
075649572d Add the ability to use multiple labels as filters(#5786) 2019-01-22 23:10:38 -05:00
Lunny Xiao
82e08a3364
Refactor notification for indexer (#5111)
* notification for indexer

* use NullNotifier as parent struct
2019-01-17 22:23:22 +08:00
zeripath
6868378673 Ensure that sessions are passed into queries that could use the database to prevent deadlocks (#5718)
* Fixed deadlock in CreateComment

* Fix possible deadlock in UpdateIssueDeadline from createDeadlineComment

* Ensure that calls to IsTimeTracker enabled are called within session

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Ensure that calls to reactionList are also called within session

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Ensure all calls in NewPullRequest with the session are called within the session

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Deal with potential deadlocks in repo

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Ensure that isStaring is checked within our transaction

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Fix mistake in isOrganizationMember

Sorry.
2019-01-13 21:29:58 -05:00
Lunny Xiao
beab2df122 Refactor mail notification (#5110)
* mail notification implement interface

* fix file comment year

* use NullNotifier as parent struct of notifiers
2019-01-13 16:42:55 +02:00
zeripath
6311e4ce6a Fix sqlite deadlock when assigning to a PR (#5640)
* Fix sqlite deadlock when assigning to a PR

Fix 5639

Signed-off-by: Andrew Thornton <art27@cantab.net>

* More possible deadlocks found and fixed

Signed-off-by: Andrew Thornton <art27@cantab.net>
2019-01-04 16:51:27 -05:00
Lunny Xiao
b3b7598ec6 Improve performance of dashboard (#4977) 2018-12-13 10:55:43 -05:00
romankl
2d707fe5e6 ensure that the closed_at is set for closed (#5449)
right now the `closed_at` field for json responses is not filled during
the `APIIssue` creation for api responses.

For a closed issue you get a result like:
```json
"state":"open","comments":0,"created_at":"2018-11-29T16:39:24+01:00",
"updated_at":"2018-11-30T10:49:19+01:00","closed_at":null,
"due_date":null,"pull_request":null}
```
which has no information about the closing date. (which exists in the
db and ui)
with this PR the result changes to this:

```json
:null,"assignee":null,"assignees":null,
"state":"closed",
"comments":0,"created_at":"2018-11-29T16:43:05+01:00",
"updated_at":"2018-12-02T19:17:05+01:00",
"closed_at":"2018-12-02T19:17:05+01:00",
"due_date":null,"pull_request":null}
```

fixes: https://github.com/go-gitea/gitea/issues/5446
Signed-off-by: Roman <romaaan.git@gmail.com>
2018-12-02 15:43:01 -05:00
Lunny Xiao
2dc805c0c6
Milestone issues and pull requests (#5293)
* add milestone issues and pulls page instead of redirecting issues page

* add milestone when creating issue from milestone page

* refactor to merge similiar codes as a new function issues

* remove milestone info on milestone issues list

* fix missing params
2018-11-29 09:46:30 +08:00
Lunny Xiao
eabbddcd98
Restrict permission check on repositories and fix some problems (#5314)
* fix units permission problems

* fix some bugs and merge LoadUnits to repoAssignment

* refactor permission struct and add some copyright heads

* remove unused codes

* fix routes units check

* improve permission check

* add unit tests for permission

* fix typo

* fix tests

* fix some routes

* fix api permission check

* improve permission check

* fix some permission check

* fix tests

* fix tests

* improve some permission check

* fix some permission check

* refactor AccessLevel

* fix bug

* fix tests

* fix tests

* fix tests

* fix AccessLevel

* rename CanAccess

* fix tests

* fix comment

* fix bug

* add missing unit for test repos

* fix bug

* rename some functions

* fix routes check
2018-11-28 19:26:14 +08:00
Lunny Xiao
2b7c366f64
fix sqlite lock (#5184)
* fix sqlite lock

* fix bug

Co-Authored-By: lunny <xiaolunwen@gmail.com>

* fix bug

Co-Authored-By: lunny <xiaolunwen@gmail.com>
2018-10-27 22:45:24 +08:00
Lunny Xiao
ea619b39b2
Add notification interface and refactor UI notifications (#5085)
* add notification interface and refactor UI notifications

* add missing methods on notification interface and notifiy only issue status really changed

* implement NotifyPullRequestReview for ui notification
2018-10-18 19:23:05 +08:00
SagePtr
50ce19eff7 Fix failure on creating pull request with assignees (#4419) (#4583) 2018-08-16 19:52:51 +08:00
Lauris BH
0c59edaafa Update xorm to latest version and fix correct user table referencing in sql (#4473) 2018-07-20 10:10:17 +08:00
kolaente
1bff02de55 Added dependencies for issues (#2196) (#2531) 2018-07-17 17:23:58 -04:00
Lunny Xiao
6bdc556b7f
Fix some webhooks bugs (#3981)
* 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 #3492

* 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 (#3705) 2018-05-09 19:29:04 +03:00
kolaente
1a97030017 Issue due date (#3794)
* 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 go-gitea/go-sdk#103 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 (#3341)
* 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 (#3537)
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. (#3298)
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. (#3296)
Signed-off-by: modmew8 <modmew8@gmail.com>
2018-01-03 21:45:21 +02:00
modmew8
d996da6bab Added progressbar for issues (#1146). (#3171)
* Added progressbar for issues (#1146).

* 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 (#3073) 2017-12-26 01:25:16 +02:00
Ethan Koenig
6abfa48c0e Remove unnecessary updates to issue indexer (#3212) 2017-12-17 13:53:02 +02:00
Lunny Xiao
f2e20c81b6 Refactor struct's time to remove unnecessary memory usage (#3142)
* 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 (#2856) 2017-12-04 01:14:26 +02:00
Ethan Koenig
3163abedd6 Fix ref parsing in commit messages (#3067) 2017-12-03 10:20:12 +08:00
Lunny Xiao
35cc5b0402
Remove GetRepositoryByRef and add GetRepositoryByOwnerAndName (#3043)
* 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 (#2655) 2017-10-05 07:43:04 +03:00
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
2017-10-01 19:52:35 +03:00
Morlinest
cc84ca40d7 Remove redudant issue LoadAttributes() calls (#2614) 2017-09-27 09:41:52 -03:00
Ethan Koenig
4cb9394a97 Fix lint errors (#2547) 2017-09-19 11:08:30 +03:00
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
2017-09-16 23:16:21 +03:00
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>
2017-09-16 08:18:25 +08:00
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
2017-09-13 08:18:22 +03:00
Lunny Xiao
5de94a67cf some refactors for issue and comments (#2419) 2017-08-30 07:31:33 +03:00
Zsombor
da230a2872 Add possibility to record branch or tag information in an issue (#780) 2017-08-24 15:30:27 +03:00
Lunny Xiao
921d90fd8b fix 500 error when view an issue which's milestone deleted (#2297) 2017-08-12 10:15:30 +08:00
Ethan Koenig
7e0654bd9e Fix counts on issues dashboard (#2215)
* 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 (#2204) 2017-07-27 09:20:38 +08:00
Ethan Koenig
5f37944dff Fix unclosed session bug (#2214) 2017-07-26 17:30:47 +08:00
Ethan Koenig
48898e5d0b Fix PR nil-dereference bug (#2195)
* 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 #2022 (#2150) 2017-07-12 22:35:47 -05:00
Ethan Koenig
80707c4736 Fix default ghost assignee bug (#2069) 2017-06-28 09:27:12 +08:00
Győrvári Gábor
f2afed3098 Enable assignee e-mail notification (#2003)
* 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 #2001 and fix issue comments hidden (#2016)
* revert #2001 and fix issue comments hidden

* fix #2001

* 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 (#2020) 2017-06-21 08:57:05 +08:00
Ethan Koenig
8fcda0442e Fix search by issue type (#1914)
* Fix search by issue type
2017-06-15 05:09:03 +02:00
Ethan Koenig
9fbdd7d787 Fix engine bug in getIssueByID (#1934) 2017-06-11 14:39:12 +08:00
Ethan Koenig
0c332f0480 Fix activity feed (#1779)
* 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 (#1217)
* Send notifications to partecipants in issue comments

Closes #1216

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 (#926) 2017-03-15 02:10:35 +01:00
Ethan Koenig
021904e4e6 Fix typos in models/ and modules/ (#1248) 2017-03-15 08:52:01 +08:00
Ethan Koenig
ec0ae5d50c Refactor and fix incorrect comment (#1247) 2017-03-15 08:51:46 +08:00
Bo-Yi Wu
d76d67de23 feat: expose url field on issue api. (#982)
* 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 (#1088) 2017-03-01 09:08:45 +08:00
Ethan Koenig
cf80e19157 Optimize and unit test Issue_ReplaceLabels (#1080) 2017-02-28 09:35:55 +08:00
Lunny Xiao
1f7837d6d6 Refactor for issues loadattributes of a repository (#971)
* 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 (#943)
* 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 (#920)
* Fix assigned/created issues in dashboard. (#3560)

* 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 (#888)
* 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 (#881) 2017-02-09 17:59:57 +08:00
Ethan Koenig
a6751cec04 Unit tests for issue_milestone (#878) 2017-02-09 14:39:26 +08:00
Ethan Koenig
e6b4448ba3 Fix bug in Issue.GetIsRead (#876) 2017-02-09 11:47:24 +08:00
Lunny Xiao
f35b20b042 track issue title changes (#841) 2017-02-05 22:36:00 +08:00
Ethan Koenig
d0960b8035 Move IssueUser code to separate file (#836)
Also add unit tests
2017-02-04 20:37:26 +08:00
Lunny Xiao
3e0525b47d Track assignee for issue (#808)
* track assignee for issue

* fix lint

* use getUserByID instead Get
2017-02-03 23:09:10 +08:00
Ethan Koenig
68bdaf0a6b Drop redundant columns from issue_user table (#638) 2017-02-03 15:22:39 +08:00
Lunny Xiao
081485ecfd add milestone changed traker on issue view (#804) 2017-02-01 10:36:08 +08:00
Ethan Koenig
10644d6dd7 Bug fixes and unit tests for models/issue_label (#802) 2017-02-01 09:31:35 +08:00
Lunny Xiao
f94869d2d1 Track labels changed on issue view & resolved #542 (#788)
* track labels changed on issue view & resolved #542

* add missing head comment & sort & fix refresh
2017-01-30 20:46:45 +08:00
Andrey Nering
5348e8b71a Fix color: closed PR was showing as purple instead of red 2017-01-28 14:01:07 -02:00
Lunny Xiao
8c2381103a bug fixed issues 500 resolved #754 (#756) 2017-01-25 16:28:03 +08:00
Ethan Koenig
833f8b94c2 Search bar for issues/pulls (#530) 2017-01-25 10:43:02 +08:00
Philip Couling
1610b9f547 Spun attachments into seperate go file (#701)
Moved attachments into seperate go file
2017-01-20 07:58:46 +01:00
Andrey Nering
769e0a3ea6 Notifications: mark as read/unread and pin (#629)
* Use relative URLs

* Notifications - Mark as read/unread

* Feature of pinning a notification

* On view issue, do not mark as read a pinned notification
2017-01-12 12:27:09 +08:00
Andrey Nering
03b45284e1 Merge pull request #555 from ethantkoenig/tests/pull
Unit tests for models/pull.go
2017-01-06 19:19:18 -02:00
Andrey Nering
84b7d29d34 Create missing database indexes (#596) 2017-01-06 23:14:33 +08:00
Ethan Koenig
72bfabfada Unit tests for models/pull.go 2017-01-06 10:08:23 -05:00
Bo-Yi Wu
6510e57758 fix gofmt error
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-12-30 20:41:10 +01:00
Andrey Nering
42904cb98a Notification - Step 1 (#523)
* Notification - Step 1

* Add copyright headers

* Cache issue and repository on notification model
2016-12-31 00:44:54 +08:00
Bwko
a345a03d99 Added sorting to the labels & milestones page (#199) 2016-12-24 22:41:09 +08:00
Ethan Koenig
d0932ef147 Bug fixes for Issues filters (#413)
Correctly handle simultaneous assignee/poster filters, and conflicting assignee filters
2016-12-24 18:33:21 +08:00
Lunny Xiao
0c5c34d7dd UpdateIssueUsersByMentions was calling database write operations while (#443)
a transaction session was in progress. MailParticipants was failing
silently because of the SQLITE_LOCKED error. Make sure failures in
MailParticipants enter the log, and pass on the transaction context.

issue: let caller pass in database context, and use it
issue_comment: obtain database context to pass to UpdateIssueMentions
issue_comment: log any error from call to MailParticipants
issue_mail: pass on database context to UpdateIssueMentions
2016-12-22 17:00:39 +08:00
Ethan Koenig
4c89a9c33c Bug fixes and tests for modules/base (#442)
Also address other TODOs
2016-12-22 16:58:04 +08:00
Lunny Xiao
7c46667e71 fixed vulnerabilities labels (#409) 2016-12-17 19:49:17 +08:00
Ethan Koenig
04b9a7e7a2 Bug fixes for repo permissions in API
Also move duplicated code into repo.APIFormat(..)
2016-12-07 12:55:24 +01:00
Kim "BKC" Carlbäcker
0f05470cb8 [API] Pull Requests (#248) 2016-12-02 12:10:39 +01:00
Kim "BKC" Carlbäcker
42ec5ce740 Fix breakage from vendor-update 2016-11-29 11:50:22 +01:00
Thomas Boerger
e9c6053b86 Merge pull request #246 from Bwko/fix/typo
Fix typos
2016-11-25 12:54:57 +01:00
Sandro Santilli
8aa960f129 Actually document the missing bits 2016-11-24 09:41:11 +01:00
Sandro Santilli
4dd1eb57bd Lint issue.go 2016-11-24 09:02:44 +01:00
Bwko
2a449bd4b1 Fix typos 2016-11-21 20:08:21 +01:00
Lunny Xiao
3dedc027ac Bug fixed for issues (#156) 2016-11-12 13:06:33 +01:00
Lunny Xiao
30a37311f8 use in instead string join (#155) 2016-11-12 09:29:18 +01:00
Thibault Meyer
ddee4c8b58
Normalize files with gofmt 2016-11-11 13:11:45 +01:00
Sandro Santilli
a1c5f02444 Fix import path of go-sdk (#141)
From code.gitea.io/go-sdk/gitea
  To code.gitea.io/sdk/gitea
2016-11-11 17:39:44 +08:00
Thibault Meyer
b0ddced2b5
Merge remote-tracking branch 'upstream/master' into feature/rewrite-xorm-queries
# Conflicts:
#	models/git_diff.go
#	models/issue.go
#	models/org.go
#	models/pull.go
#	models/repo.go
2016-11-10 21:05:52 +01:00
Thibault Meyer
a4454f5d0f
Rewrite XORM queries 2016-11-10 20:59:51 +01:00
Sandro Santilli
4247304f5a Update import paths from github.com/go-gitea to code.gitea.io (#135)
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
2016-11-10 17:24:48 +01:00
Lunny Xiao
c511f1c6c3 Merge pull request #18 from LefsFlarey/issue/3675
Fix 500 error caused by deleted users on issues (#3675)
2016-11-09 15:14:18 +08:00
Flare
a6c487f6ca
Fix err not being nil 2016-11-09 13:07:01 +08:00
Sandro Santilli
f6a11e0de1 More MixedCase consts 2016-11-07 17:24:59 +01:00
Sandro Santilli
f388661bda ACCESS_MODE_* -> AccessMode* 2016-11-07 17:20:37 +01:00
Sandro Santilli
80eea77953 Use MixedCase constant names
See https://github.com/golang/go/wiki/CodeReviewComments#mixed-caps
2016-11-07 17:05:08 +01:00
Thomas Boerger
4c6c16f358
Replaced go-gogs-client with go-sdk imports 2016-11-07 16:10:32 +01:00
Flare
fd6be0d17e
Still print error if user does not exist 2016-11-05 02:47:54 +08:00
Rémy Boulanouar
2d68bd1ef9 Change import reference to match gitea instead of gogs (#37) 2016-11-03 10:29:56 -02:00
Flare
1b59e6f910
Fix 500 error caused by deleted users on issues (#3675) 2016-09-20 18:13:57 +08:00
Unknwon
643142acab Web editor: support upload files 2016-08-30 05:23:59 -07:00
Unknwon
6b98d58906 #2966 code cleanup 2016-08-26 13:40:53 -07:00
Unknwon
0b273ac4d5 #3383 code cleanup 2016-08-24 16:05:56 -07:00
Kim "BKC" Carlbäcker
06602a84ff Fix PR-webhook issue where Label-data is stale (#3486) (#3510)
* Fix PR-webhook issue where Label-data is stale

* Conventions \o/

* logs are nice if they're consistent...
2016-08-24 12:01:30 -07:00
Unknwon
a00c932bbc General code quality improvement 2016-08-16 23:06:38 -07:00
Unknwon
6f9a95f830 #2246 add HTMLURL to webhook type
- Fill Milestone and Assignee field when available in webhook payload
2016-08-16 10:19:09 -07:00
Unknwon
2625193a48 models/repo_editor: improve code quality 2016-08-15 22:20:55 -07:00
Unknwon
4042d1f0c3 models/issue: improve quality and performance of NewIssue function 2016-08-15 18:40:32 -07:00
Unknwon
94392a7af3 Fix empty repository panic on send test webhook 2016-08-15 05:53:47 -07:00
Unknwon
15845cb287 Code clean up for new config options 2016-08-14 23:52:24 -07:00
Richard Mahn
d0a0239bac Squashed commit of the following:
commit 0afcb843d7ffd596991c4885cab768273a6eb42c
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 17:13:29 2016 -0600

    Removed Upload stats as the upload table is just a temporary table

commit 7ecd73ff5535612d79d471409173ee7f1fcfa157
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 08:42:41 2016 -0600

    Fix for CodeMirror mode

commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 08:03:33 2016 -0600

    Made tabbing in editor use spaces

commit 23af384c53206a8a40e11e45bf49d7a149c4adcd
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 07:56:46 2016 -0600

    Fix for data-url

commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9
Merge: 7fc8a89 991ce42
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 07:42:53 2016 -0600

    Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file

    Conflicts:
    	modules/bindata/bindata.go
    	public/js/gogs.js

commit 7fc8a89cb495478225b02d613e647f99a1489634
Merge: fd3d86c c03d040
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 07:40:00 2016 -0600

    Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file

commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Sun Jul 31 07:39:44 2016 -0600

    Code cleanup

commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Fri Jul 29 15:38:23 2016 -0600

    Code cleanup

commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Thu Jul 28 18:36:01 2016 -0600

    Code cleanup and fixes

commit c2895dc742f25f8412879c9fa15e18f27f42f194
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Thu Jul 28 18:24:04 2016 -0600

    Fixes per Unknwon's requests

commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef
Merge: 889e9fa ad7ea88
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Thu Jul 28 17:13:43 2016 -0600

    Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file

    Conflicts:
    	modules/bindata/bindata.go
    	modules/setting/setting.go

commit 889e9faf1bd8559a4979c8f46005d488c1a234d4
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Fri Jul 22 14:09:18 2016 -0600

    Fix in gogs.js

commit 47603edf223f147b114be65f3bd27bc1e88827a5
Merge: bb57912 cf85e9e
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Fri Jul 22 14:07:36 2016 -0600

    Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file

    Conflicts:
    	modules/bindata/bindata.go
    	public/js/gogs.js

commit bb5791255867a71c11a77b639db050ad09c597a4
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Fri Jul 22 14:02:18 2016 -0600

    Update for using CodeMirror mode addon

commit d10d128c51039be19e2af9c66c63db66a9f2ec6d
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Tue Jul 19 16:12:57 2016 -0600

    Update for Edit

commit 34a34982025144e3225e389f7849eb6273c1d576
Merge: fa1b752 1c7dcdd
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Tue Jul 19 11:52:02 2016 -0600

    Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file

    Conflicts:
    	modules/bindata/bindata.go

commit fa1b752be29cd455c5184ddac2ffe80b3489763e
Author: Richard Mahn <richard_mahn@wycliffeassociates.org>
Date:   Fri Jul 15 18:35:42 2016 -0600

    Feature for editing, creating, uploading and deleting files
2016-08-14 23:52:24 -07:00
Unknwon
3f7f4852ef #2246 fully support of webhooks for pull request 2016-08-14 03:32:24 -07:00
Unknwon
5448d29b2e #3417 wrong dashboard issue count for create by you 2016-08-09 23:19:52 -07:00
lstahlman
699c71d319 Fix for #3401 Links of pull request comment email should use pulls URL (#3403) 2016-08-08 22:40:05 -07:00
Unknwon
e7fd65f0cf #3290 better code structure and batch minor improvements 2016-08-03 11:51:22 -07:00
Unknwon
8aa0a76702 #3327 fix wrong table name in Join 2016-07-26 18:40:20 +08:00
Unknwon
e74630ae3b #1384 add pagination for repositories 2016-07-24 14:32:46 +08:00
Unknwon
1f2e173a74 Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
Unknwon
46e96c008c Use struct for UI settings 2016-07-24 00:23:54 +08:00
Unknwon
250be011c7 Remove redundant Unix timestamp method call
Unix() already uses UTC as timezone
2016-07-23 20:24:44 +08:00
Unknwon
5761342f32 #3291 fix SQLite3 session read/update conflict on create new issue 2016-07-21 14:26:30 +08:00
lstahlman
e7a4f96fb6 Updated Issues and Issues Stats functions to include table aliases. This addresses errors involving ambiguous column references when filtering issues by the view type "Mentioning you". (#3269) 2016-07-17 09:18:35 +08:00
Unknwon
f1b8d52eb3 #2854 fix no mail notification when issue is closed/reopened 2016-07-16 00:36:39 +08:00
Robin Lambertz
ac05f88641 Fix #3154 (#3155) 2016-06-27 16:58:53 +08:00
Unknwon
0a78d99a4d models/release: filter input to prevent command line argument vulnerability 2016-05-06 15:40:41 -04:00
Unknwon
0325bec283 #2895 minor fix for bug of xorm 2016-04-26 00:22:03 -04:00
Thomas Boerger
dfad51fe9e Made the issue stats query more secure with parameterized placeholders (#2895) 2016-04-26 00:07:49 -04:00
Unknwon
762ab056a2 Fix XORM IN condition table name parse 2016-03-27 18:21:37 -04:00
Thomas Boerger
746c7fd4e7 Followup fix for previous query fix 2016-03-28 00:05:49 +02:00
Thomas Boerger
b5948f2e71 Made the issues query more secure and simpler 2016-03-27 23:26:45 +02:00
Thomas Boerger
79a1bfd963 Try to make the SQL queries cleaner and more secure 2016-03-27 22:59:57 +02:00
Unknwon
9bd9ad4205 #1692 add CRUD issue APIs
- Fix go-gogs-client#10
- Related to #809
2016-03-13 23:20:22 -04:00
Marin Jankovski
1314ba219e Updated and created were appended with _unix. Fresh databases have only the newly named fields. 2016-03-11 12:43:35 +01:00
Unknwon
ad513a20e9 #2302 Replace time.Time with Unix Timestamp (int64) 2016-03-09 19:53:30 -05:00
Unknwon
a5b0400be7 #1146 finish new access rights for collaborators 2016-03-05 20:45:23 -05:00
Unknwon
414eb22ef9 #1597 fix activitity feeds for pull requests 2016-03-05 12:58:51 -05:00
Unknwon
e2d370f0da #1597 fix pull request remote head can't update with force push 2016-03-04 16:53:03 -05:00
Unknwon
ea80274229 #2700 fix sqlite3 can't create issue with more than one label 2016-02-29 18:45:12 -05:00
Unknwon
d320915ad2 Minor fix for #2710 2016-02-27 11:31:24 -05:00
Lukas Dietrich
c0eaae200e Add ForegroundColor for labels 2016-02-27 13:59:11 +01:00
Unknwon
129638117f #2697 fix panic when close issue via commit message 2016-02-25 14:17:55 -05:00
Unknwon
912f7b51e9 #1821 add actions for close and reopen issues 2016-02-22 12:40:00 -05:00
Unknwon
ac78bae7b5 Replace uuid module with original package 2016-02-20 18:13:12 -05:00
Tobias Kunicke
fa5a1cb54f regulate timezone for milestone.deadline 2016-02-06 00:08:02 +01:00
Antoine GIRARD
688fc515f8 Fix username display in lower-cased for comment in Dashboard 2016-01-12 21:30:14 +01:00
Unknwon
a49af93faf #1692 APIs: Users Followers
- User profile un/follow
- List user's followers/following
2015-12-21 04:24:11 -08:00
Alex Myasoedov
ae54d878c0 Fix misspelled words 2015-12-06 16:42:23 +02:00
Unknwon
b4877b1e06 fix for #2012 2015-11-21 14:02:37 -05:00
Unknwon
987dcc5372 fix #1383 2015-11-20 02:38:41 -05:00
Unknwon
c3ba5590c9 Reopen PR need retest patch 2015-10-25 03:10:22 -04:00
Unknwon
0fbb8c8826 New push to head repo of head branch: regenerate patch and retest apply 2015-10-24 03:36:47 -04:00
Unknwon
e0aab4a7f6 #1830 new comment with status change overwrites issue content 2015-10-23 12:54:19 -04:00
Unknwon
fc7959d3bc New/reopen PR checks if there is any unmerged and open PR 2015-10-18 19:30:39 -04:00
Unknwon
4dc6285715 add new status: checking 2015-10-18 17:18:54 -04:00
Unknwon
215920772a save PR info as patch and minor fix on PR 2015-10-04 20:54:06 -04:00
Unknwon
e303d74ab6 #1643 fix delete milestone 2015-09-15 10:03:50 -04:00
Unknwon
52ec80fa18 finish all new user settings UI 2015-09-10 11:40:34 -04:00
Unknwon
c8d92fad30 #1595 pushing new branch will rereference issues in previous branch 2015-09-10 07:53:40 -04:00
Unknwon
49e120a67c #1602 change status after comment issue 2015-09-08 06:34:02 -04:00
Unknwon
b6131793da #1545 prevent duplicated refs of issues in single commit 2015-09-03 04:34:08 -04:00
Unknwon
83dc2468f5 finish initial version of pull request 2015-09-02 16:18:09 -04:00
Unknwon
842770d7fb add merger info and news feed 2015-09-02 11:24:55 -04:00
Unknwon
5da306c0e5 tmp: fix issue open count 2015-09-02 11:13:37 -04:00
Unknwon
953bb06857 basic PR feature 2015-09-02 09:26:56 -04:00
Unknwon
1abfe4e05f PR: nothing to commit and has pull request check 2015-09-02 05:09:12 -04:00
Unknwon
37e0cee877 finish PR UI 2015-09-02 04:08:05 -04:00
Unknwon
ebf1bd4f51 add view pull desc 2015-09-01 19:26:39 -04:00
Unknwon
8c046073a8 work on PR conversation 2015-09-01 19:07:02 -04:00
Unknwon
17c2d1fc7c fix dashboard 500 when no issues at all
- update locales
- update README
2015-09-01 06:31:47 -04:00
Unknwon
8d73832bdf fix sql 2015-08-29 23:49:17 +08:00
Unknwon
a329bbc215 new org dashboard issues 2015-08-25 23:22:05 +08:00
Unknwon
f808df5a7b new user dahsboard issues 2015-08-25 22:58:34 +08:00
Unknwon
371572cf5f allow edit issue and comment 2015-08-20 04:31:28 +08:00
Unknwon
f114f78743 fix timezone! 2015-08-20 00:56:12 +08:00
Unknwon
6c2536b89c fix timezone 2015-08-20 00:32:18 +08:00
Unknwon
a5b09b30d0 print time to debug 2015-08-20 00:25:32 +08:00