Commit graph

408 commits

Author SHA1 Message Date
Ethan Koenig d22a8dc022 Page parameter for repo search API (#2915) 2017-11-15 16:10:26 +08:00
Ethan Koenig f26f4a7e01 Update swagger documentation (#2899)
* Update swagger documentation

Add docs for missing endpoints
Add documentation for request parameters
Make parameter naming consistent
Fix response documentation

* Restore delete comments
2017-11-13 09:02:25 +02:00
Ethan Koenig d91fe5254d Fix ignored errors in API route (#2850)
* Fix ignored errors in API route
2017-11-04 19:10:01 +01:00
Lauris BH 08b124dd47
Fix API raw requests for commits and tags (#2841) 2017-11-04 01:23:59 +02:00
Ethan Koenig e6a97b6675 Use api.TrackedTime in API (#2807)
* Use api.TrackedTime in API

* APIFormat() method

* Rename function
2017-11-01 10:25:14 +08:00
Ethan Koenig 513375c429 Make URL scheme unambiguous (#2408)
* Make URL scheme unambiguous

Redirect old routes to new routes

* Fix redirects to new URL scheme, and update template

* Fix branches/_new endpoints, and update integration test
2017-10-30 10:04:25 +08:00
Morlinest ddb7f59ef4 Add search mode option to /api/repo/search (#2756)
* Add repo type option to /api/repo/search

* Add tests and fix result of collaborative filter in specific condition

* Fix/optimize search & tests

* Improve integration tests

* Fix lint errors

* Fix unit tests

* Change and improve internal implementation of repo search

* Use NonexistentID

* Make search api more general

* Change mirror and fork search behaviour

* Fix tests & typo in comment
2017-10-27 00:16:13 +03:00
Lunny Xiao 178bd498b9
fix imports 2017-10-25 13:30:29 +08:00
Lunny Xiao 219ca5cadb
some fixes 2017-10-25 13:26:14 +08:00
Lunny Xiao 6eeadb2082 Hide unactive on explore users and some refactors (#2741)
* hide unactive on explore users and some refactors

* fix test for removed Organizations

* fix test for removed Organizations

* fix imports

* fix logic bug

* refactor the toConds

* Rename TestOrganizations to TestSearchUsers and add tests for users

* fix other tests

* fix other tests

* fix watchers tests

* fix comments and remove unused code
2017-10-24 20:36:19 +03:00
Antoine GIRARD 619b9b5547 Move swagger-ui under /api/v1 (#2746)
* Move swagger interface under /api/v1

* Update swagger-ui

* Add /api/swagger and prepare for multiple api version

* Update test links

* Fix footer link
2017-10-21 22:05:50 +08:00
Morlinest ccd3577970 Fix repository search function (#2689)
* Fix and remove FIXME

* Respect membership visibility

* Fix/rewrite searchRepositoryByName function

* Add unit tests

* Add integration tests

* Remove Searcher completely

* Remove trailing space
2017-10-17 23:20:22 +08:00
Morlinest cc84ca40d7 Remove redudant issue LoadAttributes() calls (#2614) 2017-09-27 09:41:52 -03:00
Lunny Xiao 0d80af649a Add init support of orgmode document type on file view and readme (#2525)
* add init support of orgmode document type on file view and readme

* fix imports

* fix imports and readmeExist

* fix imports order

* fix format

* remove unnecessary convert
2017-09-21 13:20:14 +08:00
Lauris BH 7a0297819d Sync releases table with tags on push and for mirrors (#2459)
* Sync releases table with tags on push and for mirrors

* Code style fixes

* Fix api to return only releases

* Optimize release creation and update
Minimize posibility of race conditions

* Fix release lower tag name updating

* handle tag reference update by addionally comparing commit id
2017-09-20 13:26:49 +08:00
Lunny Xiao 52e11b24bf Restructure markup & markdown to prepare for multiple markup language… (#2411)
* restructure markup & markdown to prepare for multiple markup languages support

* adjust some functions between markdown and markup

* fix tests

* improve the comments
2017-09-16 20:17:57 +03:00
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>
2017-09-12 09:48:13 +03:00
Ethan Koenig b689bb6180 Webhooks for repo creation/deletion (#1663)
* Webhooks for repo creation/deletion

* add createHookTask

* Add handles for GetSlackPayload and GetDiscordPayload
2017-09-03 11:20:24 +03:00
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
2017-08-23 09:30:54 +08:00
Antoine GIRARD fd8e8a421a Improve swagger doc (#2274)
* Add swagger comment for adminCreateOrg

* Add swagger comment for admin route

* add hook swagger doc

* Add tags

* Add auth

* Fix name of responses

* Edit name method

* Update vendor

* make generate-swagger
2017-08-21 14:13:47 +03:00
Morlinest 951fb572a7 Fix and improve dashboard repo UI (#2285)
* Fix and improve dashboard repo UI

* Change order of scripts loading

* Remove "mirror" tab

* Remove single tab panel for "org user"

* Add localization strings

* Create vue component and change event for search

* Add "mirrors" filter
2017-08-17 09:31:34 +08:00
Ethan Koenig 29f3a6e492 Fix rendering of external links (#2292) 2017-08-13 19:30:27 -03:00
Lunny Xiao f960e19c59 Only update needed columns when update user (#2296)
* only update needed columns when update user

* fix missing update_unix column
2017-08-12 22:18:44 +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 f29458bd3a EnableUnit() -> UnitEnabled() (#2242) 2017-08-02 11:46:54 +03:00
Ethan Koenig 49df677c47 Check for access in /repositories/:id (#2227)
* Check for access in /repositories/:id

* Integration test
2017-07-30 09:13:33 +08:00
Lunny Xiao 04c4028aea
fix some bug 2017-07-28 13:49:36 +08:00
Aaron Walker 6a3c03762a API: support '/orgs/:org/repos' (#2047)
* API: support '/orgs/:org/repos'
2017-07-13 13:14:15 +02:00
Ethan Koenig 93a1de4842 Fix repo API bug (#2133)
Don't require token when not necessary
2017-07-12 03:23:41 +02:00
Ethan Koenig 8f1d62ad3b Fix GET /users/:username/repos endpoint (#2125) 2017-07-10 14:07:39 +03:00
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
2017-07-06 21:30:19 +08:00
Ethan Koenig f99489d5c5 Fix API for branches with slashes (#2096) 2017-07-02 10:03:57 +08:00
Lauris BH 783b1967e2 Fix release display and correct paging (#2080) 2017-06-29 23:11:38 +08:00
Ethan Koenig 735676267e Integration tests for issues API (#2059) 2017-06-25 22:51:07 +08:00
Ethan Koenig 2559a34b97 Load label ID in NewLabels (#2045) 2017-06-25 14:15:09 +08:00
Ethan Koenig 3ffedeab03 Fix bug in issue labels API (#2048) 2017-06-25 07:52:51 +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
Antoine GIRARD 2bcd9471c9 Separate generate swagger + fix sed os specific (#1791)
* Separate generate-swagger

* Remove go generate rules

* Add missing definition replacement + remove use of -i sed flag

for compatibility with mac os default sed version.
This is a little hacky a better solution could be use.

* Use custom SED_INPLACE

depending of platform detection

* Use SED_INPLACE for swagger-ui also
2017-06-15 08:51:23 -05:00
Jonas Östanbäck ad70af1248 Add repo fork swagger (#1941) 2017-06-12 08:59:51 +08:00
Dennis Keitzel 96b4780727 Gracefully handle bare repositories on API operations. (#1932)
Signed-off-by: Dennis Keitzel <github@pinshot.net>
2017-06-10 21:57:28 -05:00
Andrey Nering 65cf6cc848 Merge pull request #1905 from ethantkoenig/fix/org_api_auth
Require token before checking membership/ownership
2017-06-07 16:49:52 -03:00
Andrey Nering a70073e768 Merge pull request #1904 from ethantkoenig/fix/org_api
Bug fixes for org member API
2017-06-07 16:49:33 -03:00
Ethan Koenig 971e3a35c1 Require token before checking membership/ownership 2017-06-07 12:20:32 -04:00
Ethan Koenig f38842320e Bug fixes for org member API 2017-06-07 12:10:35 -04:00
camlafit 952cb8046f A missing / to provide a correct endpoint
solve #1899
2017-06-07 17:57:28 +02:00
Bo-Yi Wu 703d18e50d feat: add check misspelling (#1877) 2017-06-05 02:49:46 -05:00
Antoine GIRARD 976c2a05fa Fix change introduce by update of go-swagger. (#1727) 2017-06-01 23:35:31 -05:00
Andrey Nering e67ece26f0 Merge pull request #1750 from andreynering/dashboard-search-org-repos
More fixes for dashboard search
2017-05-27 17:40:09 -03:00
Ethan Koenig 7e6ff69c00 Fix 500 for GET /teams/:id endpoints (#1811)
* Fix 500 for GET /teams/:id endpoints

* Integration test for GET /team/:id

* Clean up integration test
2017-05-26 08:15:45 -05:00
Jonas Östanbäck 0161e46b5a Add swagger comment for MirrorSync (#1747)
* Add swagger comment for MirrorSync

* Generate swagger.v1.json
2017-05-19 08:20:06 +08:00
Andrey Nering 8906b2891b Fix test
There was a panic when there's no logged in user
2017-05-18 14:35:06 -03:00
Andrey Nering dc2b28ed76 Show repos acording to user/organization 2017-05-18 11:28:29 -03:00
Andrey Nering 8917f47347 Fix org repos not showing on dashboard search 2017-05-18 11:15:32 -03:00
Ethan Koenig a5f28a4544 gofmt (#1662) 2017-05-04 13:54:56 +08:00
Antoine GIRARD 3edb0c5894 Generate swagger json (#1402)
- Generate swagger.json into public/
- Add swagger-ui auto-installation
- Add footer link to local swagger-ui
- Add /swagger url for using app url.
- Fix Swagger-UI version via git tag
2017-05-02 15:35:59 +02:00
Lunny Xiao 0308d44a16 fix #1643 and improve integration test (#1645) 2017-04-30 13:08:09 +08:00
Lunny Xiao 61b08b5c01 bug fixed for API to get user's repos (#1622)
* bug fixed for API to get user's repos

* add tests and fix another place

* test user2 since user1 has no repos
2017-04-29 12:33:25 +08:00
Kim "BKC" Carlbäcker 4bea219128 Status-API (#1332) 2017-04-21 19:32:31 +08:00
Jonas f995bcc87a Add repo mirror sync API endpoint (#1508)
* API: Add repo mirror sync

* Correct error message

* Change http status to 200
2017-04-19 19:09:49 +08:00
Antoine GIRARD cf91cfb993 Migrate WatchInfo struct to api (#1492)
* Remove WatchInfo and link to api struct

* Add vendor temporary update

* Return to gitea vendor source
2017-04-16 20:51:04 +08:00
Lunny Xiao cf6699fb4f fix gpg API panic when no verification (#1451)
* fix gpg API panic when no verification

* fix if condition
2017-04-06 18:40:05 -07:00
Antoine GIRARD 14fe9010ae GPG commit validation (#1150)
* GPG commit validation

* Add translation

+ some little fix

* Move hash calc after retrieving of potential key + missing translation

* Add some little test
2017-03-22 18:43:54 +08:00
Antoine GIRARD ca1c3f1926 Implement GPG api (#710)
* Implement GPG API

* Better handle error

* Apply review recommendation + simplify database operations

* Remove useless comments
2017-03-16 09:27:35 +08:00
Ethan Koenig ec0ae5d50c Refactor and fix incorrect comment (#1247) 2017-03-15 08:51:46 +08:00
Mura Li 848293671b Add basic integration test infrastructure (and new endpoint /api/v1/version for testing it) (#741)
* Implement '/api/v1/version'

* Cleanup and various fixes

* Enhance run.sh

* Add install_test.go

* Add parameter utils.Config for testing handlers

* Re-organize TestVersion.go

* Rename functions

* handling process cleanup properly

* Fix missing function renaming

* Cleanup the 'retry' logic

* Cleanup

* Remove unneeded logging code

* Logging messages tweaking

* Logging message tweaking

* Fix logging messages

* Use 'const' instead of hardwired numbers

* We don't really need retries anymore

* Move constant ServerHttpPort to install_test.go

* Restore mistakenly removed constant

* Add required comments to make the linter happy.

* Fix comments and naming to address linter's complaints

* Detect Gitea executale version automatically

* Remove tests/run.sh, `go test` suffices.

* Make `make build` a prerequisite of `make test`

* Do not sleep before trying

* Speedup the server pinging loop

* Use defined const instead of hardwired numbers

* Remove redundant error handling

* Use a dedicated target for running code.gitea.io/tests

* Do not make 'test' depend on 'build' target

* Rectify the excluded package list

* Remove redundant 'exit 1'

* Change the API to allow passing test.T to test handlers

* Make testing.T an embedded field

* Use assert.Equal to comparing results

* Add copyright info

* Parametrized logging output

* Use tmpdir instead

* Eliminate redundant casting

* Remove unneeded variable

* Fix last commit

* Add missing copyright info

* Replace fmt.Fprintf with fmt.Fprint

* rename the xtest to integration-test

* Use Symlink instead of hard-link for cross-device linking

* Turn debugging logs on

* Follow the existing framework for APIs

* Output logs only if test.v is true

* Re-order import statements

* Enhance the error message

* Fix comment which breaks the linter's rule

* Rename 'integration-test' to 'e2e-test' for saving keystrokes

* Add comment to avoid possible confusion

* Rename tests -> integration-tests

Also change back the Makefile to use `make integration-test`.

* Use tests/integration for now

* tests/integration -> integrations

Slightly flattened directory hierarchy is better.

* Update Makefile accordingly

* Fix a missing change in Makefile

* govendor update code.gitea.io/sdk/gitea

* Fix comment of struct fields

* Fix conditional nonsense

* Fix missing updates regarding version string changes

* Make variable naming more consistent

* Check http status code

* Rectify error messages
2017-03-06 22:13:17 +08:00
Lunny Xiao c1d5983d3e fix panic when get user repos from api (#1110) 2017-03-03 19:10:46 +08:00
awwalker c0f99e8229 API: support /users/:username/repos
clean up

fix arguments

remove repeated token

give admins listing rights
2017-02-27 07:46:01 +01:00
Lunny Xiao a5ac4c64fc refactor api issues load attributes for better performance (#1066) 2017-02-27 08:36:42 +08:00
Ethan Koenig 831ff41754 Fix go vet faults (#1060) 2017-02-26 13:25:35 +08:00
Andrew Boyarshin 0602a44b27 Fix URL handling in the whole markdown module, improve test coverage (#1027)
Amended with string to bool change in API SDK.

Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
2017-02-24 22:59:56 +08:00
Andrew Boyarshin dc8248f8a4 Markdown rendering overhaul (#186)
* Markdown rendering overhaul

Cleaned up and squashed commits into single one.

Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>

* Fix markdown API, add markdown module and API tests, improve code coverage

Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>
2017-02-14 09:13:59 +08:00
Bo-Yi Wu 3576e1ee73 fix: trim the whitespaces for the search keyword (#893) 2017-02-11 12:00:01 +08:00
Ethan Koenig 2f13d31ff0 Fix bug in repos search (#884) 2017-02-10 09:30:26 +08:00
Ethan Koenig 027591a3a5 Redirects for renamed repos (#807)
* Redirects for renamed repos

* Remove unused phrase from locales
2017-02-05 22:35:03 +08:00
Lunny Xiao 8a421b1fd7 Add units concept for modulable functions of a repository (#742)
* Add units concept for modulable functions of a repository

* remove unused comment codes & fix lints and tests

* remove unused comment codes

* use struct config instead of map

* fix lint

* rm wrong files

* fix tests
2017-02-04 23:53:46 +08:00
Bo-Yi Wu a90a215662 feat: Add search bar on user profile page. (#787) 2017-02-04 20:20:20 +08:00
Ethan Koenig 73d05a51e3 Remove unneeded database loads (#814)
Remove unnecessary calls to repo.GetOwner() in context handlers
2017-02-02 20:33:56 +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
Ethan Koenig d1b5498cc0 Use handlers for API authorization (#723) 2017-01-26 19:54:04 +08:00
Ethan Koenig 833f8b94c2 Search bar for issues/pulls (#530) 2017-01-25 10:43:02 +08:00
Bwko 7e401b9e39 Fix crash caused by #647 (#708) 2017-01-20 21:47:09 +08:00
Ethan Koenig 74bbec3bf9 Fix permission bugs in team API (#647) 2017-01-20 13:16:10 +08:00
Ethan Koenig fcf02e4961 API Endpoints for organization members (#645) 2017-01-20 10:31:46 +08:00
Philip Couling 64375d875b Attach to release (#673)
* Moved attachaments POST url from /issues/attachments to /attachments

* Implemented attachment upload on release page

* Implemented downloading attachments on the release page

* Added zip and gzip files to default allowed attachments

* Implemented uploading attachments on edit release

* Renamed UploadIssueAttachment to UploadAttachment
2017-01-15 22:57:00 +08:00
Ethan Koenig 27fcf8d30a Bug fixes for webhook API (#650) 2017-01-14 10:14:48 +08:00
Ethan Koenig 8422ab542c API endpoint for subscribers (#598) 2017-01-07 11:13:02 +08:00
Ethan Koenig 1a7fc53c98 API endpoint for stargazers (#597) 2017-01-06 15:05:09 +08:00
Lunny Xiao 51021585a7 build failed by deleting release by API (#562) 2017-01-03 11:45:56 +08:00
Ethan Koenig 0c301f7b5c Release API endpoints 2017-01-02 00:10:52 +01:00
Ethan Koenig b75450ad36 API endpoints for forks (#509) 2016-12-31 09:15:45 +08:00
Ethan Koenig 6f4ba6884c Repo permission bug fixes (#513) 2016-12-29 21:17:32 +08:00
Ethan Koenig 35d9378e4e Permissions bug fix for webhooks 2016-12-28 20:12:23 +01:00
Ethan Koenig f686a32eac API endpoints for organization teams (#370) 2016-12-28 09:36:04 +08:00
Ethan Koenig 9fae9f0dc2 Remove redundant query in collaborator API (#516) 2016-12-28 09:09:54 +08:00
Ethan Koenig 2342df183b API Endpoints for collaborators (#375) 2016-12-26 15:37:01 +08:00
Ethan Koenig 9847b38518 Organization webhook API endpoints 2016-12-25 14:51:57 +01:00
Bwko a345a03d99 Added sorting to the labels & milestones page (#199) 2016-12-24 22:41:09 +08:00
Ethan Koenig 8a4161c723 API Endpoint for watching (#191) 2016-12-24 09:53:11 +08:00
Kim "BKC" Carlbäcker df7fa4e995 issue comment api fix (#449)
* ListAllInRepo & Delete Issue-Comments

* Moar data in issue-comments
2016-12-22 16:29:26 +08:00
Denis Denisov 380e32e129 Fix random string generator (#384)
* Remove unused custom-alphabet feature of random string generator

Fix random string generator

Random string generator should return error if it fails to read random data via crypto/rand

* Fixes variable (un)initialization mixed assign
Update test GetRandomString
2016-12-20 13:32:02 +01:00
Lunny Xiao b4c794058a fixed vulnerabilities (#392) 2016-12-15 16:49:06 +08:00
Ethan Koenig 7b5b5178e1 Bug fix for edit-hook API endpoint 2016-12-09 20:11:56 +01: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 e8e0539b45 Linting 2016-12-02 09:31:44 +01:00
Kim "BKC" Carlbäcker e6cfccdd40 GitHub API Compliance (& linting) 2016-12-02 09:18:15 +01:00
Kim "BKC" Carlbäcker 71bb6df75a Add undocumented endpoint for /repositories/:id 2016-12-02 09:18:15 +01:00
Kim "BKC" Carlbäcker 42ec5ce740 Fix breakage from vendor-update 2016-11-29 11:50:22 +01:00
Lunny Xiao ec87a75c00 golint fixed for modules/auth 2016-11-27 21:39:06 +08:00
Lunny Xiao 94da472717 Golint fixed for modules/setting (#262)
* golint fixed for modules/setting

* typo fixed and renamed UNIXSOCKET to UnixSocket
2016-11-27 18:14:25 +08:00
Lunny Xiao faabc76fd6 Golint fixed for modules/context 2016-11-25 14:53:59 +08:00
Lunny Xiao 3917ed45de golint fixed for routers (#208) 2016-11-24 15:04:31 +08:00
Ethan Koenig 0834e492c0 API endpoints for stars 2016-11-16 22:51:54 -05: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
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
Sandro Santilli aadd7dcdc3 And others 2016-11-07 17:53:22 +01:00
Sandro Santilli 60c82a8780 More... 2016-11-07 17:30:04 +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
Sandro Santilli 6e4252dad4 Replace gogits/git-module dependency with go-gitea/git (#94)
* Replace gogits/git-module dependency with go-gitea/git

Fixes #92

* Remove git alias for git module import (not needed)
2016-11-06 11:18:34 -02:00
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs (#37) 2016-11-03 10:29:56 -02:00
Unknwon 99c2ae7b35 #3515 use alert instead 500 for duplicated login source name 2016-08-31 00:56:10 -07:00
Andrey Nering 9ac46fb983 Support Editorconfig on web editor 2016-08-30 20:30:47 -03:00
Unknwon 28cf0e6aaa #3459 code quality improvement 2016-08-29 20:00:06 -07:00
Unknwon 6b98d58906 #2966 code cleanup 2016-08-26 13:40:53 -07:00
Iwan Budi Kusnanto 8dca9f95fa issues comment API : list, create, edit (#2966)
add `since` query string support to list issue comment
2016-08-26 11:23:21 -07:00
Unknwon f8a48ffaad Web editor: improve code quality 2016-08-24 21:35:03 -07:00
Kurt Madel 67fb0fe6a5 added support to set pull_request event from api (#3513) 2016-08-24 20:44:58 -07:00
Unknwon 0b273ac4d5 #3383 code cleanup 2016-08-24 16:05:56 -07:00
lstahlman 84b56c3c53 Additional API support for milestones (#3383) 2016-08-24 15:18:56 -07:00
Kim Carlbäcker 7c5710d31f Issues can be closed via API (#3170) (#3479)
* Issues can be closed via API

* Error-checking is nice xD

* EditIssueOption.Status => State

* Use const instead of string-literal
2016-08-23 09:09:32 -07:00
Unknwon 4042d1f0c3 models/issue: improve quality and performance of NewIssue function 2016-08-15 18:40:32 -07:00
Unknwon dccb0c15b9 Replace convert.To with APIFormat calls 2016-08-14 04:17:26 -07:00
Unknwon 3f7f4852ef #2246 fully support of webhooks for pull request 2016-08-14 03:32:24 -07:00
Unknwon 2cb04db526 Fix #3391 2016-08-11 15:29:39 -07:00
Robin Lambertz 5a9709fa9d Add MaxRepoCreation to EditUser API (#2781) 2016-08-11 11:49:31 -07:00
Unknwon 7e9b42c87d #2780 code clean up 2016-08-11 11:35:46 -07:00
Robin Lambertz b6c14f8b21 Add AddCollaborator API Endpoint (#2780)
* Add AddCollaborator API Endpoint

* Add optional Permission to AddCollaborator endpoint

* Use APIContext
2016-08-11 11:23:25 -07:00
lstahlman 89f71b44f7 Add committer information to API and Webhooks. Also fixes #3271 (#3414) 2016-08-09 22:01:57 -07:00
Unknwon db3d393576 routers/api: rename handlers to be unexported 2016-08-04 17:08:01 -07:00
Unknwon 2f105f3979 #2162 completely disable builtin issue tracker when enable external tracker 2016-08-04 16:32:02 -07:00
Unknwon e7fd65f0cf #3290 better code structure and batch minor improvements 2016-08-03 11:51:22 -07:00
lstahlman 2eeb0ec9b0 Additional API support for labels (#3290)
* Add API support for labels.

* Error handling for adding/replacing multiple issue labels

* Revisions to function names and error handling. Use issue.ClearLabels in replace/clear functions

* Additional code cleanup
2016-08-03 09:24:16 -07:00
Richard Mahn 0402c803c6 Added Full Name to CreateUser api call (#3333) 2016-07-27 02:43:06 +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 e63b2881b1 api: fix panic if anonymous user request admin API
Add sign in check before check user account level
2016-07-23 17:56:37 +08:00
Unknwon 5aa2bf86f4 Update locales and .gopmfile 2016-07-17 09:25:30 +08:00
Unknwon 60110adc06 models/webhook: restrict deletion to be explicitly with repo and org ID 2016-07-17 08:33:59 +08:00
Dennis Chen 5ff2dfb23e api: delete repository webhooks (#3275)
Allows the deletion of a webhook from a repository at the
/:user/:repo/hooks/:id endpoint.

Solves drone/drone issue #1603.

Signed-off-by: Dennis Chen <barracks510@gmail.com>
2016-07-17 08:08:38 +08:00
Unknwon 3d93532c87 #3274 fix can't get webhook detail of organization 2016-07-16 01:02:55 +08:00
Unknwon f1b8d52eb3 #2854 fix no mail notification when issue is closed/reopened 2016-07-16 00:36:39 +08:00
lstahlman 846bf2ca9f Add timestamps to repository api response (#3255)
Additional properties: created_at, updated_at
2016-07-12 06:28:51 +08:00
lstahlman 12cb84b97f Extend the API to include more repository properties (#3249)
Adds description, stars_count, forks_count, watchers_count and
open_issues_count.
2016-07-11 07:56:15 +08:00
Unknwon d62ab49978 #3057 retrieve webhook with repo_id
This prevents user retrieve arbitrary webhook by changing URL to
access webhook from other unauthorized repositories.
2016-07-08 13:57:09 +08:00
Unknwon 4b25bdfbc4 #3058 #3059 support correct page size and link header 2016-07-04 17:27:06 +08:00
Unknwon e9ae926e04 #809 fix wrong closed issue count when create closed issue via API
Add start count corrector for Repository.NumClosedIssues
2016-05-27 18:23:39 -07:00
Unknwon bf5faf76eb #809 able to set issue state to closed when create 2016-05-11 12:19:26 -04:00
Unknwon d27ca649c7 api/admin: add/remove organization team repository 2016-04-04 19:41:34 -04:00
Unknwon b1d41cfa60 #1692 add admin APIs to add/remove a user from teams 2016-03-25 18:04:02 -04:00
Unknwon 5e11341232 Fix status code 2016-03-21 12:57:04 -04:00
Unknwon 90e93b1f3a Change list teams API to non-admin specific 2016-03-21 12:53:04 -04:00
Unknwon e6f927f61a #1692 api: admin list and create team under organization 2016-03-21 12:47:54 -04:00
Unknwon 9bd9ad4205 #1692 add CRUD issue APIs
- Fix go-gogs-client#10
- Related to #809
2016-03-13 23:20:22 -04:00
Unknwon dd6faf7f9b Convert all API handers to use *context.APIContext 2016-03-13 18:49:16 -04:00
Unknwon 2bf8494332 #13 finish user and repository search
Both are possible on explore and admin panel
2016-03-11 15:33:12 -05:00
Unknwon 514382e2eb Rename module: middleware -> context 2016-03-11 11:56:52 -05:00
Unknwon d5a3021a7d Make markdown as an independent module 2016-02-20 17:10:05 -05:00
Unknwon 995487e822 Minor fix for #2506 2016-02-02 17:07:40 -05:00
Antoine GIRARD b7b30cd85e Corrections following recommendations 2016-01-28 20:51:19 +01:00
Antoine GIRARD 81e5722bcc Handling error for the API request and add commments
[ci skip]
2016-01-28 20:51:19 +01:00
Antoine GIRARD 303d091ea9 Update link for documentation (Temporary https://gist.github.com/sapk/df64347ff218baf4a277)
[ci skip]
2016-01-28 20:51:19 +01:00
Antoine GIRARD c11c3b6c11 Near ready 2016-01-28 20:51:19 +01:00
Unknwon 4331d1d2a0 require token for list my orgs 2016-01-09 13:32:19 +08:00
Unknwon 03427fb005 fix #2360 2016-01-08 08:49:03 +08:00
Unknwon a49af93faf #1692 APIs: Users Followers
- User profile un/follow
- List user's followers/following
2015-12-21 04:24:11 -08:00
Unknwon 1c9dd11ba7 #1692 API: admin create repo 2015-12-17 22:57:41 -05:00
Unknwon 9cd16c5b12 #1692 add organization APIs 2015-12-17 02:28:47 -05:00
Unknwon b117befc2b #1692 add user email APIs 2015-12-15 22:57:18 -05:00
Unknwon 19423957b1 rename import path 2015-12-15 17:25:45 -05:00
Unknwon 3d5d61778a #1938 #1374 disable password change for non-local users 2015-12-10 19:02:57 -05:00
Unknwon 9a2e43bff2 move out git module and #1573 send push hook 2015-12-09 20:46:05 -05:00
Unknwon 120cd4e471 #1984 Better mirror repo management 2015-12-08 20:06:12 -05:00
Unknwon ca8ce793d1 #2063 Ability to delete repo from admin panel 2015-12-05 17:39:29 -05:00
Unknwon 978dc00305 APIs: admin users 2015-12-05 17:13:13 -05:00
Unknwon e538ff2770 fix #1829 and fix #890 2015-12-04 21:30:33 -05:00
Unknwon 942fd6be53 fix panic for #2045 2015-12-04 17:20:23 -05:00
Unknwon 56dd430a10 refactor API routes and some work for #976 2015-12-04 17:16:42 -05:00
Unknwon cc8f5add6e fix #976 2015-12-03 00:24:37 -05:00
Unknwon 830d000667 finish wiki 2015-11-30 20:45:55 -05:00
Unknwon 2b10fdc4dc Wiki: UI for page new 2015-11-25 20:10:25 -05:00
Unknwon 144663a3cf allow admin to migrate for any user/org 2015-11-25 00:55:37 -05:00
Unknwon f455125d4d fix #878 2015-11-18 21:21:47 -05:00
Unknwon ff5f14431e fix #1448 2015-11-17 02:18:05 -05:00
Unknwon f8ae161c74 fix #1302 2015-11-13 17:37:02 -05:00
Unknwon 6f0a41b8b2 #1511 Allow local import only for admin users 2015-11-03 18:40:52 -05:00