Skip to content

Commit

Permalink
fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Dec 16, 2024
1 parent c391460 commit 553a92b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 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; base_ref: string; env: string; event: object; event_name: string; event_path: string; graphql_url: string; head_ref: string; job: string; job_workflow_sha: 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; repositoryurl: string; retention_days: number; run_attempt: string; run_id: string; run_number: string; secret_source: string; server_url: string; sha: 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; base_ref: string; env: string; event: object; event_name: string; event_path: string; graphql_url: string; head_ref: string; job: string; job_workflow_sha: 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; token: string; triggering_actor: string; workflow: string; workflow_ref: string; workflow_sha: string; workspace: string} [expression]
|
9 | - run: echo '${{ github.events }}'
| ^~~~~~~~~~~~~
Expand Down
82 changes: 41 additions & 41 deletions expr_sema.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,47 +203,47 @@ var BuiltinFuncSignatures = map[string][]*FuncSignature{
var BuiltinGlobalVariableTypes = map[string]ExprType{
// https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
"github": NewStrictObjectType(map[string]ExprType{
"action": StringType{},
"action_path": StringType{},
"action_ref": StringType{},
"action_repository": StringType{},
"action_status": StringType{},
"actor": StringType{},
"actor_id": StringType{},
"api_url": StringType{},
"base_ref": StringType{},
"env": StringType{},
"event": NewEmptyObjectType(), // Note: Stricter type check for this payload would be possible
"event_name": StringType{},
"event_path": StringType{},
"graphql_url": StringType{},
"head_ref": StringType{},
"job": StringType{},
"job_workflow_sha": StringType{},
"ref": StringType{},
"ref_name": StringType{},
"ref_protected": StringType{},
"ref_type": StringType{},
"path": StringType{},
"repository": StringType{},
"repository_id": StringType{},
"repository_owner": StringType{},
"repository_owner_id": StringType{},
"repositoryurl": StringType{}, // repositoryUrl
"repository_visibility": StringType{},
"retention_days": NumberType{},
"run_id": StringType{},
"run_number": StringType{},
"run_attempt": StringType{},
"secret_source": StringType{},
"server_url": StringType{},
"sha": StringType{},
"token": StringType{},
"triggering_actor": StringType{},
"workflow": StringType{},
"workflow_ref": StringType{},
"workflow_sha": StringType{},
"workspace": StringType{},
"action": StringType{},
"action_path": StringType{},
"action_ref": StringType{},
"action_repository": StringType{},
"action_status": StringType{},
"actor": StringType{},
"actor_id": StringType{},
"api_url": StringType{},
"base_ref": StringType{},
"env": StringType{},
"event": NewEmptyObjectType(), // Note: Stricter type check for this payload would be possible
"event_name": StringType{},
"event_path": StringType{},
"graphql_url": StringType{},
"head_ref": StringType{},
"job": StringType{},
"job_workflow_sha": StringType{},
"ref": StringType{},
"ref_name": StringType{},
"ref_protected": StringType{},
"ref_type": StringType{},
"path": StringType{},
"repository": StringType{},
"repository_id": StringType{},
"repository_owner": StringType{},
"repository_owner_id": StringType{},
"repositoryurl": StringType{}, // repositoryUrl
"repository_visibility": StringType{}, // Note: Undocumented
"retention_days": NumberType{},
"run_id": StringType{},
"run_number": StringType{},
"run_attempt": StringType{},
"secret_source": StringType{},
"server_url": StringType{},
"sha": StringType{},
"token": StringType{},
"triggering_actor": StringType{},
"workflow": StringType{},
"workflow_ref": StringType{},
"workflow_sha": StringType{},
"workspace": StringType{},
}),
// https://docs.github.com/en/actions/learn-github-actions/contexts#env-context
"env": NewMapObjectType(StringType{}), // env.<env_name>
Expand Down

0 comments on commit 553a92b

Please sign in to comment.