githaven-fork/templates/admin
zeripath 7a7f56044a
Adopt repositories (#12920)
* Don't automatically delete repository files if they are present

Prior to this PR Gitea would delete any repository files if they are
present during creation or migration. This can in certain circumstances
lead to data-loss and is slightly unpleasant.

This PR provides a mechanism for Gitea to adopt repositories on creation
and otherwise requires an explicit flag for deletion.

PushCreate is slightly different - the create will cause adoption if
that is allowed otherwise it will delete the data if that is allowed.

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

* Update swagger

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

* Fix tests and migrate overwrite

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

* as per @lunny

Only offer to adopt or overwrite if the user can do that.

Allow the site administrator to adopt or overwrite in all
circumstances

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

* Use setting.Repository.DefaultBranch for the default branch

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

* Always set setting.Repository.DefaultBranch

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

* update swagger

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

* update templates

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

* ensure repo closed

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

* Rewrite of adoption as per @6543 and @lunny

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

* Apply suggestions from code review

* update swagger

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

* missing not

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

* add modals and flash reporting

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

* Make the unadopted page searchable

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

* Add API

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

* Fix swagger

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

* fix swagger

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

* Handle empty and non-master branched repositories

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

* placate lint

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

* remove commented out code

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

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-09-25 07:09:23 +03:00
..
auth Add check for LDAP group membership (#10869) 2020-09-10 16:30:07 +01:00
base Added repository search ordered by stars or forks. Forks column in admin repo list. (#3969) 2018-05-24 09:03:42 +08:00
emails [UI] Sortable Tables Header By Click (#7980) 2020-06-24 23:23:05 +01:00
org Make SVG size argument optional (#12814) 2020-09-11 16:19:00 -04:00
repo Adopt repositories (#12920) 2020-09-25 07:09:23 +03:00
user Show 2FA info on Admin Pannel: Users List (#12515) 2020-08-20 09:53:49 +08:00
config.tmpl Add placeholder text for send testing email button in admin/config (#12452) 2020-08-10 22:38:30 -04:00
dashboard.tmpl Make SVG size argument optional (#12814) 2020-09-11 16:19:00 -04:00
hook_new.tmpl Add missing templates (#11729) 2020-06-02 22:04:52 -04:00
hooks.tmpl Implement Default Webhooks (#4299) 2019-03-18 22:33:20 -04:00
monitor.tmpl Make SVG size argument optional (#12814) 2020-09-11 16:19:00 -04:00
navbar.tmpl System-wide webhooks (#10546) 2020-03-09 00:08:05 +02:00
notice.tmpl Properly truncate system notices (#11714) 2020-06-02 16:24:18 -04:00
queue.tmpl Queue: Make WorkerPools and Queues flushable (#10001) 2020-01-28 20:01:06 -05:00