From b22ca2a57e238c4c7ba360cffd5dd6c1ce935c08 Mon Sep 17 00:00:00 2001 From: Dominique Charlebois Date: Sat, 12 Jun 2021 20:15:19 -0700 Subject: [PATCH 01/19] Add intro to comparing commits --- .../viewing-and-comparing-commits/comparing-commits.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md b/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md index e5ac7c2fa6..ca5c128bc3 100644 --- a/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md +++ b/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md @@ -1,5 +1,6 @@ --- title: Comparing commits +intro: You can compare the state of your repository across branches, tags, commits, and dates. redirect_from: - /articles/comparing-commits-across-time - /github/committing-changes-to-your-project/comparing-commits-across-time @@ -9,7 +10,7 @@ versions: enterprise-server: '*' github-ae: '*' --- -You can compare the state of your repository across branches, tags, commits, and dates. To compare different versions of your repository, append `/compare` to your repository's path. +To compare different versions of your repository, append `/compare` to your repository's path. We'll demonstrate the power of Compare by looking at the compare page for [a fork of the Linguist repo](https://github.com/octocat/linguist), which is at [https://github.com/octocat/linguist/compare/master...octocat:master](https://github.com/octocat/linguist/compare/master...octocat:master). From 7e3addd8ca6f5ea8c1e0d343b8875ef87e009322 Mon Sep 17 00:00:00 2001 From: Dominique Charlebois Date: Sat, 12 Jun 2021 20:31:47 -0700 Subject: [PATCH 02/19] Update comparing-commits.md --- .../viewing-and-comparing-commits/comparing-commits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md b/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md index ca5c128bc3..1a2b1efed4 100644 --- a/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md +++ b/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md @@ -1,6 +1,6 @@ --- title: Comparing commits -intro: You can compare the state of your repository across branches, tags, commits, and dates. +intro: You can compare the state of your repository across branches, tags, commits, forks, and dates. redirect_from: - /articles/comparing-commits-across-time - /github/committing-changes-to-your-project/comparing-commits-across-time From e32b9953947883e04caba33eb7af9bf5db4db08f Mon Sep 17 00:00:00 2001 From: Dominique Charlebois Date: Sun, 13 Jun 2021 12:17:33 -0700 Subject: [PATCH 03/19] Update differences-between-commit-views.md --- .../differences-between-commit-views.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/differences-between-commit-views.md b/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/differences-between-commit-views.md index 3caba03479..1308cf713e 100644 --- a/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/differences-between-commit-views.md +++ b/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/differences-between-commit-views.md @@ -1,5 +1,6 @@ --- title: Differences between commit views +intro: You can sometimes observe differences in commit history depending on the chosen viewing method. redirect_from: - /articles/differences-between-commit-views - /github/committing-changes-to-your-project/differences-between-commit-views From 03d825b8a11a534a7f40531347e2a3988b6cfbf1 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Wed, 16 Jun 2021 17:33:17 +0200 Subject: [PATCH 04/19] Update generating-a-new-gpg-key.md The interactive gpg key creation flow is different to how the docs here make them sound. I've made it less specific so as not to confuse people. --- .../generating-a-new-gpg-key.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/github/authenticating-to-github/managing-commit-signature-verification/generating-a-new-gpg-key.md b/content/github/authenticating-to-github/managing-commit-signature-verification/generating-a-new-gpg-key.md index 5f2d41a209..14163465a3 100644 --- a/content/github/authenticating-to-github/managing-commit-signature-verification/generating-a-new-gpg-key.md +++ b/content/github/authenticating-to-github/managing-commit-signature-verification/generating-a-new-gpg-key.md @@ -33,8 +33,8 @@ topics: ```shell $ gpg --default-new-key-algo rsa4096 --gen-key ``` -4. At the prompt, specify the kind of key you want, or press `Enter` to accept the default `RSA and RSA`. -5. Enter the desired key size. Your key must be at least `4096` bits. +4. At the prompt, specify the kind of key you want, or press `Enter` to accept the default. +5. At the prompt, specify the key size you want, or press `Enter` to accept the default. Your key must be at least `4096` bits. 6. Enter the length of time the key should be valid. Press `Enter` to specify the default selection, indicating that the key doesn't expire. 7. Verify that your selections are correct. 8. Enter your user ID information. From b13ac1bd85dfb718bb72388b2cd122563e68c126 Mon Sep 17 00:00:00 2001 From: Sarah Schneider Date: Mon, 21 Jun 2021 14:40:38 -0400 Subject: [PATCH 05/19] only hide TOC items on non-early access content; we want it to display on EA pages --- middleware/contextualizers/generic-toc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/contextualizers/generic-toc.js b/middleware/contextualizers/generic-toc.js index fb796dd0a3..7983328603 100644 --- a/middleware/contextualizers/generic-toc.js +++ b/middleware/contextualizers/generic-toc.js @@ -50,7 +50,7 @@ module.exports = async function genericToc (req, res, next) { async function getTocItems (pagesArray, context, isRecursive, renderIntros) { return (await Promise.all(pagesArray.map(async (child) => { // Do not include hidden child items on a TOC page - if (child.page.hidden) return + if (child.page.hidden && !context.currentPath.includes('/early-access/')) return return { title: child.renderedFullTitle, From 7919725e0f093a883a4e6de360369f70d33e0d64 Mon Sep 17 00:00:00 2001 From: Sarah Schneider Date: Mon, 21 Jun 2021 14:40:56 -0400 Subject: [PATCH 06/19] add a few more early access tests --- tests/unit/early-access.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/unit/early-access.js b/tests/unit/early-access.js index 362e3bbc1f..5ccd5339e5 100644 --- a/tests/unit/early-access.js +++ b/tests/unit/early-access.js @@ -1,6 +1,8 @@ const fs = require('fs').promises const path = require('path') const { testViaActionsOnly } = require('../helpers/conditional-runs') +const { getDOM } = require('../helpers/supertest') +const got = require('got') describe('cloning early-access', () => { testViaActionsOnly('the content directory exists', async () => { @@ -18,3 +20,25 @@ describe('cloning early-access', () => { expect(await fs.stat(eaDir)).toBeTruthy() }) }) + +describe('rendering early-access', () => { + jest.setTimeout(5 * 60 * 1000) + + testViaActionsOnly('the top-level TOC renders locally', async () => { + const $ = await getDOM('/en/early-access') + expect($.html().includes('Hello, local developer! This page is not visible on production.')).toBe(true) + expect($('ul a').length).toBeGreaterThan(5) + }) + + testViaActionsOnly('the top-level TOC does not render on production', async () => { + async function getEarlyAccess () { + return await got('https://docs.github.com/en/early-access') + } + await expect(getEarlyAccess).rejects.toThrowError('Response code 404 (Not Found)') + }) + + testViaActionsOnly('TOCs display on category pages', async () => { + const $ = await getDOM('/en/early-access/github/enforcing-best-practices-with-github-policies') + expect($('ul a').length).toBeGreaterThan(5) + }) +}) From 64c5f92e8261fee302fbbd41aa5c5dc3459870ad Mon Sep 17 00:00:00 2001 From: Cory Wilkerson Date: Mon, 21 Jun 2021 12:18:59 -0700 Subject: [PATCH 07/19] Remove "write", added repos only have read permissions (#20040) Co-authored-by: Amy Burns --- .../managing-access-and-security-for-your-codespaces.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces.md b/content/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces.md index bb705b64bb..b94f2dbabb 100644 --- a/content/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces.md +++ b/content/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces.md @@ -9,7 +9,7 @@ topics: {% data reusables.codespaces.release-stage %} -When you enable access and security for a repository owned by your user account, any codespaces that are created for that repository will have read and write permissions to all other repositories you own. If you want to restrict the repositories a codespace can access, you can limit to it to either the repository the codespace was opened for or specific repositories. You should only enable access and security for repositories you trust. +When you enable access and security for a repository owned by your user account, any codespaces that are created for that repository will have read permissions to all other repositories you own. If you want to restrict the repositories a codespace can access, you can limit to it to either the repository the codespace was opened for or specific repositories. You should only enable access and security for repositories you trust. {% data reusables.user_settings.access_settings %} {% data reusables.user_settings.codespaces-tab %} From b084dbc23dfaba154ce8bd9e0c7d769346d263fb Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Mon, 21 Jun 2021 12:52:58 -0700 Subject: [PATCH 08/19] React: Enable all remaining pages (#20012) * enable all remaining pages * update tests for survey, filter card dropdowns * fix search test * fix: mobile search layout * update sidebar test * fix: learning track page is optional * fix broken links --- components/Search.tsx | 13 +++--- components/Survey.tsx | 4 +- .../context/ProductSubLandingContext.tsx | 2 +- components/release-notes/GHESReleaseNotes.tsx | 4 +- components/sublanding/ArticleCard.tsx | 5 ++- components/sublanding/ArticleCards.tsx | 2 + components/sublanding/LearningTrack.tsx | 2 +- components/sublanding/SubLandingHero.tsx | 2 +- middleware/is-next-request.js | 26 +---------- stylesheets/search.scss | 2 +- tests/browser/browser.js | 44 ++++++++++--------- tests/rendering/sidebar.js | 8 ++-- 12 files changed, 47 insertions(+), 67 deletions(-) diff --git a/components/Search.tsx b/components/Search.tsx index a06baea9f2..973ed138bb 100644 --- a/components/Search.tsx +++ b/components/Search.tsx @@ -23,7 +23,8 @@ type Props = { // Homepage and 404 should be `isStandalone`, all others not // `updateSearchParams` should be false on the GraphQL explorer page export function Search({ isStandalone = false, updateSearchParams = true, children }: Props) { - const [query, setQuery] = useState('') + const router = useRouter() + const [query, setQuery] = useState(router.query.query || '') const [results, setResults] = useState>([]) const [activeHit, setActiveHit] = useState(0) const inputRef = useRef(null) @@ -32,18 +33,14 @@ export function Search({ isStandalone = false, updateSearchParams = true, childr // Figure out language and version for index const { languages, searchVersions, nonEnterpriseDefaultVersion } = useMainContext() - const router = useRouter() // fall back to the non-enterprise default version (FPT currently) on the homepage, 404 page, etc. const version = searchVersions[currentVersion] || searchVersions[nonEnterpriseDefaultVersion] const language = (Object.keys(languages).includes(router.locale || '') && router.locale) || 'en' // If the user shows up with a query in the URL, go ahead and search for it useEffect(() => { - const params = new URLSearchParams(location.search) - if (params.has('query')) { - const xquery = params.get('query')?.trim() || '' - setQuery(xquery) - /* await */ fetchSearchResults(xquery) + if (router.query.query) { + /* await */ fetchSearchResults((router.query.query as string).trim()) } }, []) @@ -183,7 +180,7 @@ export function Search({ isStandalone = false, updateSearchParams = true, childr {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
diff --git a/components/Survey.tsx b/components/Survey.tsx index b4b81b2c12..ceb786c5b4 100644 --- a/components/Survey.tsx +++ b/components/Survey.tsx @@ -35,7 +35,7 @@ export const Survey = () => { } return ( -
+

{t`able_to_find`} @@ -128,7 +128,7 @@ export const Survey = () => { )} - {state === ViewState.END &&

{t`feedback`}

} + {state === ViewState.END &&

{t`feedback`}

} ) } diff --git a/components/context/ProductSubLandingContext.tsx b/components/context/ProductSubLandingContext.tsx index 704a160139..9c01841ee7 100644 --- a/components/context/ProductSubLandingContext.tsx +++ b/components/context/ProductSubLandingContext.tsx @@ -5,7 +5,7 @@ export type FeaturedTrack = { trackName: string title: string description: string - guides?: Array<{ href: string; page: { type: string }; title: string; intro: string }> + guides?: Array<{ href: string; page?: { type: string }; title: string; intro: string }> } | null export type ArticleGuide = { diff --git a/components/release-notes/GHESReleaseNotes.tsx b/components/release-notes/GHESReleaseNotes.tsx index bf79b99c06..93d6e4da88 100644 --- a/components/release-notes/GHESReleaseNotes.tsx +++ b/components/release-notes/GHESReleaseNotes.tsx @@ -36,7 +36,7 @@ export function GHESReleaseNotes({ context }: Props) { {prevRelease ? ( {prevRelease} @@ -51,7 +51,7 @@ export function GHESReleaseNotes({ context }: Props) { {nextRelease ? ( {nextRelease} diff --git a/components/sublanding/ArticleCard.tsx b/components/sublanding/ArticleCard.tsx index 19f2ad009f..d900438301 100644 --- a/components/sublanding/ArticleCard.tsx +++ b/components/sublanding/ArticleCard.tsx @@ -7,16 +7,17 @@ type Props = { export const ArticleCard = ({ card, typeLabel }: Props) => { return ( -
+

{card.title}

-
{typeLabel}
+
{typeLabel}

{card.intro}

{card.topics.length > 0 && (
{card.topics.map((topic) => { return ( diff --git a/components/sublanding/ArticleCards.tsx b/components/sublanding/ArticleCards.tsx index c94cb0306e..4b4cc9d2d2 100644 --- a/components/sublanding/ArticleCards.tsx +++ b/components/sublanding/ArticleCards.tsx @@ -50,6 +50,7 @@ export const ArticleCards = () => { className="form-select f4 text-bold border-0 rounded-0 border-top box-shadow-none pl-0" name="type" aria-label="guide types" + data-testid="card-filter-dropdown" onChange={onChangeTypeFilter} > @@ -70,6 +71,7 @@ export const ArticleCards = () => { value={topicFilter} className="form-select f4 text-bold border-0 rounded-0 border-top box-shadow-none pl-0" name="topics" + data-testid="card-filter-dropdown" aria-label="guide topics" onChange={onChangeTopicFilter} > diff --git a/components/sublanding/LearningTrack.tsx b/components/sublanding/LearningTrack.tsx index 2e55420b1f..0b394fc652 100644 --- a/components/sublanding/LearningTrack.tsx +++ b/components/sublanding/LearningTrack.tsx @@ -53,7 +53,7 @@ export const LearningTrack = ({ track }: Props) => {
{guide.title}
- {t('guide_types')[guide.page.type]} + {t('guide_types')[guide.page?.type || '']}
{track?.guides && track?.guides?.indexOf(guide) + 1 === MAX_VISIBLE_GUIDES ? ( diff --git a/components/sublanding/SubLandingHero.tsx b/components/sublanding/SubLandingHero.tsx index 2da02fc4d5..385d891e8c 100644 --- a/components/sublanding/SubLandingHero.tsx +++ b/components/sublanding/SubLandingHero.tsx @@ -26,7 +26,7 @@ export const SubLandingHero = () => { )}
- {t('guide_types')[guide.page.type]} + {t('guide_types')[guide.page?.type || '']}

{guide.title}

diff --git a/middleware/is-next-request.js b/middleware/is-next-request.js index 3bcddfebb1..93d8c3c69c 100644 --- a/middleware/is-next-request.js +++ b/middleware/is-next-request.js @@ -5,29 +5,6 @@ const versionIds = Object.keys(require('../lib/all-versions')) const { FEATURE_NEXTJS } = process.env; -const enabledSubSections = [ - // 'actions', - // 'admin', - "billing", - // "code-security", - // "codespaces", - "communities", - "desktop", - // "developers", - "discussions", - // 'early-access', - "education", - // 'github', - // "graphql", - // 'insights', - // "issues", - "organizations", - 'packages', - "pages", - "rest", - "sponsors", -]; - const homePageExp = pathToRegexp('/:locale/:versionId?') const productPageExp = pathToRegexp('/:locale/:versionId?/:productId') const subSectionExp = pathToRegexp('/:locale/:versionId?/:productId/:subSection*') @@ -53,8 +30,7 @@ module.exports = function isNextRequest(req, res, next) { } else if (productPageMatch && productIds.includes(productPageMatch[3])) { req.renderWithNextjs = true } else if (subSectionMatch) { - // depending on whether versionId is included the productId is in a different place - req.renderWithNextjs = enabledSubSections.includes(subSectionMatch[2]) || enabledSubSections.includes(subSectionMatch[3]) + req.renderWithNextjs = true } } } diff --git a/stylesheets/search.scss b/stylesheets/search.scss index f77abf8515..a0f5fdd294 100644 --- a/stylesheets/search.scss +++ b/stylesheets/search.scss @@ -86,7 +86,7 @@ header { margin-bottom: 0; } - @include breakpoint(md) { + @include breakpoint(lg) { #search-results-container { display: none; position: absolute; diff --git a/tests/browser/browser.js b/tests/browser/browser.js index 832ef65966..73f9188902 100644 --- a/tests/browser/browser.js +++ b/tests/browser/browser.js @@ -43,7 +43,7 @@ describe('browser search', () => { await page.waitForSelector('.ais-Hits') const hits = await page.$$('.ais-Hits-item') expect(hits.length).toBeGreaterThan(5) - page.setViewport(initialViewport) + await page.setViewport(initialViewport) }) it('works on 404 error page', async () => { @@ -71,8 +71,10 @@ describe('browser search', () => { interceptedRequest.continue() }) - await newPage.click('#search-input-container input[type="search"]') - await newPage.type('#search-input-container input[type="search"]', 'test') + await newPage.click('[data-testid=mobile-menu-button]') + const searchInput = await newPage.$('[data-testid=mobile-header] [data-testid=site-search-input]') + await searchInput.click() + await searchInput.type('test') await newPage.waitForSelector('.search-result') }) @@ -92,8 +94,10 @@ describe('browser search', () => { interceptedRequest.continue() }) - await newPage.click('#search-input-container input[type="search"]') - await newPage.type('#search-input-container input[type="search"]', 'test') + await newPage.click('[data-testid=mobile-menu-button]') + const searchInput = await newPage.$('[data-testid=mobile-header] [data-testid=site-search-input]') + await searchInput.click() + await searchInput.type('test') await newPage.waitForSelector('.search-result') }) }) @@ -117,20 +121,20 @@ describe('survey', () => { }) // When I click the "Yes" button - await page.click('.js-survey [for=survey-yes]') + await page.click('[data-testid=survey-form] [for=survey-yes]') // (sent a POST request to /events) // I see the request for my email - await page.waitForSelector('.js-survey [type="email"]') + await page.waitForSelector('[data-testid=survey-form] [type="email"]') // When I fill in my email and submit the form - await page.type('.js-survey [type="email"]', 'test@example.com') + await page.type('[data-testid=survey-form] [type="email"]', 'test@example.com') await sleep(1000) - await page.click('.js-survey [type="submit"]') + await page.click('[data-testid=survey-form] [type="submit"]') // (sent a PUT request to /events/{id}) // I see the feedback - await page.waitForSelector('.js-survey [data-help-end]') + await page.waitForSelector('[data-testid=survey-end]') }) }) @@ -257,23 +261,23 @@ describe('code examples', () => { describe('filter cards', () => { it('works with select input', async () => { await page.goto('http://localhost:4001/en/actions/guides') - await page.select('.js-filter-card-filter-dropdown[name="type"]', 'overview') - const shownCards = await page.$$('.js-filter-card:not(.d-none)') - const shownCardsAttrib = await page.$$eval('.js-filter-card:not(.d-none)', cards => - cards.map(card => card.dataset.type) + await page.select('[data-testid=card-filter-dropdown][name="type"]', 'overview') + const shownCards = await page.$$('[data-testid=article-card]') + const shownCardTypes = await page.$$eval('[data-testid=article-card-type]', cardTypes => + cardTypes.map(cardType => cardType.textContent) ) - shownCardsAttrib.map(attrib => expect(attrib).toBe('overview')) + shownCardTypes.map(type => expect(type).toBe('Overview')) expect(shownCards.length).toBeGreaterThan(0) }) it('works with select input on an Enterprise version', async () => { await page.goto(`http://localhost:4001/en/enterprise-server@${latest}/actions/guides`) - await page.select('.js-filter-card-filter-dropdown[name="type"]', 'overview') - const shownCards = await page.$$('.js-filter-card:not(.d-none)') - const shownCardsAttrib = await page.$$eval('.js-filter-card:not(.d-none)', cards => - cards.map(card => card.dataset.type) + await page.select('[data-testid=card-filter-dropdown][name="type"]', 'overview') + const shownCards = await page.$$('[data-testid=article-card]') + const shownCardTypes = await page.$$eval('[data-testid=article-card-type]', cardTypes => + cardTypes.map(cardType => cardType.textContent) ) - shownCardsAttrib.map(attrib => expect(attrib).toBe('overview')) + shownCardTypes.map(type => expect(type).toBe('Overview')) expect(shownCards.length).toBeGreaterThan(0) }) }) diff --git a/tests/rendering/sidebar.js b/tests/rendering/sidebar.js index e65829daa1..08d72cb4e0 100644 --- a/tests/rendering/sidebar.js +++ b/tests/rendering/sidebar.js @@ -34,12 +34,12 @@ describe('sidebar', () => { test('adds an `is-current-page` class to the sidebar link to the current page', async () => { const url = '/en/github/setting-up-and-managing-your-github-user-account/managing-user-account-settings' const $ = await getDOM(url) - expect($('.sidebar .is-current-page').length).toBe(1) - expect($('.sidebar .is-current-page a').attr('href')).toContain(url) + expect($('.sidebar-products .is-current-page').length).toBe(1) + expect($('.sidebar-products .is-current-page a').attr('href')).toContain(url) }) test('does not display Early Access as a product', async () => { - expect($homePage('.sidebar li.sidebar-product[title*="Early"]').length).toBe(0) - expect($homePage('.sidebar li.sidebar-product[title*="early"]').length).toBe(0) + expect($homePage('.sidebar-products li.sidebar-product[title*="Early"]').length).toBe(0) + expect($homePage('.sidebar-products li.sidebar-product[title*="early"]').length).toBe(0) }) }) From cd5b4dd39be744ba02161bc34655ebdbb5217ff3 Mon Sep 17 00:00:00 2001 From: github-openapi-bot <69533958+github-openapi-bot@users.noreply.github.com> Date: Mon, 21 Jun 2021 16:11:59 -0400 Subject: [PATCH 09/19] Update OpenAPI Descriptions (#20037) --- lib/rest/static/decorated/api.github.com.json | 10 ++++++++++ lib/rest/static/decorated/ghes-3.1.json | 10 ++++++++++ lib/rest/static/dereferenced/api.github.com.deref.json | 9 +++++++++ lib/rest/static/dereferenced/ghes-3.1.deref.json | 9 +++++++++ 4 files changed, 38 insertions(+) diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json index e84fa7e1d6..978ce27b4f 100644 --- a/lib/rest/static/decorated/api.github.com.json +++ b/lib/rest/static/decorated/api.github.com.json @@ -73494,6 +73494,16 @@ }, "descriptionHTML": "

Set to open or resolved to only list secret scanning alerts in a specific state.

" }, + { + "name": "secret_types", + "in": "query", + "description": "Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to `all` to list all the secret scanning alerts. Default is `all`", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "

Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to all to list all the secret scanning alerts. Default is all

" + }, { "name": "page", "description": "Page number of the results to fetch.", diff --git a/lib/rest/static/decorated/ghes-3.1.json b/lib/rest/static/decorated/ghes-3.1.json index 4f345beb9e..ec9ea5b76a 100644 --- a/lib/rest/static/decorated/ghes-3.1.json +++ b/lib/rest/static/decorated/ghes-3.1.json @@ -71285,6 +71285,16 @@ }, "descriptionHTML": "

Set to open or resolved to only list secret scanning alerts in a specific state.

" }, + { + "name": "secret_types", + "in": "query", + "description": "Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to `all` to list all the secret scanning alerts. Default is `all`", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "

Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to all to list all the secret scanning alerts. Default is all

" + }, { "name": "page", "description": "Page number of the results to fetch.", diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json index d3acd48f4a..2d02990a8d 100644 --- a/lib/rest/static/dereferenced/api.github.com.deref.json +++ b/lib/rest/static/dereferenced/api.github.com.deref.json @@ -323443,6 +323443,15 @@ ] } }, + { + "name": "secret_types", + "in": "query", + "description": "Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to `all` to list all the secret scanning alerts. Default is `all`", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "page", "description": "Page number of the results to fetch.", diff --git a/lib/rest/static/dereferenced/ghes-3.1.deref.json b/lib/rest/static/dereferenced/ghes-3.1.deref.json index d5076a6118..735f3f270f 100644 --- a/lib/rest/static/dereferenced/ghes-3.1.deref.json +++ b/lib/rest/static/dereferenced/ghes-3.1.deref.json @@ -307187,6 +307187,15 @@ ] } }, + { + "name": "secret_types", + "in": "query", + "description": "Set to a comma seperate list of secret_types to only list secret scanning alerts in for those types. Set to `all` to list all the secret scanning alerts. Default is `all`", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "page", "description": "Page number of the results to fetch.", From e377d74419e7d2877ffc2b7943e068024999520b Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Mon, 21 Jun 2021 14:55:49 -0700 Subject: [PATCH 10/19] React: import necessary javascripts directly (#20001) * import javascript files directly * move globally required js to _app * fix: js initialization * set next env for tests --- components/DefaultLayout.tsx | 4 +- components/PrintAction.tsx | 16 +++++++ components/article/ArticleTitle.tsx | 19 +++----- components/context/MainContext.tsx | 2 - .../release-notes/GHESReleaseNotePatch.tsx | 5 +- components/sublanding/LearningTrack.tsx | 48 ++++++++++--------- javascripts/copy-code.ts | 2 +- javascripts/experiment.ts | 1 - pages/[versionId]/[productId]/index.tsx | 19 ++++++++ .../[versionId]/graphql/overview/explorer.tsx | 16 ++++--- pages/_app.tsx | 12 +++++ 11 files changed, 95 insertions(+), 49 deletions(-) create mode 100644 components/PrintAction.tsx diff --git a/components/DefaultLayout.tsx b/components/DefaultLayout.tsx index 3440cf2470..a88f2bd228 100644 --- a/components/DefaultLayout.tsx +++ b/components/DefaultLayout.tsx @@ -11,7 +11,7 @@ import { useTranslation } from './hooks/useTranslation' type Props = { children?: React.ReactNode } export const DefaultLayout = (props: Props) => { - const { builtAssets, page, error, isHomepageVersion } = useMainContext() + const { page, error, isHomepageVersion } = useMainContext() const { t } = useTranslation('errors') return (
@@ -22,8 +22,6 @@ export const DefaultLayout = (props: Props) => { {page.fullTitle} ) : null} -