@@ -78,6 +78,7 @@ pub struct CreateApplicationInfo {
78
78
pub struct TriggerSSAInfo {
79
79
pub amount : String ,
80
80
pub amount_type : String ,
81
+ pub early_refill_comment : Option < String > ,
81
82
}
82
83
83
84
#[ derive( Deserialize ) ]
@@ -158,6 +159,7 @@ pub struct RefillInfo {
158
159
pub amount_type : String ,
159
160
pub owner : String ,
160
161
pub repo : String ,
162
+ pub early_refill_comment : Option < String > ,
161
163
}
162
164
163
165
#[ derive( Deserialize ) ]
@@ -1900,6 +1902,7 @@ impl LDNApplication {
1900
1902
app. file . issue_number . clone ( ) ,
1901
1903
refill_info. owner . clone ( ) ,
1902
1904
refill_info. repo . clone ( ) ,
1905
+ refill_info. early_refill_comment ,
1903
1906
)
1904
1907
. await ?;
1905
1908
@@ -3631,6 +3634,7 @@ Your Datacap Allocation Request has been {} by the Notary
3631
3634
issue_number : String ,
3632
3635
owner : String ,
3633
3636
repo : String ,
3637
+ early_refill_comment : Option < String > ,
3634
3638
) -> Result < bool , LDNError > {
3635
3639
Self :: add_comment_to_issue (
3636
3640
issue_number. clone ( ) ,
@@ -3639,6 +3643,15 @@ Your Datacap Allocation Request has been {} by the Notary
3639
3643
"Application is in Refill" . to_string ( ) ,
3640
3644
)
3641
3645
. await ?;
3646
+ if let Some ( early_refill_comment) = early_refill_comment {
3647
+ Self :: add_comment_to_issue (
3648
+ issue_number. clone ( ) ,
3649
+ owner. clone ( ) ,
3650
+ repo. clone ( ) ,
3651
+ format ! ( "## Reason for triggering a new allocation despite 75% of the previous one not being utilized\n {}" , early_refill_comment) ,
3652
+ )
3653
+ . await ?;
3654
+ }
3642
3655
Self :: update_issue_labels ( issue_number, & [ "Refill" ] , owner, repo) . await ?;
3643
3656
Ok ( true )
3644
3657
}
@@ -4431,6 +4444,7 @@ _The initial issue can be edited in order to solve the request of the verifier.
4431
4444
amount_type : info. amount_type ,
4432
4445
owner : app_model. owner ,
4433
4446
repo : app_model. repo ,
4447
+ early_refill_comment : info. early_refill_comment ,
4434
4448
} ;
4435
4449
Self :: refill ( verifier, refill_info) . await ?;
4436
4450
Ok ( ( ) )
0 commit comments