File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ pub enum Kind {
36
36
#[ serde( untagged) ]
37
37
enum KindCompat {
38
38
String ( String ) ,
39
- KindObj {
39
+ KindRenameBranchObj {
40
+ #[ serde( rename = "type" ) ]
41
+ kind_type : String ,
42
+ subject : RenameBranchOutcome ,
43
+ } ,
44
+ KindRewordObj {
40
45
#[ serde( rename = "type" ) ]
41
46
kind_type : String ,
42
47
#[ serde( default ) ]
@@ -51,11 +56,17 @@ impl<'de> Deserialize<'de> for Kind {
51
56
{
52
57
match KindCompat :: deserialize ( deserializer) ? {
53
58
KindCompat :: String ( s) if s == "Reword" => Ok ( Kind :: Reword ( None ) ) ,
54
- KindCompat :: KindObj { kind_type, subject }
59
+ KindCompat :: KindRewordObj { kind_type, subject }
55
60
if kind_type == "reword" || kind_type == "Reword" =>
56
61
{
57
62
Ok ( Kind :: Reword ( subject) )
58
63
}
64
+ KindCompat :: KindRenameBranchObj { kind_type, subject }
65
+ if kind_type == "renameBranch" || kind_type == "RenameBranch" =>
66
+ {
67
+ Ok ( Kind :: RenameBranch ( subject) )
68
+ }
69
+
59
70
_ => Err ( serde:: de:: Error :: custom ( "Unknown Kind variant" ) ) ,
60
71
}
61
72
}
You can’t perform that action at this time.
0 commit comments