blob: c0d62300ac321591c3c798656cdaae2674f0ba13 [file] [log] [blame] [view]
Dmitri Shuralyovadc49e02019-01-04 12:18:10 -05001This page outlines the steps that need to be done to cretate a new subrepository, in order for it to have the same properties as all existing subrepositories:
2- a golang.org/x redirect
3- automatic git mirroring from Gerrit to GitHub
4- automatic importing of GitHub PRs into Gerrit CLs
Dmitri Shuralyov0ac9a272018-10-04 16:11:58 -04005
Dmitri Shuralyovadc49e02019-01-04 12:18:10 -05006## Steps
7
81. Create a new empty Gerrit repository at https://go.googlesource.com, complete with a description.
92. Create a new empty GitHub repository at https://github.com/golang with the same name and description.
10 - Turn off Wikis, Issues, Projects in repository settings.
Dmitri Shuralyov0ac9a272018-10-04 16:11:58 -040011 - On "Collaborators & teams" tab:
12 - Add "golang org admins" team with Admin access.
13 - Add "gophers" team with Write access.
14 - Add "robots" team with Write access (can only be done by a maintainer of golang organization; ask someone else if you're not).
15 - Create "cla: yes" and "cla: no" labels, they need to exist so that [@googlebot](https://github.com/googlebot) can automatically apply them. (Without a "cla: yes" label, PRs won't be imported into Gerrit.)
Dmitri Shuralyovadc49e02019-01-04 12:18:10 -0500163. Modify 3 x/build commands:
Dmitri Shuralyov0ac9a272018-10-04 16:11:58 -040017 - In `cmd/gitmirror`, add the new repo to `shouldMirror` function.
18 - In `maintner/maintnerd`, add the new repo to `goGitHubProjects` slice.
Dmitri Shuralyovd0d39de2019-01-03 16:33:05 -050019 - In `cmd/gerritbot`, add the new repo to `gerritProjectWhitelist` map.
Dmitri Shuralyovadc49e02019-01-04 12:18:10 -050020 - See [an example CL](https://golang.org/cl/133896) for all 3 changes.
214. Modify 1 x/tools command:
22 - In `cmd/godoc`, add the new repo to `xMap` map.
23 - See [an example CL](https://golang.org/cl/156337).
24 - Also send a backport CL into the current release-branch of x/tools, since this is what will be deployed.
Dmitri Shuralyovbaec6d72019-01-04 12:42:39 -050025 - See [an example backport CL](https://golang.org/cl/156338).
Dmitri Shuralyovadc49e02019-01-04 12:18:10 -0500265. Redeploy all affected commands in the following order:
27 1. `cmd/gitmirror` first
28 2. `maintner/maintnerd` second
29 - Note that it's expected for the new repo not to appear in maintner until first issue or PR is created (see [#25744](https://golang.org/issue/25744)).
30 3. `cmd/gerritbot` third
31 4. `cmd/godoc` fourth