diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bbcd52361410..f2375e95c67d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,7 +66,6 @@ jobs: # - links - observability # - open-source - - pageinfo # - pages - products - redirects @@ -176,7 +175,7 @@ jobs: - uses: ./.github/actions/precompute-pageinfo # Only the 'pageinfo' tests include end-to-end tests about this. - if: ${{ matrix.name == 'pageinfo' }} + if: ${{ matrix.name == 'article-api' }} env: ROOT: src/fixtures/fixtures @@ -194,6 +193,6 @@ jobs: # tests run only in English. The exception is the # `languages` suite which needs all languages to be set up. ENABLED_LANGUAGES: ${{ matrix.name == 'languages' && 'all' || '' }} - ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'pageinfo' || matrix.name == 'landings' ) && 'src/fixtures/fixtures' || '' }} - TRANSLATIONS_FIXTURE_ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'pageinfo') && 'src/fixtures/fixtures/translations' || '' }} + ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'article-api' || matrix.name == 'landings' ) && 'src/fixtures/fixtures' || '' }} + TRANSLATIONS_FIXTURE_ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'article-api') && 'src/fixtures/fixtures/translations' || '' }} run: npm test -- src/${{ matrix.name }}/tests/ diff --git a/content/get-started/learning-to-code/learning-to-debug-with-github-copilot.md b/content/get-started/learning-to-code/learning-to-debug-with-github-copilot.md index 08eb84b06493..8150408c252d 100644 --- a/content/get-started/learning-to-code/learning-to-debug-with-github-copilot.md +++ b/content/get-started/learning-to-code/learning-to-debug-with-github-copilot.md @@ -143,6 +143,14 @@ Why is the output of this code so much higher than expected? Please explain in d To fix this error, {% data variables.product.prodname_copilot_short %} will suggest code that removes the extra `factorial` from the equation, or that changes the `*=` operator to `=`. +{% note %} + +Did you successfully debug `bugged_factorial_finder.py`? + +Yes No + +{% endnote %} + ## Debugging your own project Now that you've practiced debugging some simple programs with {% data variables.product.prodname_copilot_short %}, you can use the same methodologies to find and fix bugs hiding in your own work. diff --git a/package.json b/package.json index 81cfcf29b1dc..cb010b4d989b 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "playwright-test": "playwright test --config src/fixtures/playwright.config.ts --project=\"Google Chrome\"", "post-lints": "tsx src/content-linter/scripts/post-lints.js", "postinstall": "cp package-lock.json .installed.package-lock.json && echo \"Updated .installed.package-lock.json\" # see husky/post-checkout and husky/post-merge", - "precompute-pageinfo": "tsx src/pageinfo/scripts/precompute-pageinfo.ts", + "precompute-pageinfo": "tsx src/article-api/scripts/precompute-pageinfo.ts", "prepare": "husky src/workflows/husky", "prettier": "prettier -w \"**/*.{ts,tsx,js,mjs,scss,yml,yaml}\"", "prettier-check": "prettier -c \"**/*.{ts,tsx,js,mjs,scss,yml,yaml}\"", diff --git a/src/pageinfo/README.md b/src/article-api/README-pageinfo.md similarity index 100% rename from src/pageinfo/README.md rename to src/article-api/README-pageinfo.md diff --git a/src/pageinfo/middleware.ts b/src/article-api/middleware/pageinfo.ts similarity index 100% rename from src/pageinfo/middleware.ts rename to src/article-api/middleware/pageinfo.ts diff --git a/src/pageinfo/scripts/precompute-pageinfo.ts b/src/article-api/scripts/precompute-pageinfo.ts similarity index 98% rename from src/pageinfo/scripts/precompute-pageinfo.ts rename to src/article-api/scripts/precompute-pageinfo.ts index 2199d401030a..2decd71a027a 100644 --- a/src/pageinfo/scripts/precompute-pageinfo.ts +++ b/src/article-api/scripts/precompute-pageinfo.ts @@ -34,7 +34,7 @@ import { program, Option } from 'commander' import { languageKeys } from 'src/languages/lib/languages.js' import { loadPages, loadUnversionedTree } from 'src/frame/lib/page-data.js' -import { CACHE_FILE_PATH, getPageInfo } from '../middleware' +import { CACHE_FILE_PATH, getPageInfo } from '../middleware/pageinfo' program .description('Generates a JSON file with precompute pageinfo data by pathname') diff --git a/src/pageinfo/tests/pageinfo.js b/src/article-api/tests/pageinfo.js similarity index 100% rename from src/pageinfo/tests/pageinfo.js rename to src/article-api/tests/pageinfo.js diff --git a/src/frame/middleware/api.ts b/src/frame/middleware/api.ts index a5c4c04468fd..0c768845b4a8 100644 --- a/src/frame/middleware/api.ts +++ b/src/frame/middleware/api.ts @@ -5,7 +5,7 @@ import events from '@/events/middleware.js' import anchorRedirect from '@/rest/api/anchor-redirect.js' import aiSearch from '@/search/middleware/ai-search' import search from '@/search/middleware/search-routes.js' -import pageInfo from '@/pageinfo/middleware' +import pageInfo from '#src/article-api/middleware/pageinfo.ts' import pageList from '@/article-api/middleware/pagelist' import webhooks from '@/webhooks/middleware/webhooks.js' import { ExtendedRequest } from '@/types' diff --git a/src/graphql/data/fpt/schema.docs.graphql b/src/graphql/data/fpt/schema.docs.graphql index 93e5a4bd900a..5a682b411f59 100644 --- a/src/graphql/data/fpt/schema.docs.graphql +++ b/src/graphql/data/fpt/schema.docs.graphql @@ -38632,8 +38632,8 @@ Require all commits be made to a non-target branch and submitted via a pull requ """ type PullRequestParameters { """ - When merging pull requests, you can allow any combination of merge commits, - squashing, or rebasing. At least one option must be enabled. + Array of allowed merge methods. Allowed values include `merge`, `squash`, and + `rebase`. At least one option must be enabled. """ allowedMergeMethods: [String!] @@ -38668,8 +38668,8 @@ Require all commits be made to a non-target branch and submitted via a pull requ """ input PullRequestParametersInput { """ - When merging pull requests, you can allow any combination of merge commits, - squashing, or rebasing. At least one option must be enabled. + Array of allowed merge methods. Allowed values include `merge`, `squash`, and + `rebase`. At least one option must be enabled. """ allowedMergeMethods: [String!] diff --git a/src/graphql/data/fpt/schema.json b/src/graphql/data/fpt/schema.json index 778f626aa721..09478d28d576 100644 --- a/src/graphql/data/fpt/schema.json +++ b/src/graphql/data/fpt/schema.json @@ -53134,7 +53134,7 @@ "fields": [ { "name": "allowedMergeMethods", - "description": "
When merging pull requests, you can allow any combination of merge commits,\nsquashing, or rebasing. At least one option must be enabled.
", + "description": "Array of allowed merge methods. Allowed values include merge, squash, and\nrebase. At least one option must be enabled.
When merging pull requests, you can allow any combination of merge commits,\nsquashing, or rebasing. At least one option must be enabled.
", + "description": "Array of allowed merge methods. Allowed values include merge, squash, and\nrebase. At least one option must be enabled.
When merging pull requests, you can allow any combination of merge commits,\nsquashing, or rebasing. At least one option must be enabled.
", + "description": "Array of allowed merge methods. Allowed values include merge, squash, and\nrebase. At least one option must be enabled.
When merging pull requests, you can allow any combination of merge commits,\nsquashing, or rebasing. At least one option must be enabled.
", + "description": "Array of allowed merge methods. Allowed values include merge, squash, and\nrebase. At least one option must be enabled.