Skip to content

Commit

Permalink
fix types of some github context properties
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Dec 17, 2024
1 parent d615f81 commit 2601556
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ test.yaml:7:24: undefined variable "unknown_context". available variables are "e
|
7 | - run: echo '${{ unknown_context }}'
| ^~~~~~~~~~~~~~~
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]
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]
|
9 | - run: echo '${{ github.events }}'
| ^~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions expr_sema.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ var BuiltinGlobalVariableTypes = map[string]ExprType{
"actor": StringType{},
"actor_id": StringType{},
"api_url": StringType{},
"artifact_cache_size_limit": StringType{}, // Note: Undocumented
"artifact_cache_size_limit": NumberType{}, // Note: Undocumented
"base_ref": StringType{},
"env": StringType{},
"event": NewEmptyObjectType(), // Note: Stricter type check for this payload would be possible
Expand All @@ -224,7 +224,7 @@ var BuiltinGlobalVariableTypes = map[string]ExprType{
"path": StringType{},
"ref": StringType{},
"ref_name": StringType{},
"ref_protected": StringType{},
"ref_protected": BoolType{},
"ref_type": StringType{},
"repository": StringType{},
"repository_id": StringType{},
Expand Down

0 comments on commit 2601556

Please sign in to comment.