aboutsummaryrefslogtreecommitdiffstats
path: root/models/release.go
Commit message (Collapse)AuthorAgeFilesLines
* Add single release page and latest redirect (#11102)John Olheiser2020-04-181-0/+28
| | | | | | | | | | | | | | | * Add single release and latest release routes Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update API and move latest search to models Signed-off-by: jolheiser <john.olheiser@gmail.com> * Fix swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Move PushUpdateAddDeleteTags to repository module from models (#10106)Lunny Xiao2020-02-031-5/+11
| | | | | | * Move PushUpdateAddDeleteTags to repository module from models * Fix deadlock on sqlite
* API add/generalize pagination (#9452)SpaWn2KiLl2020-01-241-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* Move some repository methods from models to modules/repository (#9353)Lunny Xiao2019-12-141-44/+0
| | | | | | * Move some repository methods from models to modules/repository * fix test
* refactor(models/attachement): use getAttachmentsByUUIDs (#9317)Antoine GIRARD2019-12-111-10/+3
|
* Allow externalID to be UUID (#8551)Wenxuan Zhao2019-10-171-1/+1
| | | Signed-off-by: Wenxuan Zhao <viz@linux.com>
* Update migrated repositories' issues/comments/prs poster id if user has a ↵Lunny Xiao2019-10-141-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | github external user saved (#7751) * update migrated issues/comments when login as github * add get userid when migrating or login with github oauth2 * fix lint * add migrations for repository service type * fix build * remove unnecessary dependencies on migrations * add cron task to update migrations poster ids and fix posterid when migrating * fix lint * fix lint * improve code * fix lint * improve code * replace releases publish id to actual author id * fix import * fix bug * fix lint * fix rawdata definition * fix some bugs * fix error message
* Add extra user information when migrating release (#8331)Lunny Xiao2019-10-051-0/+2
| | | | | | | | * add extra user information when migrating release * add migrations * fix tests
* Extract actions on deletereleasebyid from models to release service (#8219)Lunny Xiao2019-10-011-67/+4
| | | | | | * extract actions on deletereleasebyid from models to release service * fix tests
* Delete releases attachments if release is deleted (#6068)Lanre Adelowo2019-09-221-0/+13
| | | | | | | | | | | | | | | | | | | | | | * delete attachments from the database and file system * add migration * fix import statements * fix package name * remove conditional should in case the confi has been changed and the server restarted * simplify deletion of attachments in DB * fix CI build * fix review * add copyright in the proper place * fix review
* Fix release API URL generation (#8234)Daniel Fonseca de Lira2019-09-181-1/+1
|
* Move create release from models to a standalone package (#7539)Lunny Xiao2019-09-151-113/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | * move create release from models to a standalone package * fix lint * fix comment year * fix lint * fix lint * fix package import name * fix vendor * fix go mod * some refactors * fix vendor * use go1.12 make vendor * fix vendor
* fix wrong sender when send slack webhook (#7918)Lunny Xiao2019-08-201-4/+4
|
* Display ui time with customize time location (#7792)Lunny Xiao2019-08-151-10/+10
| | | | | | | | | | | | | | | | | | * display ui time with customize time location * fix lint * rename UILocation to DefaultUILocation * move time related functions to modules/timeutil * fix tests * fix tests * fix build * fix swagger
* Move models.PushUpdate to repofiles.PushUpdate (#7485)Lunny Xiao2019-07-241-3/+3
| | | | | | * move models.PushUpdate to repofiles.PushUpdate * remove duplicated code to load repo
* Monitor all git commands; move blame to git package and replace git as a ↵Lunny Xiao2019-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variable (#6864) * monitor all git commands; move blame to git package and replace git as a variable * use git command but not other commands * fix build * move exec.Command to git.NewCommand * fix fmt * remove unrelated changes * remove unrelated changes * refactor IsEmpty and add tests * fix tests * fix tests * fix tests * fix tests * remove gitLogger * fix fmt * fix isEmpty * fix lint * fix tests
* Fix error log when loading issues caused by a xorm bug (#7271)Lunny Xiao2019-06-231-1/+1
| | | | | | | | | | | | * fix error log when loading issues caused by a xorm bug * upgrade packages * fix fmt * fix Consistency * fix tests
* Add golangci (#6418)kolaente2019-06-121-6/+8
|
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-111-1/+1
| | | | | | | | | | | | * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Better logging (#6038) (#6095)zeripath2019-04-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move code.gitea.io/git to code.gitea.io/gitea/modules/git * fix imports * fix fmt * fix misspell * remove wrong tests data * fix unit tests * fix tests * fix tests * fix tests * fix tests * fix tests * enable Debug to trace the failure tests * fix tests * fix tests * fix tests * fix tests * fix tests * comment commit count tests since git clone depth is 50 * fix tests * update from code.gitea.io/git * revert change to makefile
* Added URL mapping for Release attachments like on github.com (#1707)gdeverlant2019-01-061-0/+10
|
* mirror: Delete tags in mirror which are removed for original repo. (#5609)Harshit Bansal2018-12-311-2/+2
| | | | | | This bug was being caused by an error in the logic in `release.go`. Credit to @yasuokav for tracing the root of the issue. Fixes: #5192.
* Restrict permission check on repositories and fix some problems (#5314)Lunny Xiao2018-11-281-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fix release creation via API (#5076)Lunny Xiao2018-10-151-2/+2
| | | | | | * fix release creation via API * fix release create tests
* Fix missing release title in webhook (#4783) (#4796)SagePtr2018-08-261-0/+1
|
* fix bug when deleting a release (#4207)Lunny Xiao2018-06-121-0/+5
|
* Fix some webhooks bugs (#3981)Lunny Xiao2018-05-211-1/+32
| | | | | | | | | | | | | | | | | | | | | | * 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
* Add more webhooks support and refactor webhook templates directory (#3929)Lunny Xiao2018-05-161-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | * add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * add more webhook support * move hooks templates to standalone dir and add more webhooks ui * fix tests * update vendor checksum * update vendor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * load attributes when created release * update comparsion doc
* Add Attachment API (#3478)Jonas Franz2018-03-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Attachment API * repos/:owner/:repo/releases (add attachments) * repos/:owner/:repo/releases/:id (add attachments) * repos/:owner/:repo/releases/:id/attachments * repos/:owner/:repo/releases/:id/attachments/:attachment_id Signed-off-by: Jonas Franz <info@jonasfranz.de> * Add unit tests for new attachment functions Fix comments Signed-off-by: Jonas Franz <info@jonasfranz.software> * fix lint * Update vendor.json Signed-off-by: Jonas Franz <info@jonasfranz.software> * remove version of sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix unit tests Add missing license header Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add CreateReleaseAttachment Add EditReleaseAttachment Add DeleteReleaseAttachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add filename query parameter for choosing another name for an attachment Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix order of imports Signed-off-by: Jonas Franz <info@jonasfranz.software> * Restricting updatable attachment columns Signed-off-by: Jonas Franz <info@jonasfranz.software> * gofmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update go-sdk Replace Attachments with Assets Signed-off-by: Jonas Franz <info@jonasfranz.de> * Update go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.de> * Updating go-sdk and regenerating swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing file of go-sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Change origin of code.gitea.io/sdk to code.gitea.io/sdk Update code.gitea.io/sdk Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update swagger Signed-off-by: Jonas Franz <info@jonasfranz.software> * Update updateAttachment
* Bug fix for repo releases sorted (#3522)Wendell Sun2018-02-211-1/+3
| | | | | Signed-off-by: Wendell Sun <iwendellsun@gmail.com> Use TimeStampNow function
* Refactor struct's time to remove unnecessary memory usage (#3142)Lunny Xiao2017-12-111-27/+12
| | | | | | | | | | | | | | * 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
* Replace deprecated Id method with ID (#2655)Ethan Koenig2017-10-051-5/+5
|
* Use AfterLoad instead of AfterSet on Structs (#2628)Lunny Xiao2017-10-011-7/+3
| | | | | | | | * use AfterLoad instead of AfterSet on Structs * fix the comments on AfterLoad * fix the comments on action AfterLoad
* Sync releases table with tags on push and for mirrors (#2459)Lauris BH2017-09-201-14/+75
| | | | | | | | | | | | | | | * 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
* Fix release display and correct paging (#2080)Lauris BH2017-06-291-22/+26
|
* Pagination on releases page (#2035)iszla2017-06-281-0/+14
| | | | | | | | | | | | | | | | | | | | | | * Added count to GetReleasesByRepoID so pagination will work * Separated it out to a new function, can then also leave the API part unaffected * Remove extra whitespace added in untouched function * Added comment and corrected name in error handler * Account for if the user is owner or not in the count * Also check if repo is draft * revert back to the correct count in the ReleasesToDisplay loop * Fixed lint error regarding else with return statement * Use Cond struct instead of string, corrected name in error handler * Removed unused return variable names
* Fix typos in models/ and modules/ (#1248)Ethan Koenig2017-03-151-1/+1
|
* Refactor and fix incorrect comment (#1247)Ethan Koenig2017-03-151-1/+1
|
* fix some typos (#1082)Lunny Xiao2017-02-281-1/+1
|
* Refactor process package and introduce ProcessManager{} with tests (#75)Matthias Loibl2017-01-171-11/+9
| | | | | | | | | | * Add a process.Manager singleton with process.GetManager() * Use process.GetManager everywhere * Fix godoc comments for process module * Increment process counter id after locking the mutex
* Attach to release (#673)Philip Couling2017-01-151-2/+100
| | | | | | | | | | | | | | * 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
* Create missing database indexes (#596)Andrey Nering2017-01-061-5/+5
|
* Make releases faster than before and resolved #490 (#588)Lunny Xiao2017-01-061-4/+13
| | | | | | * make releases faster than before and resolved #490 * fix comment
* change the default action when deleting a release to not delete tagLunny Xiao2017-01-031-6/+8
|
* Release API endpointsEthan Koenig2017-01-021-0/+60
|
* fixed vulnerabilities on deleting release (#399)Lunny Xiao2016-12-161-1/+8
|
* Lint/issue &mail (#243)Bwko2016-11-251-5/+7
| | | | | | * Lint models/release.go * Lint models/ issue_label, issue_mail & mail.go
* Merge remote-tracking branch 'upstream/master' into feature/rewrite-xorm-queriesThibault Meyer2016-11-101-2/+2
|\ | | | | | | | | | | | | | | | | # Conflicts: # models/git_diff.go # models/issue.go # models/org.go # models/pull.go # models/repo.go
| * Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-2/+2
| | | | | | | | | | | | | | - 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