Skip to content
Snippets Groups Projects
Verified Commit 28e4335f authored by anarcat's avatar anarcat
Browse files

move merge request wiki workflow to the documentation section

It's where I looked for it first, and the gitlab page is waay to
long. We keep a pointer anyways, so that people can find it in both places.
parent c27f9b47
No related branches found
No related tags found
No related merge requests found
......@@ -416,59 +416,10 @@ specifically for a user. The URLs will look something like this:
## Accepting merge requests on wikis
It's possible to work around the [limitation of Wiki permissions](https://gitlab.torproject.org/tpo/tpa/gitlab/-/issues/76)
by creating a mirror of the git wiki backing the wikis. This way
more users can suggest changes to the wiki by submitting merge
requests. It's not as easy as editing the wiki, but at least provides
a way for outside contributors to participate.
To do this, you'll need to create [project access tokens](https://gitlab.torproject.org/help/api/README.md#personalproject-access-tokens) in the
Wiki and use the [repository mirror feature](https://gitlab.torproject.org/help/user/project/repository/repository_mirroring.md) to replicate the wiki
into a separate project.
1. in the Wiki project, head for the **Settings: Access Tokens** page
and create a new token with `write_repository` access
2. optionally, create a new project for the wiki, for example called
[`wiki-replica`](https://gitlab.torproject.org/tpo/tpa/wiki-replica/). you can also use the same project as the wiki
if you do not plan to host other source code specific to that
project there. we'll call this the "wiki replica" in either case
3. in the wiki replica, head for the **Settings: Mirroring
repositories** section and fill in the details for the wiki HTTPS
clone URL:
* Git repository URL: the HTTPS URL of the Git repository (which
you can find in the **Clone repository** page on the top-right
of the wiki) **Important**: Make sure you add a *username* to
the HTTPS URL, otherwise mirroring will fail. For example, this
wiki URL:
https://gitlab.torproject.org/tpo/tpa/team.wiki.git
should actually be:
https://wiki-replica@gitlab.torproject.org/tpo/tpa/team.wiki.git
* **Mirror direction**: `push` (only "free" option, `pull` is
non-free)
* **Authentication method**: `Password` (default)
* **Password**: the **Access token** you created in the first
step
* **Keep divergent refs**: unchecked (optional, should make sure
sync works in some edge cases)
* **Mirror only protected branches**: checked (to keep merge
requests from being needlessly mirrored to the wiki)
When you click the **Mirror repository** button, a sync will be
triggered. Refresh the page to see status, you should see the **Last
successful update** column updated. When you push to the replica, the
wiki should be updated.
Naturally, because of limitations of GitLab, you cannot pull changes
from the wiki to the replica. But considering only a limited set of
users have access to the wiki in the first place, this shouldn't be a
problem as long as everyone pushes to the replica.
Wiki permissions are not great, but there's a workaround: accept merge
requests for a git replica of the wiki.
This documentation was [moved to the documentation section](service/documentation#accepting-merge-requests-on-wikis).
## Renaming a branch globally
......
......@@ -86,6 +86,62 @@ ${GIT_DIR:-.git}/../bin/mdl-wrapper $(git diff --cached --name-only HEAD)
${GIT_DIR:-.git}/../bin/mdl-wrapper $(git diff-tree --no-commit-id --name-only -r HEAD)
```
## Accepting merge requests on wikis
It's possible to work around the [limitation of Wiki permissions](https://gitlab.torproject.org/tpo/tpa/gitlab/-/issues/76)
by creating a mirror of the git wiki backing the wikis. This way
more users can suggest changes to the wiki by submitting merge
requests. It's not as easy as editing the wiki, but at least provides
a way for outside contributors to participate.
To do this, you'll need to create [project access tokens](https://gitlab.torproject.org/help/api/README.md#personalproject-access-tokens) in the
Wiki and use the [repository mirror feature](https://gitlab.torproject.org/help/user/project/repository/repository_mirroring.md) to replicate the wiki
into a separate project.
1. in the Wiki project, head for the **Settings: Access Tokens** page
and create a new token with `write_repository` access
2. optionally, create a new project for the wiki, for example called
[`wiki-replica`](https://gitlab.torproject.org/tpo/tpa/wiki-replica/). you can also use the same project as the wiki
if you do not plan to host other source code specific to that
project there. we'll call this the "wiki replica" in either case
3. in the wiki replica, head for the **Settings: Mirroring
repositories** section and fill in the details for the wiki HTTPS
clone URL:
* Git repository URL: the HTTPS URL of the Git repository (which
you can find in the **Clone repository** page on the top-right
of the wiki) **Important**: Make sure you add a *username* to
the HTTPS URL, otherwise mirroring will fail. For example, this
wiki URL:
https://gitlab.torproject.org/tpo/tpa/team.wiki.git
should actually be:
https://wiki-replica@gitlab.torproject.org/tpo/tpa/team.wiki.git
* **Mirror direction**: `push` (only "free" option, `pull` is
non-free)
* **Authentication method**: `Password` (default)
* **Password**: the **Access token** you created in the first
step
* **Keep divergent refs**: unchecked (optional, should make sure
sync works in some edge cases)
* **Mirror only protected branches**: checked (to keep merge
requests from being needlessly mirrored to the wiki)
When you click the **Mirror repository** button, a sync will be
triggered. Refresh the page to see status, you should see the **Last
successful update** column updated. When you push to the replica, the
wiki should be updated.
Naturally, because of limitations of GitLab, you cannot pull changes
from the wiki to the replica. But considering only a limited set of
users have access to the wiki in the first place, this shouldn't be a
problem as long as everyone pushes to the replica.
## Pager playbook
### Wiki unavailable
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment