gitea/services
Brecht Van Lommel a46b16f10f
Edit file workflow for creating a fork and proposing changes (#34240)
When viewing a file that the user can't edit because they can't write to
the branch, the new, upload, patch, edit and delete functionality is no
longer disabled.

If no user fork of the repository exists, there is now a page to create one.
It will automatically create a fork with a single branch matching the one
being viewed, and a unique repository name will be automatically picked.

When a fork exists, but it's archived, a mirror or the user can't write
code to it, there will instead be a message explaining the situation.

If the usable fork exists, a message will appear at the top of the edit page
explaining that the changes will be applied to a branch in the fork. The
base repository branch will be pushed to a new branch to the fork, and
then the edits will be applied on top.

The suggestion to fork happens when accessing /_edit/, so that for
example online documentation can have an "edit this page" link to
the base repository that does the right thing.

Also includes changes to properly report errors when trying to commit
to a new branch that is protected, and when trying to commit to an
existing branch when choosing the new branch option.

Resolves #9017, #20882

---------

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-22 12:43:43 +00:00
..
actions Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +08:00
agit Option to delay conflict checking of old pull requests until page view (#27779) 2025-04-24 19:26:57 +00:00
asymkey Improve instance wide ssh commit signing (#34341) 2025-06-11 10:32:55 +00:00
attachment Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
auth Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
automerge Option to delay conflict checking of old pull requests until page view (#27779) 2025-04-24 19:26:57 +00:00
context Edit file workflow for creating a fork and proposing changes (#34240) 2025-06-22 12:43:43 +00:00
contexttest Add API endpoint to request contents of multiple files simultaniously (#34139) 2025-04-22 01:20:11 +08:00
convert Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +08:00
cron Use default Git timeout when checking repo health (#33593) 2025-02-14 15:13:56 +00:00
doctor Remove unused param `doer` (#34545) 2025-06-18 03:12:16 +00:00
externalaccount Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
feed Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
forms Rework delete org and rename org UI (#34762) 2025-06-21 18:21:48 +00:00
git Fix GetUsersByEmails (#34643) 2025-06-07 18:30:36 +00:00
gitdiff Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
indexer
issue Fix doctor deleting orphaned issues attachments (#34142) 2025-05-30 05:06:03 +00:00
lfs Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
mailer Improve img lazy loading (#34804) 2025-06-21 14:53:22 +08:00
markup Refactor Git Attribute & performance optimization (#34154) 2025-04-11 21:41:29 +08:00
migrations Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
mirror Only git operations should update `last changed` of a repository (#34388) 2025-05-11 19:18:46 +00:00
notify Add workflow_run api + webhook (#33964) 2025-06-20 20:14:00 +08:00
oauth2_provider Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
org Remove unused param `doer` (#34545) 2025-06-18 03:12:16 +00:00
packages Refactor packages (#34777) 2025-06-22 19:22:51 +08:00
projects Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
pull Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
release Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
repository Refactor editor (#34780) 2025-06-21 19:20:51 +08:00
secrets Added Description Field for Secrets and Variables (#33526) 2025-03-17 19:24:54 +00:00
task Fix bug when migrating repository (#34182) 2025-04-14 04:48:03 +00:00
uinotification
user Fix last admin check when syncing users (#34649) 2025-06-09 20:57:45 +00:00
versioned_migration Add global lock for migrations to make upgrade more safe with multiple replications (#33706) 2025-03-07 21:08:53 +00:00
webhook Refactor wiki (#34805) 2025-06-22 18:53:33 +08:00
webtheme Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
wiki Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00