Commit f834dca
committed
Edit file workflow for creating a fork and proposing changes
When viewing a file that the user can't edit because they can't write to
the branch, the edit button is no longer disabled.
If no user fork of the repository exists, there is now a page 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.
If the fork exists, an message will explain 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.
This all 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.1 parent 2683adf commit f834dca
File tree
12 files changed
+337
-66
lines changed- options/locale
- routers/web
- repo
- services/forms
- templates/repo/editor
12 files changed
+337
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1334 | 1334 | | |
1335 | 1335 | | |
1336 | 1336 | | |
1337 | | - | |
1338 | 1337 | | |
1339 | 1338 | | |
1340 | 1339 | | |
| |||
1394 | 1393 | | |
1395 | 1394 | | |
1396 | 1395 | | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
1397 | 1406 | | |
1398 | 1407 | | |
1399 | 1408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
0 commit comments