Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 8b63e6e

Browse files
authored
actions: make input/output descriptions optional (#34)
1 parent bf0ed37 commit 8b63e6e

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

src/action.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ pub struct Action {
3636
#[derive(Deserialize)]
3737
#[serde(rename_all = "kebab-case")]
3838
pub struct Input {
39-
pub description: String,
39+
// NOTE: documented as required, but experimentally it is not.
40+
pub description: Option<String>,
4041
pub required: Option<bool>,
4142
pub default: Option<String>,
4243
}
@@ -45,7 +46,8 @@ pub struct Input {
4546
#[derive(Deserialize)]
4647
#[serde(rename_all = "kebab-case")]
4748
pub struct Output {
48-
pub description: String,
49+
// NOTE: documented as required, but experimentally it is not.
50+
pub description: Option<String>,
4951
// NOTE: not optional for composite actions, but this is not worth modeling.
5052
pub value: Option<String>,
5153
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ensures that we parse actions without input/output descriptions correctly
2+
# see: https://github.com/woodruffw/zizmor/issues/501
3+
4+
inputs:
5+
foo:
6+
default: "lol"
7+
outputs:
8+
bar:
9+
value: "hmm"
10+
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: say hello
15+
run: echo hello
16+
shell: bash

0 commit comments

Comments
 (0)