(id, graphqlVersion)
| 106 | |
| 107 | // find the relevant filepath in src/graphql/scripts/util/data-filenames.json |
| 108 | function 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 | |
| 121 | async function setBranchAsRef(options, graphqlVersion, branch = false) { |
| 122 | const versionType = getVersionType(graphqlVersion) |
no test coverage detected