1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Remove \#!/usr/bin/env node from scripts (#55304)

This commit is contained in:
Kevin Heis
2025-04-16 09:00:16 -07:00
committed by GitHub
parent 9418dca5a1
commit e9689301a8
75 changed files with 4 additions and 129 deletions

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// This calls a function directly that is used by our archived enterprise

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
/**
* This script gathers all English pages, computes each page's
* 'title', 'intro' and 'product' properties. These things are then stored

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// For testing the GitHub Action that executes

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import * as github from '@actions/github'
import core from '@actions/core'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Print a list of all the asset files that can't be found mentioned

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// This script lists all local image files, sorted by their dimensions.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Makes sure that all the image assets in `assets/` are safe.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
/**
* Required env variables:
*

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
/**
* This script generates a block of Markdown that can be saved as a reusable.
* The reusable lists all the queries for one programming language, with CWEs, as a Markdown table.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import { readFile, writeFile, copyFile } from 'fs/promises'
import { existsSync } from 'fs'
import walk from 'walk-sync'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import yaml from 'js-yaml'
import fs from 'fs/promises'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
// Disables markdownlint rules in markdown files with same-line comments. This is
// useful when introducing a new rule that causes many failures. The comments
// can be fixed and removed at while updating the file later.

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { writeFileSync } from 'fs'
import type { Rule, Config } from '../types.ts'
import { allRules, allConfig } from '../lib/helpers/get-rules.js'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import fs from 'fs'
import path from 'path'
import { execSync } from 'child_process'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import { program } from 'commander'
import fs from 'fs'
import coreLib from '@actions/core'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Use this script to help you move or rename a single file or a folder. The script will move or rename the file or folder for you, update relevant `children` in the index.md file(s), and add a `redirect_from` to frontmatter in the renamed file(s). Note: You will still need to manually update the `title` if necessary.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// This script will say which category pages needs to be renamed

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// An automated test checks for discrepancies between filenames and [autogenerated heading IDs](https://www.npmjs.com/package/remark-autolink-headings).

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import fs from 'fs'
import path from 'path'
import { execSync } from 'child_process'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import fs from 'fs'
import path from 'path'
import { execSync } from 'child_process'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Move the files from an early-access product level docs set into an existing product.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// This script is run on a writer's machine while developing Early Access content locally.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// This script is run on a writer's machine while developing Early Access content locally. It

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import { getOctokit } from '@actions/github'
import { setOutput } from '@actions/core'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import { readFileSync } from 'fs'
import { basename } from 'path'
import { Liquid } from 'liquidjs'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Run this script during the Enterprise deprecation process to download

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// See https://github.com/harttle/liquidjs/discussions/294#discussioncomment-305068
import { Tokenizer } from 'liquidjs'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// This script creates or removes a release candidate banner for a specified version.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// This script removes the static GraphQL, REST, and webhook files for any

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Run this script after an Enterprise deprecation to remove Liquid statements and frontmatter that

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// This script fetches data from https://github.com/github/enterprise-releases/blob/master/releases.json

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
// This schema is used to validate
// src/github-apps/data/server-to-server-rest.json
// src/github-apps/data/user-to-server-rest.json

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
// This schema is used to validate
// src/github-apps/data/fine-grained-pat-permissions.json
// and src/github-apps/data/server-to-server-permissions.json

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import { existsSync } from 'fs'
import { mkdirp } from 'mkdirp'
import { readFile, writeFile } from 'fs/promises'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { diff, ChangeType } from '@graphql-inspector/core'
import { loadSchema } from '@graphql-tools/load'
import fs from 'fs'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import fs from 'fs/promises'
import path from 'path'
import { mkdirp } from 'mkdirp'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { sentenceCase } from 'change-case'
import GithubSlugger from 'github-slugger'
const slugger = new GithubSlugger()

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { sortBy } from 'lodash-es'
import { parse, buildASTSchema } from 'graphql'
import helpers from './schema-helpers.js'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import yaml from 'js-yaml'
import { groupBy } from 'lodash-es'
import { renderContent } from '#src/content-render/index.js'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { renderContent } from '#src/content-render/index.js'
import fs from 'fs/promises'
import {

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import { languageKeys } from '#src/languages/lib/languages.js'
import { makeLanguageSurrogateKey } from '#src/frame/middleware/set-fastly-surrogate-key.js'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Run this script to get all broken docs.github.com links in github/github

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// This script goes through all content and renders their HTML and from there

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Run this script to update content's internal links.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Pass this script any old dotcom path (e.g., `articles/foo` or `foo.md`) and it

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
// add a new redirect string to redirect_from frontmatter
export default function addRedirectToFrontmatter(redirectFromData, newRedirectString) {

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import chalk from 'chalk'
import { readFile } from 'fs/promises'
import { allVersions } from '#src/versions/lib/all-versions.js'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Run this script to check if OpenAPI files can be decorated successfully.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Run this script to check if OpenAPI operations match versions in content/rest operations

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Run this script to generate the updated data files for the rest,

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// In the case that there are more than one example requests, and
// no content responses, a request with an example key that matches the
// status code of a response will be matched.
@@ -111,9 +109,9 @@ export function mergeExamples(requestExamples, responseExamples) {
/*
Create an example object for each example in the requestBody property
of the schema. Each requestBody can have more than one content type.
of the schema. Each requestBody can have more than one content type.
Each content type can have more than one example. We create an object
for each permutation of content type and example.
for each permutation of content type and example.
Returns an array of objects in the format:
{
key,
@@ -220,9 +218,9 @@ export function getRequestExamples(operation) {
/*
Create an example object for each example in the response property
of the schema. Each response can have more than one status code,
each with more than one content type. And each content type can
each with more than one content type. And each content type can
have more than one example. We create an object
for each permutation of status, content type, and example.
for each permutation of status, content type, and example.
Returns an array of objects in the format:
{
key,

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { renderContent } from '@/content-render/index'
interface Schema {

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { readFile, writeFile } from 'fs/promises'
const STATIC_REDIRECTS = 'src/rest/data/client-side-rest-api-redirects.json'
const REST_API_OVERRIDES = 'src/rest/lib/rest-api-overrides.json'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
// This schema is used to validate each generated operation object at build time
export default {

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import httpStatusCodes from 'http-status-code'
import { get, isPlainObject } from 'lodash-es'
import { parseTemplate } from 'url-template'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
/**
* Required env variables:
*

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// There are certain files that have to be manually copied from the

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import fs from 'fs'
import path from 'path'
import walk from 'walk-sync'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import fs from 'fs'
import walk from 'walk-sync'
import path from 'path'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
// This schema is used to validate each generated webhook object at build time
export default {

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { get, isPlainObject } from 'lodash-es'
import { getJsonValidator } from '@/tests/lib/validate-json-schema'
import { renderContent } from '@/content-render/index'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import coreLib from '@actions/core'
import { checkContentType } from '@/workflows/fm-utils'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// Given N files. Exit 0 if they all exist and are identical in content.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// For testing the GitHub Action that executes

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
/**
* This script will delete files from a translation repo of files that
* only exist there and not "here". Here being the docs repo.

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import got from 'got'
import { setOutput } from '@actions/core'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import crypto from 'crypto'
import fs from 'fs/promises'

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import dotenv from 'dotenv'
import { Octokit } from '@octokit/rest'
import { retry } from '@octokit/plugin-retry'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// This script adds labels to issues or pull requests.

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
// This script is intended to be used as a git "prepush" hook.

View File

@@ -1,4 +1,3 @@
#!/usr/bin/env node
import { SURROGATE_ENUMS } from '@/frame/middleware/set-fastly-surrogate-key'
import purgeEdgeCache from './purge-edge-cache'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
/**
*
* The only mandatory environment variables for this scrips are:

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import assert from 'node:assert/strict'
import fs from 'fs'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
import coreLib from '@actions/core'
import { readFileSync } from 'fs'
import yaml from 'js-yaml'

View File

@@ -1,5 +1,3 @@
#!/usr/bin/env node
// [start-readme]
//
// A helper that returns an array of files for a given path and file extension.