File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change
1
+ org = ' rust-lang'
2
+ name = ' getopts'
3
+ description = ' The getopts repo maintained by the rust-lang project'
4
+ bots = []
5
+
6
+ [access .teams ]
7
+ libs-contributors = ' maintain'
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ pub(crate) struct GitHubMember {
274
274
275
275
#[ derive( serde:: Deserialize , Debug ) ]
276
276
pub ( crate ) struct Repo {
277
- pub ( crate ) description : String ,
277
+ pub ( crate ) description : Option < String > ,
278
278
}
279
279
280
280
#[ derive( serde:: Deserialize , Debug ) ]
Original file line number Diff line number Diff line change @@ -170,7 +170,9 @@ fn run() -> Result<(), Error> {
170
170
#[ derive( serde:: Serialize , Debug ) ]
171
171
#[ serde( rename_all = "kebab-case" ) ]
172
172
struct AccessToAdd {
173
+ #[ serde( skip_serializing_if = "std::collections::HashMap::is_empty" ) ]
173
174
teams : HashMap < String , String > ,
175
+ #[ serde( skip_serializing_if = "std::collections::HashMap::is_empty" ) ]
174
176
individuals : HashMap < String , String > ,
175
177
}
176
178
#[ derive( serde:: Serialize , Debug ) ]
@@ -241,7 +243,9 @@ fn run() -> Result<(), Error> {
241
243
let repo = RepoToAdd {
242
244
org : & org,
243
245
name : & name,
244
- description : & repo. description ,
246
+ description : & repo. description . unwrap_or_else ( || {
247
+ format ! ( "The {name} repo maintained by the rust-lang project" )
248
+ } ) ,
245
249
bots,
246
250
access : AccessToAdd { teams, individuals } ,
247
251
branch : branches,
You can’t perform that action at this time.
0 commit comments