File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ fn handle_expiring_token(
82
82
debug ! ( "Sending expiry notification to {}…" , recipient) ;
83
83
let email = ExpiryNotificationEmail {
84
84
name : & user. gh_login ,
85
+ token_id : token. id ,
85
86
token_name : & token. name ,
86
87
expiry_date : token. expired_at . unwrap ( ) . and_utc ( ) ,
87
88
} ;
@@ -131,6 +132,7 @@ pub fn find_expiring_tokens(
131
132
#[ derive( Debug , Clone ) ]
132
133
struct ExpiryNotificationEmail < ' a > {
133
134
name : & ' a str ,
135
+ token_id : i32 ,
134
136
token_name : & ' a str ,
135
137
expiry_date : chrono:: DateTime < chrono:: Utc > ,
136
138
}
@@ -144,13 +146,14 @@ impl<'a> Email for ExpiryNotificationEmail<'a> {
144
146
145
147
We noticed your token "{}" will expire on {}.
146
148
147
- If this token is still needed, visit https://crates.io/settings/tokens/new to generate a new one.
149
+ If this token is still needed, visit https://crates.io/settings/tokens/new?from={} to generate a new one.
148
150
149
151
Thanks,
150
152
The crates.io team"# ,
151
153
self . name,
152
154
self . token_name,
153
- self . expiry_date. to_rfc3339_opts( SecondsFormat :: Secs , true )
155
+ self . expiry_date. to_rfc3339_opts( SecondsFormat :: Secs , true ) ,
156
+ self . token_id
154
157
)
155
158
}
156
159
}
You can’t perform that action at this time.
0 commit comments