Skip to content

Commit 2601556

Browse files
committed
fix types of some github context properties
1 parent d615f81 commit 2601556

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/checks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ test.yaml:7:24: undefined variable "unknown_context". available variables are "e
404404
|
405405
7 | - run: echo '${{ unknown_context }}'
406406
| ^~~~~~~~~~~~~~~
407-
test.yaml:9:24: property "events" is not defined in object type {action: string; action_path: string; action_ref: string; action_repository: string; action_status: string; actor: string; actor_id: string; api_url: string; artifact_cache_size_limit: string; base_ref: string; env: string; event: object; event_name: string; event_path: string; graphql_url: string; head_ref: string; job: string; output: string; path: string; ref: string; ref_name: string; ref_protected: string; ref_type: string; repository: string; repository_id: string; repository_owner: string; repository_owner_id: string; repository_visibility: string; repositoryurl: string; retention_days: number; run_attempt: string; run_id: string; run_number: string; secret_source: string; server_url: string; sha: string; state: string; step_summary: string; token: string; triggering_actor: string; workflow: string; workflow_ref: string; workflow_sha: string; workspace: string} [expression]
407+
test.yaml:9:24: property "events" is not defined in object type {action: string; action_path: string; action_ref: string; action_repository: string; action_status: string; actor: string; actor_id: string; api_url: string; artifact_cache_size_limit: number; base_ref: string; env: string; event: object; event_name: string; event_path: string; graphql_url: string; head_ref: string; job: string; output: string; path: string; ref: string; ref_name: string; ref_protected: bool; ref_type: string; repository: string; repository_id: string; repository_owner: string; repository_owner_id: string; repository_visibility: string; repositoryurl: string; retention_days: number; run_attempt: string; run_id: string; run_number: string; secret_source: string; server_url: string; sha: string; state: string; step_summary: string; token: string; triggering_actor: string; workflow: string; workflow_ref: string; workflow_sha: string; workspace: string} [expression]
408408
|
409409
9 | - run: echo '${{ github.events }}'
410410
| ^~~~~~~~~~~~~

expr_sema.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ var BuiltinGlobalVariableTypes = map[string]ExprType{
211211
"actor": StringType{},
212212
"actor_id": StringType{},
213213
"api_url": StringType{},
214-
"artifact_cache_size_limit": StringType{}, // Note: Undocumented
214+
"artifact_cache_size_limit": NumberType{}, // Note: Undocumented
215215
"base_ref": StringType{},
216216
"env": StringType{},
217217
"event": NewEmptyObjectType(), // Note: Stricter type check for this payload would be possible
@@ -224,7 +224,7 @@ var BuiltinGlobalVariableTypes = map[string]ExprType{
224224
"path": StringType{},
225225
"ref": StringType{},
226226
"ref_name": StringType{},
227-
"ref_protected": StringType{},
227+
"ref_protected": BoolType{},
228228
"ref_type": StringType{},
229229
"repository": StringType{},
230230
"repository_id": StringType{},

0 commit comments

Comments
 (0)