1
0
mirror of synced 2025-12-23 03:44:00 -05:00

update GraphQL workflow post-translations removal (#33875)

This commit is contained in:
Rachael Sewell
2023-01-10 14:57:36 -08:00
committed by GitHub
parent c41ab3e8ca
commit b0cee6663f

View File

@@ -10,7 +10,6 @@ import processPreviews from './utils/process-previews.js'
import processUpcomingChanges from './utils/process-upcoming-changes.js'
import processSchemas from './utils/process-schemas.js'
import { prependDatedEntry, createChangelogEntry } from './build-changelog.js'
import loadData from '../../lib/site-data.js'
const graphqlDataDir = path.join(process.cwd(), 'data/graphql')
const graphqlStaticDir = path.join(process.cwd(), 'lib/graphql/static')
@@ -25,22 +24,12 @@ if (!process.env.GITHUB_TOKEN) {
const versionsToBuild = Object.keys(allVersions)
const currentLanguage = 'en'
main()
async function main() {
const previewsJson = {}
const upcomingChangesJson = {}
const siteData = loadData()
// create a bare minimum context for rendering the graphql-object.html layout
const context = {
currentLanguage,
site: siteData[currentLanguage].site,
}
for (const version of versionsToBuild) {
// Get the relevant GraphQL name for the current version
// For example, free-pro-team@latest corresponds to dotcom,
@@ -73,10 +62,6 @@ async function main() {
path.join(graphqlStaticDir, `schema-${graphqlVersion}.json`)
)
// Add some version specific data to the context
context.graphql = { schemaForCurrentVersion: schemaJsonPerVersion }
context.currentVersion = version
// 4. UPDATE CHANGELOG
if (allVersions[version].nonEnterpriseDefault) {
// The Changelog is only build for free-pro-team@latest