MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / getArgValue

Function getArgValue

utils/scripts/generate-release-notes.js:28–33  ·  view source on GitHub ↗
(flag)

Source from the content-addressed store, hash-verified

26const args = process.argv.slice(2);
27
28function getArgValue(flag) {
29 const idx = args.indexOf(flag);
30 return idx !== -1 && args[idx + 1] && !args[idx + 1].startsWith("-")
31 ? args[idx + 1]
32 : null;
33}
34if (args.includes("--help") || args.length < 3) {
35 console.log(`
36Usage: GITHUB_TOKEN=<token> node generate-release-notes.js <owner> <repo> <tag> [options]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected