Add first-class Actions management (#63)
This commit is contained in:
@@ -23,6 +23,10 @@ pub enum EditorAction {
|
||||
Settings,
|
||||
IssueFilter,
|
||||
PullFilter,
|
||||
ActionDispatch {
|
||||
repository: RepositoryId,
|
||||
workflow: String,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
@@ -187,6 +191,20 @@ impl Editor {
|
||||
)
|
||||
}
|
||||
|
||||
pub fn action_dispatch(repository: RepositoryId, workflow: String, reference: String) -> Self {
|
||||
Self::new(
|
||||
"Dispatch workflow",
|
||||
EditorAction::ActionDispatch {
|
||||
repository,
|
||||
workflow,
|
||||
},
|
||||
vec![
|
||||
Field::new("Git reference", reference),
|
||||
Field::new("Inputs (one KEY=VALUE per line)", "").multiline(),
|
||||
],
|
||||
)
|
||||
}
|
||||
|
||||
fn new(title: &str, action: EditorAction, fields: Vec<Field>) -> Self {
|
||||
let cursor = fields
|
||||
.first()
|
||||
|
||||
Reference in New Issue
Block a user