Skip to content

Commit 83e6bcd

Browse files
authored
Merge pull request github#23902 from github/repo-sync
repo sync
2 parents 9cb8a60 + 6ab083d commit 83e6bcd

57 files changed

Lines changed: 84 additions & 95 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions-scripts/enterprise-server-issue-templates/deprecation-issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Poke around several pages, ensure that the stylesheets are working properly, ima
121121

122122
- [ ] In your `docs-internal` checkout, create a new branch `remove-<version>-static-files` branch: `git checkout -b remove-<version>-static-files` (you can branch off of `main` or from your `deprecate-<version>` branch, up to you).
123123
- [ ] Run `script/enterprise-server-deprecations/remove-static-files.js` and commit results.
124-
- [ ] Re-generate the static files by running `script/rest/update-files.js --decorate-only`.
124+
- [ ] Re-generate the static files by running `src/rest/scripts/update-files.js --decorate-only`.
125125
- [ ] Open a new PR.
126126
- [ ] Get a review from docs-engineering and merge. This step can be merged independently from step 6. The purpose of splitting up steps 5 and 6 is to focus the review on specific files.
127127

.github/actions-scripts/enterprise-server-issue-templates/release-issue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If you aren't comfortable going through the steps alone, sync up with a docs eng
1818
```
1919
script/update-enterprise-dates.js
2020
```
21-
- [ ] Create REST files based on previous version. Copy the latest GHES version of the decorate file from `lib/rest/static/decorated` to a new file in the same directory for the new GHES release. Ex, `cp lib/rest/static/decorated/ghes-3.4.json lib/rest/static/decorated/ghes-3.5.json`.
21+
- [ ] Create REST files based on previous version. Copy the latest GHES version of the decorate file from `src/rest/data` to a new file in the same directory for the new GHES release. Ex, `cp src/rest/data/ghes-3.4.json src/rest/data/ghes-3.5.json`.
2222
2323
- [ ] Create GraphQL files based on previous version:
2424
@@ -94,7 +94,7 @@ This file should be automatically updated, but you can also run `script/update-e
9494
- [ ] [Freeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) at least 1-2 days before the release, and post an announcement in Slack so everybody knows. It's helpful to freeze the repos before doing the OpenAPI merges to avoid changes to the megabranch while preparing and deploying.
9595
- [ ] Alert the Neon Squad (formally docs-ecosystem team) 1-2 days before the release to deploy to `github/github`. A PR should already be open in `github/github`, to change the OpenAPI schema config `published` to `true` in `app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml`. They will need to:
9696
- [ ] Get the required approval from `@github/ecosystem-api-reviewers` then deploy the PR to dotcom. This process generally takes 30-90 minutes.
97-
- [ ] Once the PR merges, make sure that the auto-generated PR titled "Update OpenAPI Descriptions" in doc-internal contains the decorated JSON files for the new GHES release. If everything looks good, merge the "Update OpenAPI Description" PR into the GHES release megabranch. **Note:** Don't attempt to resolve conflicts for changes to the `lib/rest/static/decorated` files. Instead delete the existing OpenAPI files for the release version from the megabranch (that is, revert the changes to the `lib/rest/static` decorated JSON files, e.g., from the megabranch do a `git checkout origin/main lib/rest/static/*`), so there are no conflicts to resolve and to ensure that the incoming artifacts are the correct ones.
97+
- [ ] Once the PR merges, make sure that the auto-generated PR titled "Update OpenAPI Descriptions" in doc-internal contains the decorated JSON files for the new GHES release. If everything looks good, merge the "Update OpenAPI Description" PR into the GHES release megabranch. **Note:** Don't attempt to resolve conflicts for changes to the `src/rest/data` files. Instead delete the existing OpenAPI files for the release version from the megabranch (that is, revert the changes to the `src/rest/data` decorated JSON files, e.g., from the megabranch do a `git checkout origin/main src/rest/data/*`), so there are no conflicts to resolve and to ensure that the incoming artifacts are the correct ones.
9898
- [ ] Alert the Ecosystem-API team in #ecosystem-api about the pending release freeze and incoming blocking review of OpenAPI updates in the public REST API description (the `rest-api-descriptions` repo). They'll need to block any future "Update OpenAPI Descriptions" PRs in the public REST API description until after the ship.
9999
- [ ] Add a blocking review to the auto-generated "Update OpenAPI Descriptions" PR in the public REST API description. (You or they will remove this blocking review once the GHES release ships.)
100100

.github/workflows/openapi-decorate.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ jobs:
5252
- name: Copy dereferenced OpenAPI files
5353
id: rest-api-description
5454
run: |
55-
mkdir ./lib/rest/static/dereferenced
56-
find rest-api-description/descriptions-next -type f -name "*.deref.json" -exec sh -c 'cp $1 ./lib/rest/static/dereferenced' sh {} \;
55+
mkdir ./src/rest/data/dereferenced
56+
find rest-api-description/descriptions-next -type f -name "*.deref.json" -exec sh -c 'cp $1 ./src/rest/data/dereferenced' sh {} \;
5757
cd rest-api-description
5858
OPENAPI_COMMIT_SHA=$(git rev-parse HEAD)
5959
echo "OPENAPI_COMMIT_SHA=$OPENAPI_COMMIT_SHA" >> $GITHUB_OUTPUT
6060
echo "Copied files from github/rest-api-description repo. Commit SHA: $OPENAPI_COMMIT_SHA"
6161
6262
- name: Decorate the dereferenced OpenAPI schemas
6363
run: |
64-
script/rest/update-files.js --decorate-only --open-source
64+
src/rest/scripts/update-files.js --decorate-only --open-source
6565
git status
6666
echo "Deleting the cloned github/rest-api-description repo..."
6767
rm -rf rest-api-description
@@ -74,7 +74,7 @@ jobs:
7474
# If nothing to commit, exit now. It's fine. No orphans.
7575
changes=$(git diff --name-only | wc -l)
7676
if [[ $changes -eq 0 ]]; then
77-
echo "There are no changes to commit after running lib/rest/update-files.js. Exiting..."
77+
echo "There are no changes to commit after running src/rest/scripts/update-files.js. Exiting..."
7878
exit 0
7979
fi
8080

.github/workflows/triage-unallowed-contributions.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ on:
1616
- 'Dockerfile*'
1717
- 'src/**'
1818
- 'lib/redirects/**'
19-
- 'lib/rest/**'
20-
- 'lib/webhooks/**'
2119
- 'package*.json'
2220
- 'script/**'
2321
- 'content/actions/deployment/security-hardening-your-deployments/**'
@@ -49,7 +47,7 @@ jobs:
4947
# Returns list of changed files matching each filter
5048
filters: |
5149
openapi:
52-
- 'lib/rest/static/**'
50+
- 'src/rest/data/**'
5351
notAllowed:
5452
- '.devcontainer/**'
5553
- '.github/actions-scripts/**'
@@ -60,8 +58,6 @@ jobs:
6058
- 'Dockerfile*'
6159
- 'src/**'
6260
- 'lib/redirects/**'
63-
- 'lib/rest/**'
64-
- 'lib/webhooks/**'
6561
- 'package*.json'
6662
- 'scripts/**'
6763
- 'content/actions/deployment/security-hardening-your-deployments/**'
@@ -83,8 +79,6 @@ jobs:
8379
'Dockerfile*',
8480
'src/**',
8581
'lib/redirects/**',
86-
'lib/rest/**',
87-
'lib/webhooks/**',
8882
'package*.json',
8983
'scripts/**',
9084
'content/actions/deployment/security-hardening-your-deployments/**',

Dockerfile.openapi_decorator

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ USER node
1010

1111
COPY --chown=node:node package.json /openapi-check
1212
COPY --chown=node:node package-lock.json /openapi-check
13-
ADD --chown=node:node script /openapi-check/script
13+
ADD --chown=node:node src /openapi-check/src
1414
ADD --chown=node:node lib /openapi-check/lib
1515
ADD --chown=node:node content /openapi-check/content
1616
ADD --chown=node:node data /openapi-check/data
1717

1818
RUN npm ci -D
1919

20-
ENTRYPOINT ["node", "/openapi-check/script/rest/openapi-check.js"]
20+
ENTRYPOINT ["node", "/openapi-check/src/rest/scripts/openapi-check.js"]

content/rest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ The `/content/rest` directory is where the GitHub REST API docs live!
55
* The `/content/rest/guides` and `/content/rest/overview` directories contain regular articles. These are human-editable.
66
* The `/content/rest/reference` directory contains an article for each group of endpoints in the GitHub REST API. Most of the content in this directory is rendered using `include` tags.
77

8-
The content rendered by `include` tags is sourced from the `/lib/rest/static` directory, which is automatically generated from the API source code internally in GitHub, and should not be edited by a human. For more information, see the [`/lib/rest/README.md`](/lib/rest/README.md).
8+
The content rendered by `include` tags is sourced from the `/src/rest/data` directory, which is automatically generated from the API source code internally in GitHub, and should not be edited by a human. For more information, see the [`/src/rest/README.md`](/src/rest/README.md).
99

1010
**We cannot accept changes to content that is rendered by `include` tags. However, you can open an issue describing the changes you would like to see.**

lib/all-versions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ plans.forEach((planObj) => {
9494
})
9595
})
9696

97-
const apiFilesPath = path.join(process.cwd(), 'lib/rest/static/decorated')
97+
const apiFilesPath = path.join(process.cwd(), 'src/rest/data')
9898
// This is what determines which versions are calendar date versioned for the REST API docs
9999
// This is the source of truth for which versions are calendar date versioned.
100100
fs.readdirSync(apiFilesPath)

middleware/api/webhooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import express from 'express'
2-
import { getWebhook } from '../../lib/webhooks/index.js'
2+
import { getWebhook } from '../../src/webhooks/lib/index.js'
33
import { allVersions } from '../../lib/all-versions.js'
44
import { defaultCacheControl } from '../cache-control.js'
55

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
"prettier": "prettier -w \"**/*.{ts,tsx,js,mjs,scss,yml,yaml}\"",
195195
"prettier-check": "prettier -c \"**/*.{ts,tsx,js,mjs,scss,yml,yaml}\"",
196196
"prevent-pushes-to-main": "node script/prevent-pushes-to-main.js",
197-
"rest-dev": "script/rest/update-files.js",
197+
"rest-dev": "src/rest/scripts/update-files.js",
198198
"show-action-deps": "echo 'Action Dependencies:' && rg '^[\\s|-]*(uses:.*)$' .github -I -N --no-heading -r '$1$2' | sort | uniq | cut -c 7-",
199199
"start": "cross-env NODE_ENV=development ENABLED_LANGUAGES=en nodemon server.js",
200200
"start-all-languages": "cross-env NODE_ENV=development nodemon server.js",

pages/[versionId]/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { GetServerSideProps } from 'next'
22
import { useRouter } from 'next/router'
33
import { useEffect } from 'react'
44

5-
import { getInitialPageWebhooks } from 'lib/webhooks'
5+
import { getInitialPageWebhooks } from 'src/webhooks/lib'
66
import { getMainContext, MainContext, MainContextT } from 'components/context/MainContext'
77
import {
88
getAutomatedPageContextFromRequest,

0 commit comments

Comments
 (0)