blob: fd093744b9fdbb331dfa059bf29fdaff3c5b7860 [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.
Dmitri Shuralyov8d756552019-02-21 00:25:01 -0500214. Modify 1 x/website command:
22 - In `cmd/golangorg`, add the new repo to `xMap` map.
23 - See [an example CL](https://golang.org/cl/160137).
Dmitri Shuralyovadc49e02019-01-04 12:18:10 -0500245. Redeploy all affected commands in the following order:
25 1. `cmd/gitmirror` first
26 2. `maintner/maintnerd` second
27 - 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)).
28 3. `cmd/gerritbot` third
Dmitri Shuralyov8d756552019-02-21 00:25:01 -050029 4. `cmd/golangorg` fourth