MCPcopy Index your code
hub / github.com/github/docs / getDataFilepath

Function getDataFilepath

src/graphql/scripts/update-files.js:108–119  ·  view source on GitHub ↗
(id, graphqlVersion)

Source from the content-addressed store, hash-verified

106
107// find the relevant filepath in src/graphql/scripts/util/data-filenames.json
108function getDataFilepath(id, graphqlVersion) {
109 const versionType = getVersionType(graphqlVersion)
110
111 // for example, dataFilenames['schema']['ghes'] = schema.docs-enterprise.graphql
112 const filename = dataFilenames[id][versionType]
113
114 // dotcom files live at the root of data/graphql
115 // non-dotcom files live in data/graphql/<version_subdir>
116 const dataSubdir = graphqlVersion === 'dotcom' ? '' : graphqlVersion
117
118 return path.join(graphqlDataDir, dataSubdir, filename)
119}
120
121async function setBranchAsRef(options, graphqlVersion, branch = false) {
122 const versionType = getVersionType(graphqlVersion)

Callers 1

mainFunction · 0.85

Calls 1

getVersionTypeFunction · 0.85

Tested by

no test coverage detected