You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -94,7 +105,6 @@ You can get a list of all the users with a permission:
94
105
cargo run dump-permission perf
95
106
```
96
107
97
-
98
108
You can generate [www.rust-lang.org](https://github.com/rust-lang/www.rust-lang.org)'s locales/en-US/tools.ftl file by running
99
109
100
110
```
@@ -113,7 +123,6 @@ cargo run dump-individual-access --group-mode repo
113
123
cargo run dump-individual-access --group-mode person
114
124
```
115
125
116
-
117
126
### Building the static API
118
127
119
128
You can build locally the content of `https://team-api.infra.rust-lang.org/v1/`
@@ -125,6 +134,40 @@ cargo run static-api output-dir/
125
134
126
135
The content will be placed in `output-dir/`.
127
136
137
+
### Syncing the state
138
+
139
+
You can use the tool to synchronize state to the live services. By default, the tool will run in *dry mode* on all the services we synchronize, meaning that the changes will be previewed on the console output but no actual change will be applied:
140
+
141
+
```
142
+
cargo run sync
143
+
```
144
+
145
+
Once you're satisfied with the changes you can run the full synchronization by
146
+
passing the `apply` subcommand:
147
+
148
+
```
149
+
cargo run sync apply
150
+
```
151
+
152
+
You can also limit the services to synchronize on by passing a list of all the
153
+
service names you want to sync. For example, to synchronize only GitHub and
154
+
Mailgun you can run:
155
+
156
+
```
157
+
cargo run sync -- --services github,mailgun
158
+
cargo run sync -- --services github,mailgun apply
159
+
```
160
+
161
+
By default, the synchronization will be based on data from the live `team` endpoint.
162
+
When making changes to the tool it might be useful to test
163
+
with dummy data though. You can do that by passing the `--team-repo` flag to the CLI:
164
+
165
+
```
166
+
cargo run sync -- --team-json <directory>
167
+
```
168
+
169
+
The `<directory>` with JSON data can be generated using `cargo run static-api`.
170
+
128
171
### Encrypting email addresses
129
172
130
173
If an email address in a list needs to be confidential it's possible to encrypt
0 commit comments