File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -915,7 +915,25 @@ pub struct WorkflowDispatchInput {
915915 pub input_type : String ,
916916 /// Default value for the input
917917 #[ serde( skip_serializing_if = "Option::is_none" ) ]
918+ #[ setters( skip) ]
918919 pub default : Option < String > ,
920+ /// The options of the dropdown list, if the type is a choice
921+ #[ serde( skip_serializing_if = "Vec::is_empty" ) ]
922+ #[ setters( skip) ]
923+ pub options : Vec < String > ,
924+ }
925+
926+ impl WorkflowDispatchInput {
927+ pub fn set_default ( self , value : impl Into < String > ) -> Self {
928+ Self { default : Some ( value. into ( ) ) , ..self }
929+ }
930+
931+ pub fn options < T : ToString , I : IntoIterator < Item = T > > ( self , iter : I ) -> Self {
932+ Self {
933+ options : iter. into_iter ( ) . map ( |v| v. to_string ( ) ) . collect ( ) ,
934+ ..self
935+ }
936+ }
919937}
920938
921939/// Types of workflow run events
You can’t perform that action at this time.
0 commit comments