GH-200 · Question #18
As a developer, how can you identify a JavaScript action on GitHub?
The correct answer is D. The action.yml metadata file references a package.json file. A JavaScript action's repository will contain a package.json file, which is the standard Node.js project manifest. The action.yml metadata file for a JavaScript action references a JavaScript entry point (e.g., main: 'index.js'), and the project will have a package.json for…
Question
As a developer, how can you identify a JavaScript action on GitHub?
Options
- AThe action's repository includes a js.yml file in the .github/workflows directory.
- BThe action's repository name includes the keyword "JavaScript."
- CThe action.yml metadata file has the runs.using value set to node16.
- DThe action.yml metadata file references a package.json file.
How the community answered
(39 responses)- A3% (1)
- B8% (3)
- C3% (1)
- D87% (34)
Explanation
A JavaScript action's repository will contain a package.json file, which is the standard Node.js project manifest. The action.yml metadata file for a JavaScript action references a JavaScript entry point (e.g., main: 'index.js'), and the project will have a package.json for dependency management. Option C is a plausible distractor - while runs.using is set to a Node version (node16 or node20), option C specifically says 'node16', which would miss node20 actions. Option D more broadly identifies any JavaScript action by the presence of a package.json reference. Options A and B describe non-existent conventions.
Topics
Community Discussion
No community discussion yet for this question.