gitea

Development moved to Codeberg

Commits at 74731c3a5aea71c81e4ca75bde96154f3adf3cfa

  1. 74731c3a Move some issue methods as functions (#19255) * Move some issue methods as functions * Fix bug Lunny Xiao authored at GitHub comitted at
  2. bd97736b Move project files into models/project sub package (#17704) * Move project files into models/project sub package * Fix test * Fix test * Fix test * Fix build * Fix test * Fix template bug * Fix bug * Fix lint * Fix test * Fix import * Improve codes Co-authored-by: 6543 <6543@obermui.de> Lunny Xiao authored at GitHub comitted at
  3. ea6efba9 Granular webhook events in editHook (#19251) Signed-off-by: jolheiser <john.olheiser@gmail.com> John Olheiser authored at GitHub comitted at
  4. 97625b44 Provide configuration to allow camo-media proxying (#12802) * Provide configuration to allow camo-media proxying Fix #916 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> zeripath authored at GitHub comitted at
  5. 76aa33d8 Move init repository related functions to modules (#19159) * Move init repository related functions to modules * Fix lint * Use ctx but db.DefaultContext Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Lunny Xiao authored at GitHub comitted at
  6. b06b9a05 Move organization related structs into sub package (#18518) * Move organization related structs into sub package * Fix test * Fix lint * Move more functions into sub packages * Fix bug * Fix test * Update models/organization/team_repo.go Co-authored-by: KN4CK3R <admin@oldschoolhack.me> * Apply suggestions from code review Co-authored-by: KN4CK3R <admin@oldschoolhack.me> * Fix fmt * Follow suggestion from @Gusted * Fix test * Fix test * Fix bug * Use ctx but db.DefaultContext on routers * Fix bug * Fix bug * fix bug * Update models/organization/team_user.go * Fix bug Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Lunny Xiao authored at GitHub comitted at
  7. d4c789df Refactor repo clone button and repo clone links, fix JS error on empty repo page (#19208) The last PR about clone buttons introduced an JS error when visiting an empty repo page: * https://github.com/go-gitea/gitea/pull/19028 * `Uncaught ReferenceError: isSSH is not defined`, because the variables are scoped and doesn't share between sub templates. This: 1. Simplify `templates/repo/clone_buttons.tmpl` and make code clear 2. Move most JS code into `initRepoCloneLink` 3. Remove unused `CloneLink.Git` 4. Remove `ctx.Data["DisableSSH"] / ctx.Data["ExposeAnonSSH"] / ctx.Data["DisableHTTP"]`, and only set them when is is needed (eg: deploy keys / ssh keys) 5. Introduce `Data["CloneButton*"]` to provide data for clone buttons and links 6. Introduce `Data["RepoCloneLink"]` for the repo clone link (not the wiki) 7. Remove most `ctx.Data["PageIsWiki"]` because it has been set in the `/wiki` middleware 8. Remove incorrect `quickstart` class in `migrating.tmpl` wxiaoguang authored at GitHub comitted at
  8. 90e0a402 Show last cron messages on monitor page (#19223) As discussed on #19221 we should store the results of the last task message on the crontask and show them on the monitor page. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> zeripath authored at GitHub comitted at
  9. e69b7a92 Allow API to create file on empty repo (#19224) This PR adds the necessary work to make it possible to create files on empty repos using the API. Fix #10993 Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  10. 54961f3a Use goproxy.io instead of goproxy.cn (#19242) Lunny Xiao authored at GitHub comitted at
  11. 893c8938 New cron task: delete old system notices (#19219) Add a new cron task which deletes the old system notices. Pilou authored at GitHub comitted at
  12. 6526733a Let web and API routes have different auth methods group (#19168) * remove the global methods but create dynamiclly * Fix lint * Fix windows lint * Fix windows lint * some improvements Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Lunny Xiao authored at GitHub comitted at
  13. d6fa138e Only send webhook events to active system webhooks and only deliver to active hooks (#19234) There is a bug in the system webhooks whereby the active state is not checked when webhooks are prepared and there is a bug that deactivating webhooks do not prevent queued deliveries. * Only add SystemWebhooks to the prepareWebhooks list if they are active * At the time of delivery if the underlying webhook is not active mark it as "delivered" but with a failed delivery so it does not get delivered. Fix #19220 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> zeripath authored at GitHub comitted at
  14. 04601d22 [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  15. d3dbdbe6 Prevent intermittent failures in RepoIndexerTest (2) (#19229) So whilst #19225 fixes one issue it caused another. We need to initialise the Git module first. Related #19225 Fix #19162 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> zeripath authored at GitHub comitted at
  16. 42fe0760 Fix `contrib/upgrade.sh` (#19222) * fix idempotency of script (eg when aborting the downloads) * improve readability (user facing variables first, definitions next, statements last) * improve dependency checks * fix ignored $giteaversion variable * more logging * print usage string on incorrect usage Norwin authored at GitHub comitted at
  17. d2ca021d Touch mirrors on even on fail to update (#19217) * Touch mirrors on even on fail to update If a mirror fails to be synchronised it should be pushed to the bottom of the queue of the awaiting mirrors to be synchronised. At present if there LIMIT number of broken mirrors they can effectively prevent all other mirrors from being synchronized as their last_updated time will remain earlier than other mirrors. Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  18. c29fbc6d Hide sensitive content on admin panel progress monitor (#19218) Sanitize urls within git process descriptions. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Andrew Thornton <art27@cantab.net> Lunny Xiao authored at GitHub comitted at
  19. 41b60d94 Do not include global arguments in process manager (#19226) The git command by default adds a number of global arguments. These are not helpful to be displayed in the process manager and so should be skipped for default process descriptions. Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  20. 793ce9da Prevent intermittent failures in RepoIndexerTest (#19225) The RepoIndexerTest is failing with considerable frequency due to a race inherrent in its design. This PR adjust this test to avoid the reliance on waiting for the populate repo indexer to run and forcibly adds the repo to the queue. It then flushes the queue. It may be worth separating out the tests somewhat by testing the Index function directly away from the queue however, this forceful method should solve the current problem. Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  21. f3165824 Set the default branch for repositories generated from templates (#19136) * Set the default branch for repositories generated from templates * Allows default branch to be set through the API for repos generated from templates * Update swagger API template * Only set default branch to the one from the template if not specified * Use specified default branch if it exists while generating git commits Fix #19082 Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Abheek Dhawan authored at GitHub comitted at
  22. 71a5aaef [skip ci] Updated licenses and gitignores GiteaBot authored at GiteaBot comitted at
  23. acb9fc5f Make cron task no notice on success (#19221) Change all cron tasks to make them no notice on success default. Instead if a user wants notices on success they need to add NOTICE_ON_SUCCESS=true instead. ## :warning: BREAKING :warning: This changes the cron config so that notices on success are no longer set by default and breaks NO_SUCCESS_NOTICE settings. Instead users who want notices on success must set NOTICE_ON_SUCCESS=true instead. Signed-off-by: Andrew Thornton <art27@cantab.net> * Update custom/conf/app.example.ini Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: Norwin <noerw@users.noreply.github.com> zeripath authored at GitHub comitted at
  24. 70628bd8 Add auto logging of goroutine pid label (#19212) * Add auto logging of goroutine pid label This PR uses unsafe to export the hidden runtime_getProfLabel function from the runtime package and then casts the result to a map[string]string. We can then interrogate this map to get the pid label from the goroutine allowing us to log it with any logging request. Reference #19202 Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  25. c1198284 Check go and nodejs version by go.mod and package.json (#19197) * Check go and nodejs version by go.mod and package.json * Update Go official site URL Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> gesangtome authored at GitHub comitted at
  26. 59b867dc Add `ContextUser` to http request context (#18798) This PR adds a middleware which sets a ContextUser (like GetUserByParams before) in a single place which can be used by other methods. For routes which represent a repo or org the respective middlewares set the field too. Also fix a bug in modules/context/org.go during refactoring. KN4CK3R authored at GitHub comitted at
  27. f36701c7 Set OpenGraph title to DisplayName in profile pages (#19206) Co-authored-by: Lauris BH <lauris@nix.lv> Nulo authored at GitHub comitted at
  28. 5fe764b1 Add pprof labels in processes and for lifecycles (#19202) Use pprof labelling to help identify goroutines with stacks. Signed-off-by: Andrew Thornton <art27@cantab.net> zeripath authored at GitHub comitted at
  29. e48f3b05 [skip ci] Updated translations via Crowdin GiteaBot authored at GiteaBot comitted at
  30. 909804b7 Bump goldmark to v1.4.11 (#19201) * Bump goldmark to v1.4.11 * add testcase Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net> Robert Kaussow authored at GitHub comitted at