@@ -42,7 +42,6 @@ export type ProductLandingContextT = {
|
||||
productVideo: string
|
||||
productVideoTranscript: string
|
||||
featuredLinks: Record<string, Array<FeaturedLink>>
|
||||
productCodeExamples: Array<CodeExample>
|
||||
productUserExamples: Array<{ username: string; description: string }>
|
||||
productCommunityExamples: Array<{ repo: string; description: string }>
|
||||
featuredArticles: Array<{
|
||||
@@ -117,7 +116,6 @@ export const getProductLandingContextFromRequest = async (
|
||||
},
|
||||
whatsNewChangelog: req.context.whatsNewChangelog || [],
|
||||
changelogUrl: req.context.changelogUrl || [],
|
||||
productCodeExamples: req.context.productCodeExamples || [],
|
||||
productCommunityExamples: req.context.productCommunityExamples || [],
|
||||
ghesReleases: req.context.ghesReleases || [],
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
import { RepoIcon } from '@primer/octicons-react'
|
||||
import { CodeExample } from 'components/context/ProductLandingContext'
|
||||
import { TruncateLines } from 'components/ui/TruncateLines'
|
||||
import { Label } from '@primer/react'
|
||||
|
||||
type Props = {
|
||||
example: CodeExample
|
||||
}
|
||||
export const CodeExampleCard = ({ example }: Props) => {
|
||||
return (
|
||||
<a
|
||||
className="Box d-flex flex-column flex-justify-between height-full color-shadow-medium hover-shadow-large no-underline color-fg-default"
|
||||
data-testid="code-example-card"
|
||||
href={`https://github.com/${example.href}`}
|
||||
>
|
||||
<div className="p-4">
|
||||
<h3 className="f4">{example.title}</h3>
|
||||
<p className="mt-2 mb-4 color-fg-muted">{example.description}</p>
|
||||
<div className="d-flex flex-wrap">
|
||||
{example.tags.map((tag) => {
|
||||
return (
|
||||
<Label key={tag} variant="accent" sx={{ mb: 1, mr: 2 }}>
|
||||
{tag}
|
||||
</Label>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<footer className="border-top p-4 color-fg-muted d-flex flex-items-center">
|
||||
<RepoIcon aria-label="repository URL" className="flex-shrink-0" />
|
||||
<TruncateLines
|
||||
as="span"
|
||||
maxLines={1}
|
||||
className="ml-2 text-mono text-small color-fg-accent line-break-anywhere"
|
||||
>
|
||||
{example.href}
|
||||
</TruncateLines>
|
||||
</footer>
|
||||
</a>
|
||||
)
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { ArrowRightIcon, SearchIcon } from '@primer/octicons-react'
|
||||
import { Text } from '@primer/react'
|
||||
|
||||
import { useProductLandingContext } from 'components/context/ProductLandingContext'
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
import { CodeExampleCard } from 'components/landing/CodeExampleCard'
|
||||
import { Link } from 'components/Link'
|
||||
|
||||
const PAGE_SIZE = 6
|
||||
export const CodeExamples = () => {
|
||||
const { productCodeExamples } = useProductLandingContext()
|
||||
const { t } = useTranslation('product_landing')
|
||||
const [numVisible, setNumVisible] = useState(PAGE_SIZE)
|
||||
const [search, setSearch] = useState('')
|
||||
const [typed, setTyped] = useState('')
|
||||
|
||||
useEffect(() => {
|
||||
setNumVisible(PAGE_SIZE) // reset the visible count (only matters after searching)
|
||||
}, [search])
|
||||
|
||||
const isSearching = !!search
|
||||
let searchResults: typeof productCodeExamples = []
|
||||
if (isSearching) {
|
||||
// The following replace method escapes special characters in regular expression creation.
|
||||
const matchReg = new RegExp(search.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'i')
|
||||
searchResults = productCodeExamples.filter((example) => {
|
||||
const searchableStr = `${example.tags.join(' ')} ${example.title} ${example.description}`
|
||||
return matchReg.test(searchableStr)
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<form
|
||||
data-search="hide"
|
||||
className="pr-lg-3 mb-5 mt-3"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault()
|
||||
setSearch(typed.trim())
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
className="ml-1 mr-2"
|
||||
fontWeight="bold"
|
||||
fontSize={2}
|
||||
as="label"
|
||||
htmlFor="searchCodeExamples"
|
||||
id="searchCodeExamples"
|
||||
>
|
||||
{t('code_example.search_examples')}
|
||||
</Text>
|
||||
<input
|
||||
data-testid="code-examples-input"
|
||||
className="input-lg py-2 px-3 col-12 col-lg-8 form-control"
|
||||
placeholder={t('search_code_examples')}
|
||||
type="search"
|
||||
autoComplete="off"
|
||||
aria-label={t('search_code_examples')}
|
||||
onChange={(event) => setTyped(event.target.value)}
|
||||
value={typed}
|
||||
/>
|
||||
<button data-testid="code-examples-search-btn" className="btn ml-2 py-2" type="submit">
|
||||
{t('code_example.search_button')}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
{isSearching && (
|
||||
<div role="status">
|
||||
<h3>
|
||||
{t('search_results_for')}: {search}
|
||||
</h3>
|
||||
<p className="mb-4">
|
||||
{t('matches_displayed')}: {searchResults.length}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
<ul data-testid="code-example-results" className="d-flex flex-wrap gutter">
|
||||
{(isSearching ? searchResults : productCodeExamples.slice(0, numVisible)).map((example) => {
|
||||
return (
|
||||
<li key={example.href} className="col-12 col-xl-4 col-lg-6 mb-4 list-style-none">
|
||||
<CodeExampleCard example={example} />
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
|
||||
{numVisible < productCodeExamples.length && !isSearching && (
|
||||
<button
|
||||
data-testid="code-examples-show-more"
|
||||
className="btn btn-outline float-right"
|
||||
onClick={() => setNumVisible(numVisible + PAGE_SIZE)}
|
||||
>
|
||||
{t('show_more')} <ArrowRightIcon />
|
||||
</button>
|
||||
)}
|
||||
|
||||
{isSearching && searchResults.length === 0 && (
|
||||
<div
|
||||
role="status"
|
||||
data-testid="code-examples-no-results"
|
||||
className="py-4 text-center color-fg-muted"
|
||||
>
|
||||
<div className="mb-3">
|
||||
<SearchIcon size={24} />{' '}
|
||||
</div>
|
||||
<h3 className="text-normal">
|
||||
{t('sorry')} <strong>{search}</strong>
|
||||
</h3>
|
||||
<p className="my-3 f4">
|
||||
{t('no_example')} <br /> {t('try_another')}
|
||||
</p>
|
||||
<Link href="https://github.com/github/docs/tree/main/data/product-examples">
|
||||
{t('learn')} <ArrowRightIcon />
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -7,7 +7,6 @@ import { FeaturedArticles } from 'components/landing/FeaturedArticles'
|
||||
import { GuideCards } from 'components/landing/GuideCards'
|
||||
import { SponsorsExamples } from 'components/landing/SponsorsExamples'
|
||||
import { CommunityExamples } from 'components/landing/CommunityExamples'
|
||||
import { CodeExamples } from 'components/landing/CodeExamples'
|
||||
import { LandingSection } from 'components/landing/LandingSection'
|
||||
import { useTranslation } from 'components/hooks/useTranslation'
|
||||
import { ProductArticlesList } from 'components/landing/ProductArticlesList'
|
||||
@@ -18,14 +17,8 @@ import { RestRedirect } from 'components/RestRedirect'
|
||||
export const ProductLanding = () => {
|
||||
const router = useRouter()
|
||||
const { isEnterpriseServer } = useVersion()
|
||||
const {
|
||||
title,
|
||||
shortTitle,
|
||||
featuredLinks,
|
||||
productUserExamples,
|
||||
productCommunityExamples,
|
||||
productCodeExamples,
|
||||
} = useProductLandingContext()
|
||||
const { title, shortTitle, featuredLinks, productUserExamples, productCommunityExamples } =
|
||||
useProductLandingContext()
|
||||
const { t } = useTranslation('product_landing')
|
||||
|
||||
return (
|
||||
@@ -40,16 +33,6 @@ export const ProductLanding = () => {
|
||||
<FeaturedArticles />
|
||||
</LandingSection>
|
||||
|
||||
{productCodeExamples.length > 0 && (
|
||||
<LandingSection
|
||||
title={t('code_examples')}
|
||||
sectionLink="code-examples"
|
||||
className="my-6 pb-6"
|
||||
>
|
||||
<CodeExamples />
|
||||
</LandingSection>
|
||||
)}
|
||||
|
||||
{productCommunityExamples.length > 0 && (
|
||||
<LandingSection title={t('communities_using_discussions')} className="my-6 pb-6">
|
||||
<CommunityExamples />
|
||||
|
||||
@@ -26,6 +26,10 @@ If you use SAML at the enterprise level with Azure AD as your IdP, you can enabl
|
||||
|
||||
{% data reusables.identity-and-permissions.about-team-sync %}
|
||||
|
||||
{% ifversion team-sync-manage-org-invites %}
|
||||
{% data reusables.identity-and-permissions.team-sync-org-invites %}
|
||||
{% endif %}
|
||||
|
||||
{% data reusables.identity-and-permissions.sync-team-with-idp-group %}
|
||||
|
||||
{% data reusables.identity-and-permissions.team-sync-disable %}
|
||||
@@ -53,3 +57,12 @@ You can also configure and manage team synchronization for an individual organiz
|
||||
{% data reusables.identity-and-permissions.team-sync-confirm %}
|
||||
7. Review the details for the IdP tenant you want to connect to your enterprise account, then click **Approve**.
|
||||
8. To disable team synchronization, under "Team synchronization", click **Disable team synchronization**.
|
||||
|
||||
{% ifversion team-sync-manage-org-invites %}
|
||||
## Managing whether team synchronization can invite non-members to organizations
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
1. Under "Team synchronization", select or deselect **Do not allow Team Sync to invite non-members to organizations.**
|
||||
{% endif %}
|
||||
@@ -30,6 +30,8 @@ codeql database add-diagnostic --source-id=<id> --source-name=<name> <options>..
|
||||
|
||||
\[Experimental] Add a piece of diagnostic information to a database.
|
||||
|
||||
Available since `v2.12.6`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<database>`
|
||||
|
||||
@@ -334,9 +334,9 @@ How to handle warnings from the QL compiler. One of:
|
||||
|
||||
`error`: Treat warnings as errors.
|
||||
|
||||
#### `--[no-]debug-info`
|
||||
#### `--no-debug-info`
|
||||
|
||||
Emit source location info in RA for debugging.
|
||||
Don't emit source location info in RA for debugging.
|
||||
|
||||
#### `--[no-]fast-compilation`
|
||||
|
||||
@@ -361,9 +361,9 @@ improvements in the compiler early.
|
||||
|
||||
In releases where there are no recent improvements to enable, this
|
||||
option silently does nothing. Thus it is safe to set it once and for all
|
||||
in you global CodeQL config file.
|
||||
in your global CodeQL config file.
|
||||
|
||||
The newest features are always on by default in [codeql test run](/code-security/codeql-cli/codeql-cli-manual/test-run).
|
||||
Available since `v2.11.1`.
|
||||
|
||||
#### `--[no-]local-checking`
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@ codeql database export-diagnostics --format=<format> [--output=<output>] <option
|
||||
\[Experimental] Export diagnostic information from a database for a
|
||||
failed analysis.
|
||||
|
||||
Available since `v2.12.6`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<database>`
|
||||
|
||||
@@ -202,6 +202,8 @@ Follow any symbolic links to their targets.
|
||||
|
||||
Find at most one match (as opposed to all matches).
|
||||
|
||||
Available since `v2.11.3`.
|
||||
|
||||
### Common options
|
||||
|
||||
#### `-h, --help`
|
||||
|
||||
@@ -221,9 +221,9 @@ How to handle warnings from the QL compiler. One of:
|
||||
|
||||
`error`: Treat warnings as errors.
|
||||
|
||||
#### `--[no-]debug-info`
|
||||
#### `--no-debug-info`
|
||||
|
||||
Emit source location info in RA for debugging.
|
||||
Don't emit source location info in RA for debugging.
|
||||
|
||||
#### `--[no-]fast-compilation`
|
||||
|
||||
@@ -248,9 +248,9 @@ improvements in the compiler early.
|
||||
|
||||
In releases where there are no recent improvements to enable, this
|
||||
option silently does nothing. Thus it is safe to set it once and for all
|
||||
in you global CodeQL config file.
|
||||
in your global CodeQL config file.
|
||||
|
||||
The newest features are always on by default in [codeql test run](/code-security/codeql-cli/codeql-cli-manual/test-run).
|
||||
Available since `v2.11.1`.
|
||||
|
||||
#### `--[no-]local-checking`
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ codeql diagnostic add (--diagnostic-dir=<diagnosticDir>) --source-id=<id> --sour
|
||||
|
||||
\[Experimental] \[Plumbing] Add a piece of diagnostic information.
|
||||
|
||||
Available since `v2.12.6`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `--markdown-message=<markdownMessage>`
|
||||
|
||||
@@ -30,6 +30,8 @@ codeql diagnostic export --format=<format> [--output=<output>] <options>...
|
||||
|
||||
\[Experimental] Export diagnostic information for a failed analysis.
|
||||
|
||||
Available since `v2.12.6`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `--format=<format>`
|
||||
|
||||
@@ -210,9 +210,9 @@ How to handle warnings from the QL compiler. One of:
|
||||
|
||||
`error`: Treat warnings as errors.
|
||||
|
||||
#### `--[no-]debug-info`
|
||||
#### `--no-debug-info`
|
||||
|
||||
Emit source location info in RA for debugging.
|
||||
Don't emit source location info in RA for debugging.
|
||||
|
||||
#### `--[no-]fast-compilation`
|
||||
|
||||
@@ -237,9 +237,9 @@ improvements in the compiler early.
|
||||
|
||||
In releases where there are no recent improvements to enable, this
|
||||
option silently does nothing. Thus it is safe to set it once and for all
|
||||
in you global CodeQL config file.
|
||||
in your global CodeQL config file.
|
||||
|
||||
The newest features are always on by default in [codeql test run](/code-security/codeql-cli/codeql-cli-manual/test-run).
|
||||
Available since `v2.11.1`.
|
||||
|
||||
#### `--[no-]local-checking`
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ IDEs. It is started by the IDE plugin in the background and communicates
|
||||
with it through a special protocol on its standard input and output
|
||||
streams.
|
||||
|
||||
Available since `v2.10.11`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `--[no-]tuple-counting`
|
||||
|
||||
@@ -36,15 +36,27 @@ ranges as dependencies of the current package, and then installs them.
|
||||
This command modifies the qlpack.yml file of the current package.
|
||||
Formatting and comments will be removed.
|
||||
|
||||
Available since `v2.6.0`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<scope/name[@range]>...`
|
||||
|
||||
\[Mandatory] The scope, name, and optional version range of the pack to
|
||||
add to the dependency list. The latest version that satisfies the
|
||||
specified range is downloaded and the specified range is added to the
|
||||
qlpack.yml. If the version is missing, then the latest version of this
|
||||
pack is retrieved and that version is added to the qlpack.yml.
|
||||
add to the dependency list.
|
||||
|
||||
If no version range is specified, or if the version range is specified
|
||||
as 'latest', the latest version of the pack is downloaded, and a
|
||||
dependency is added to qlpack.yml that allows any version that is
|
||||
compatible with the downloaded version.
|
||||
|
||||
If a single version is specified, that version of the pack is
|
||||
downloaded, and a dependency is added to qlpack.yml that allows any
|
||||
version that is compatible with the specified version.
|
||||
|
||||
If a version range is specified, the latest version of the pack that
|
||||
satisfies the specified range is downloaded, and a dependency is added
|
||||
to qlpack.yml with the specified version range.
|
||||
|
||||
#### `--dir=<dir>`
|
||||
|
||||
@@ -82,6 +94,8 @@ Allow packs with pre-release version qualifiers (e.g.,
|
||||
`X.Y.Z-qualifier`) to be used. Without this flag, pre-release packs will
|
||||
be ignored.
|
||||
|
||||
Available since `v2.11.3`.
|
||||
|
||||
### Common options
|
||||
|
||||
#### `-h, --help`
|
||||
|
||||
@@ -33,6 +33,8 @@ codeql pack bundle [--output=<file.tgz>] [--threads=<num>] [--ram=<MB>] <options
|
||||
This command bundles a QL library pack from the contents of the current
|
||||
directory.
|
||||
|
||||
Available since `v2.6.3`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<dir>`
|
||||
|
||||
@@ -39,6 +39,8 @@ specified in the lock file are incompatible with the version constraints
|
||||
specified in the qlpack.yml file, or if no lock file is present, this
|
||||
command fails.
|
||||
|
||||
Available since `v2.12.4`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<dir>`
|
||||
@@ -59,6 +61,13 @@ Allow packs with pre-release version qualifiers (e.g.,
|
||||
`X.Y.Z-qualifier`) to be used. Without this flag, pre-release packs will
|
||||
be ignored.
|
||||
|
||||
Available since `v2.11.3`.
|
||||
|
||||
#### `--lock-override=<file>`
|
||||
|
||||
\[Advanced] Specifies an alternate lock file to use as the input to
|
||||
dependency resolution.
|
||||
|
||||
#### `--no-strict-mode`
|
||||
|
||||
\[Advanced] Turn off strict mode to avoid a warning when resolving
|
||||
|
||||
@@ -37,6 +37,8 @@ This command builds the complete contents of a QL package, including the
|
||||
original source code, library dependencies, compiled queries, and
|
||||
package metadata.
|
||||
|
||||
Available since `v2.6.0`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<dir>`
|
||||
|
||||
@@ -38,6 +38,8 @@ name or implicitly inside of a query suite (.qls) file.
|
||||
The packs will be downloaded and unzipped into the package cache by
|
||||
default.
|
||||
|
||||
Available since `v2.6.0`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<scope/name[@version]|suite.qls>...`
|
||||
@@ -68,6 +70,8 @@ Allow packs with pre-release version qualifiers (e.g.,
|
||||
`X.Y.Z-qualifier`) to be used. Without this flag, pre-release packs will
|
||||
be ignored.
|
||||
|
||||
Available since `v2.11.3`.
|
||||
|
||||
#### `-f, --[no-]force`
|
||||
|
||||
Allow overwriting already existing packs.
|
||||
|
||||
@@ -33,6 +33,8 @@ codeql pack init [--dir=<dir>] [--extractor=<extractor>] <options>... -- <packag
|
||||
The pack will be created in a child directory of the specified
|
||||
directory.
|
||||
|
||||
Available since `v2.6.0`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<package-name>`
|
||||
|
||||
@@ -40,6 +40,8 @@ dependencies, updating the lock file with the newly chosen versions. If
|
||||
no lock file is present, this command installs the latest compatible
|
||||
version of all dependencies, creating a new lock file.
|
||||
|
||||
Available since `v2.6.0`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<dir>`
|
||||
@@ -60,6 +62,13 @@ Allow packs with pre-release version qualifiers (e.g.,
|
||||
`X.Y.Z-qualifier`) to be used. Without this flag, pre-release packs will
|
||||
be ignored.
|
||||
|
||||
Available since `v2.11.3`.
|
||||
|
||||
#### `--lock-override=<file>`
|
||||
|
||||
\[Advanced] Specifies an alternate lock file to use as the input to
|
||||
dependency resolution.
|
||||
|
||||
#### `--no-strict-mode`
|
||||
|
||||
\[Advanced] Turn off strict mode to avoid a warning when resolving
|
||||
|
||||
@@ -35,6 +35,8 @@ codeql pack ls <options>... -- <dir>
|
||||
this directory. This directory must contain a qlpack.yml or
|
||||
.codeqlmanifest.json file.
|
||||
|
||||
Available since `v2.7.1`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<dir>`
|
||||
|
||||
@@ -37,6 +37,8 @@ This command determines the set of files to be included in the pack
|
||||
based on the patterns specified in any `.gitignore` files present in the
|
||||
pack or in an ancestor directory.
|
||||
|
||||
Available since `v2.6.0`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<dir>`
|
||||
|
||||
@@ -33,6 +33,8 @@ codeql pack publish [--dry-run] [--threads=<num>] [--ram=<MB>] [--pack=<folder>
|
||||
This command publishes a pack to a package registry. Before publishing,
|
||||
the pack is first compiled (if necessary) and bundled.
|
||||
|
||||
Available since `v2.6.0`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<dir>`
|
||||
@@ -95,6 +97,8 @@ Allow packs with pre-release version qualifiers (e.g.,
|
||||
`X.Y.Z-qualifier`) to be used. Without this flag, pre-release packs will
|
||||
be ignored.
|
||||
|
||||
Available since `v2.11.3`.
|
||||
|
||||
### Options for configuring which CodeQL packs to apply this command to.
|
||||
|
||||
#### `--format=<fmt>`
|
||||
|
||||
@@ -36,6 +36,8 @@ for this QL pack.
|
||||
This command searches the configured registries for required
|
||||
dependencies and returns the list of resolved dependencies.
|
||||
|
||||
Available since `v2.6.0`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<dir>`
|
||||
@@ -80,6 +82,8 @@ Allow packs with pre-release version qualifiers (e.g.,
|
||||
`X.Y.Z-qualifier`) to be used. Without this flag, pre-release packs will
|
||||
be ignored.
|
||||
|
||||
Available since `v2.11.3`.
|
||||
|
||||
#### `--no-strict-mode`
|
||||
|
||||
\[Advanced] Turn off strict mode to avoid a warning when resolving
|
||||
@@ -90,6 +94,11 @@ never downloaded
|
||||
|
||||
and will not be added to the package lock.
|
||||
|
||||
#### `--lock-override=<file>`
|
||||
|
||||
\[Advanced] Specifies an alternate lock file to use as the input to
|
||||
dependency resolution.
|
||||
|
||||
### Options for resolving QL packs outside of the package registry
|
||||
|
||||
#### `--search-path=<dir>[:<dir>...]`
|
||||
|
||||
@@ -37,6 +37,8 @@ This command installs the latest compatible version of each dependency
|
||||
of the pack, updating the lock file with the newly acquired versions.
|
||||
Any existing lock file is ignored.
|
||||
|
||||
Available since `v2.6.3`.
|
||||
|
||||
## Primary options
|
||||
|
||||
#### `<dir>`
|
||||
@@ -57,6 +59,13 @@ Allow packs with pre-release version qualifiers (e.g.,
|
||||
`X.Y.Z-qualifier`) to be used. Without this flag, pre-release packs will
|
||||
be ignored.
|
||||
|
||||
Available since `v2.11.3`.
|
||||
|
||||
#### `--lock-override=<file>`
|
||||
|
||||
\[Advanced] Specifies an alternate lock file to use as the input to
|
||||
dependency resolution.
|
||||
|
||||
#### `--no-strict-mode`
|
||||
|
||||
\[Advanced] Turn off strict mode to avoid a warning when resolving
|
||||
|
||||
@@ -65,6 +65,8 @@ changes to the QL source in favor of the precompiled version.
|
||||
Some rarely used compilation options are incompatible with this and will
|
||||
lead to a run-time error.
|
||||
|
||||
Available since `v2.12.0`.
|
||||
|
||||
#### `--[no-]dump-dil`
|
||||
|
||||
\[Advanced] Print the optimized DIL intermediate representation to
|
||||
@@ -115,9 +117,9 @@ How to handle warnings from the QL compiler. One of:
|
||||
|
||||
`error`: Treat warnings as errors.
|
||||
|
||||
#### `--[no-]debug-info`
|
||||
#### `--no-debug-info`
|
||||
|
||||
Emit source location info in RA for debugging.
|
||||
Don't emit source location info in RA for debugging.
|
||||
|
||||
#### `--[no-]fast-compilation`
|
||||
|
||||
@@ -142,9 +144,9 @@ improvements in the compiler early.
|
||||
|
||||
In releases where there are no recent improvements to enable, this
|
||||
option silently does nothing. Thus it is safe to set it once and for all
|
||||
in you global CodeQL config file.
|
||||
in your global CodeQL config file.
|
||||
|
||||
The newest features are always on by default in [codeql test run](/code-security/codeql-cli/codeql-cli-manual/test-run).
|
||||
Available since `v2.11.1`.
|
||||
|
||||
#### `--[no-]local-checking`
|
||||
|
||||
|
||||
@@ -205,9 +205,9 @@ How to handle warnings from the QL compiler. One of:
|
||||
|
||||
`error`: Treat warnings as errors.
|
||||
|
||||
#### `--[no-]debug-info`
|
||||
#### `--no-debug-info`
|
||||
|
||||
Emit source location info in RA for debugging.
|
||||
Don't emit source location info in RA for debugging.
|
||||
|
||||
#### `--[no-]fast-compilation`
|
||||
|
||||
@@ -232,9 +232,9 @@ improvements in the compiler early.
|
||||
|
||||
In releases where there are no recent improvements to enable, this
|
||||
option silently does nothing. Thus it is safe to set it once and for all
|
||||
in you global CodeQL config file.
|
||||
in your global CodeQL config file.
|
||||
|
||||
The newest features are always on by default in [codeql test run](/code-security/codeql-cli/codeql-cli-manual/test-run).
|
||||
Available since `v2.11.1`.
|
||||
|
||||
#### `--[no-]local-checking`
|
||||
|
||||
|
||||
@@ -125,6 +125,8 @@ Follow any symbolic links to their targets.
|
||||
|
||||
Find at most one match (as opposed to all matches).
|
||||
|
||||
Available since `v2.11.3`.
|
||||
|
||||
### Common options
|
||||
|
||||
#### `-h, --help`
|
||||
|
||||
@@ -215,6 +215,31 @@ variable.
|
||||
|
||||
This overrides the GITHUB\_TOKEN environment variable.
|
||||
|
||||
### Options to control query compilation
|
||||
|
||||
#### `--no-release-compatibility`
|
||||
|
||||
\[Advanced] Use the newest compiler features, at the cost of
|
||||
portability.
|
||||
|
||||
From time to time, new QL language features and evaluator optimizations
|
||||
will be supported by the QL evaluator a few releases before they are
|
||||
enabled by default in the QL compiler. This helps ensure that the
|
||||
performance you experience when developing queries in the newest CodeQL
|
||||
release can be matched by slightly older releases that may still be in
|
||||
use for Code Scanning or CI integrations.
|
||||
|
||||
If you do not care about your queries being compatible with other
|
||||
(earlier or later) CodeQL releases, you can sometimes achieve a small
|
||||
amount of extra performance by using this flag to enable recent
|
||||
improvements in the compiler early.
|
||||
|
||||
In releases where there are no recent improvements to enable, this
|
||||
option silently does nothing. Thus it is safe to set it once and for all
|
||||
in your global CodeQL config file.
|
||||
|
||||
Available since `v2.11.1`.
|
||||
|
||||
### Options that control the evaluation of test queries
|
||||
|
||||
#### `--[no-]tuple-counting`
|
||||
|
||||
@@ -37,7 +37,6 @@ changelog:
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
examples_source: data/product-examples/code-security/code-examples.yml
|
||||
layout: product-landing
|
||||
versions:
|
||||
fpt: '*'
|
||||
|
||||
@@ -37,7 +37,6 @@ redirect_from:
|
||||
- /github/developing-online-with-github-codespaces
|
||||
- /github/developing-online-with-codespaces
|
||||
layout: product-landing
|
||||
examples_source: data/product-examples/codespaces/code-examples.yml
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
|
||||
@@ -27,6 +27,10 @@ You can enable team synchronization between your IdP and {% data variables.produ
|
||||
|
||||
{% data reusables.identity-and-permissions.supported-idps-team-sync %}
|
||||
|
||||
{% ifversion team-sync-manage-org-invites %}
|
||||
{% data reusables.identity-and-permissions.team-sync-org-invites %}
|
||||
{% endif %}
|
||||
|
||||
{% data reusables.identity-and-permissions.sync-team-with-idp-group %}
|
||||
|
||||
You can also enable team synchronization for all organizations owned by an enterprise account. If SAML is configured at the enterprise level, you cannot enable team synchronization on an individual organization. Instead, you must configure team synchronization for the entire enterprise. For more information, see "[AUTOTITLE](/enterprise-cloud@latest/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise)."
|
||||
@@ -88,6 +92,15 @@ For help on provisioning users that have missing a missing SCIM linked identity,
|
||||
1. In the "URL" field, type the URL for your Okta instance.
|
||||
1. Review the identity provider tenant information you want to connect to your organization, then click **Create**.
|
||||
|
||||
{% ifversion team-sync-manage-org-invites %}
|
||||
## Managing whether team sync can invite non-members to your organization
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
{% data reusables.organizations.security %}
|
||||
1. Under "Team synchronization", select or deselect **Do not allow Team Sync to invite non-members to this organization.**
|
||||
{% endif %}
|
||||
|
||||
## Disabling team synchronization
|
||||
|
||||
{% data reusables.identity-and-permissions.team-sync-disable %}
|
||||
|
||||
@@ -28,6 +28,10 @@ Once a {% data variables.product.prodname_dotcom %} team is connected to an IdP
|
||||
|
||||
{% ifversion ghec %}{% data reusables.enterprise-accounts.team-sync-override %}{% endif %}
|
||||
|
||||
{% ifversion team-sync-manage-org-invites %}
|
||||
{% data reusables.identity-and-permissions.team-sync-org-invites %} For more information, see "[AUTOTITLE](/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization#managing-whether-team-synchronization-can-invite-non-members-to-your-organization)" and "[AUTOTITLE](/admin/identity-and-access-management/using-saml-for-enterprise-iam/managing-team-synchronization-for-organizations-in-your-enterprise#managing-whether-team-synchronization-can-invite-non-members-to-organizations)."
|
||||
{% endif %}
|
||||
|
||||
{% ifversion ghec %}
|
||||
All team membership changes made through your IdP will appear in the audit log on {% data variables.product.product_name %} as changes made by the team synchronization bot. Team synchronization will fetch group information from your IdP at least once every hour, and reflect any changes in IdP group membership into {% data variables.product.product_name %}.
|
||||
Connecting a team to an IdP group may remove some team members. For more information, see "[Requirements for members of synchronized teams](#requirements-for-members-of-synchronized-teams)."
|
||||
@@ -47,7 +51,10 @@ To manage repository access for any {% data variables.product.prodname_dotcom %}
|
||||
## Requirements for members of synchronized teams
|
||||
|
||||
After you connect a team to an IdP group, team synchronization will add each member of the IdP group to the corresponding team on {% data variables.product.product_name %} only if:
|
||||
- The person is a member of the organization on {% data variables.product.product_name %}.
|
||||
|
||||
{%- ifversion team-sync-manage-org-invites %}
|
||||
- If team synchronization is not allowed to invite non-members to your organization, the person is already a member of the organization on {% data variables.product.product_name %}.
|
||||
-{%- endif %}
|
||||
- The person has already logged in with their personal account on {% data variables.product.product_name %} and authenticated to the organization or enterprise account via SAML single sign-on at least once.
|
||||
- The person's SSO identity is a member of the IdP group.
|
||||
|
||||
|
||||
2
data/features/team-sync-manage-org-invites.yml
Normal file
2
data/features/team-sync-manage-org-invites.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
versions:
|
||||
ghec: '*'
|
||||
@@ -2,18 +2,15 @@
|
||||
|
||||
Pages that use the `product-landing` layout may optionally include an `Examples` section. Currently, we support three types of examples:
|
||||
|
||||
1. Code examples
|
||||
See https://docs.github.com/en/codespaces#code-examples.
|
||||
|
||||
2. Community examples
|
||||
1. Community examples
|
||||
See https://docs.github.com/en/discussions#community-examples.
|
||||
|
||||
3. User examples
|
||||
2. User examples
|
||||
See https://docs.github.com/en/sponsors#community-examples.
|
||||
|
||||
## How it works
|
||||
|
||||
Example data for each product is defined in `data/product-landing-examples`, in a subdirectory named for the **product** and a YML file named for the **example type** (e.g., `data/product-examples/sponsors/user-examples.yml` or `data/product-examples/codespaces/code-examples.yml`). We currently only support one type of example per product.
|
||||
Example data for each product is defined in `data/product-landing-examples`, in a subdirectory named for the **product** and a YML file named for the **example type** (e.g., `data/product-examples/sponsors/user-examples.yml` or `data/product-examples/discussions/community-examples.yml`). We currently only support one type of example per product.
|
||||
|
||||
### Versioning
|
||||
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
# Code scanning configurations
|
||||
- title: CodeQL code scanning at Microsoft
|
||||
description: Example code scanning workflow for the CodeQL action from the Microsoft Open Source repository.
|
||||
href: /microsoft/opensource.microsoft.com/blob/main/.github/workflows/codeql-analysis.yml
|
||||
languages:
|
||||
- javascript
|
||||
tags:
|
||||
- CodeQL
|
||||
- Code scanning
|
||||
- GitHub Actions
|
||||
- title: Adversarial Robustness Toolbox (ART) CodeQL code scanning
|
||||
description: Example code scanning workflow for the CodeQL action from the Trusted AI repository.
|
||||
href: /Trusted-AI/adversarial-robustness-toolbox/blob/main/.github/workflows/codeql-analysis.yml
|
||||
languages:
|
||||
- python
|
||||
tags:
|
||||
- CodeQL
|
||||
- Code scanning
|
||||
- GitHub Actions
|
||||
|
||||
# Security policies
|
||||
- title: Microsoft security policy template
|
||||
description: Example security policy
|
||||
href: /microsoft/repo-templates/blob/main/shared/SECURITY.md
|
||||
tags:
|
||||
- Security policy
|
||||
- title: Electron security policy
|
||||
description: Example security policy
|
||||
href: /electron/electron/blob/master/SECURITY.md
|
||||
tags:
|
||||
- Security policy
|
||||
|
||||
# Example of security advisory in a major product
|
||||
- title: Security advisory for Rails
|
||||
description: Security advisory published by Rails for CVE-2020-15169.
|
||||
href: /rails/rails/security/advisories/GHSA-cfjv-5498-mph5
|
||||
tags:
|
||||
- Security advisory
|
||||
|
||||
# Sample scripts for enabling Dependabot alerts and security updates across a whole organization
|
||||
- title: Enable Dependabot alerts and security updates automatically
|
||||
description: Sample scripts for enabling Dependabot alerts and security updates across an entire organization.
|
||||
href: /github/enable-security-alerts-sample
|
||||
tags:
|
||||
- Dependabot
|
||||
- Alerts
|
||||
- Security updates
|
||||
- Organization
|
||||
- Scripts
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.3'
|
||||
|
||||
# Dependabot configuration only relevant to GitHub.com and GHES 3.3+
|
||||
# Convert "languages" to "package-ecosystems" for Dependabot configurations
|
||||
- title: Super linter configuration
|
||||
description: Example Dependabot version updates configuration from the Super linter repository.
|
||||
href: /github/super-linter/blob/master/.github/dependabot.yml
|
||||
languages:
|
||||
- github-actions
|
||||
- npm
|
||||
- bundler
|
||||
- docker
|
||||
- pip
|
||||
tags:
|
||||
- Dependabot
|
||||
- Version updates
|
||||
- Configuration
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.3'
|
||||
|
||||
- title: Dependabot version update PR
|
||||
description: Example pull request generated by the Dependabot version updates configuration in the Super linter repository.
|
||||
href: /github/super-linter/pull/1398
|
||||
languages:
|
||||
tags:
|
||||
- Dependabot
|
||||
- Version updates
|
||||
- Pull requests
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.3'
|
||||
@@ -1,54 +0,0 @@
|
||||
- title: .NET sample project
|
||||
description: Try a .NET project with a custom dev container
|
||||
languages: .NET
|
||||
href: microsoft/vscode-remote-try-dotnet
|
||||
tags:
|
||||
- development containers
|
||||
- title: C++ sample project
|
||||
description: Try a C++ project with a custom dev container
|
||||
languages: C++
|
||||
href: microsoft/vscode-remote-try-cpp
|
||||
tags:
|
||||
- development containers
|
||||
- title: Java sample project
|
||||
description: Try a Java project with a custom dev container
|
||||
languages: Java
|
||||
href: microsoft/vscode-remote-try-java
|
||||
tags:
|
||||
- development containers
|
||||
- title: Node.js sample project
|
||||
description: Try a Node.js project with a custom dev container
|
||||
languages: Javascript
|
||||
href: microsoft/vscode-remote-try-node
|
||||
tags:
|
||||
- development containers
|
||||
- title: Go sample project
|
||||
description: Try a Go project with a custom dev container
|
||||
languages: Go
|
||||
href: microsoft/vscode-remote-try-go
|
||||
tags:
|
||||
- development containers
|
||||
- title: Python sample project
|
||||
description: Try a Python project with a custom dev container
|
||||
languages: Python
|
||||
href: microsoft/vscode-remote-try-python
|
||||
tags:
|
||||
- development containers
|
||||
- title: Rust sample project
|
||||
description: Try a Rust project with a custom dev container
|
||||
languages: Rust
|
||||
href: microsoft/vscode-remote-try-rust
|
||||
tags:
|
||||
- development containers
|
||||
- title: PHP sample project
|
||||
description: Try a PHP project with a custom dev container
|
||||
languages: PHP
|
||||
href: microsoft/vscode-remote-try-php
|
||||
tags:
|
||||
- development containers
|
||||
- title: Azure SQL and SQL Server sample project
|
||||
description: Try an Azure SQL or SQL Server project with a custom dev container
|
||||
languages: SQL
|
||||
href: microsoft/vscode-remote-try-sqlserver
|
||||
tags:
|
||||
- development containers
|
||||
@@ -0,0 +1 @@
|
||||
By default, team synchronization does not invite non-members to join organizations, which means that a user will only be successfully added to a team if they are already an organization member. If you prefer, you can allow team synchronization to invite non-members to join organizations.
|
||||
@@ -1,4 +1,3 @@
|
||||
import getApplicableVersions from '../../lib/get-applicable-versions.js'
|
||||
import { getDataByLanguage } from '../../lib/get-data.js'
|
||||
|
||||
function getProductExampleData(product, key, language) {
|
||||
@@ -34,23 +33,5 @@ export default async function productExamples(req, res, next) {
|
||||
currentLanguage
|
||||
)
|
||||
|
||||
const productCodeExamples = getProductExampleData(
|
||||
currentProduct,
|
||||
'code-examples',
|
||||
currentLanguage
|
||||
)
|
||||
|
||||
// We currently only support versioning in code examples.
|
||||
// TODO support versioning across all example types.
|
||||
req.context.productCodeExamples =
|
||||
productCodeExamples &&
|
||||
productCodeExamples.filter((example) => {
|
||||
// If an example block does NOT contain the versions prop, assume it's available in all versions
|
||||
return (
|
||||
!example.versions ||
|
||||
getApplicableVersions(example.versions).includes(req.context.currentVersion)
|
||||
)
|
||||
})
|
||||
|
||||
return next()
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ title: Code security documentation
|
||||
shortTitle: Code security
|
||||
intro: 'Code security'
|
||||
layout: product-landing
|
||||
examples_source: data/product-examples/code-security/code-examples.yml
|
||||
featuredLinks:
|
||||
startHere:
|
||||
- /code-security/getting-started/quickstart
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
# Code scanning configurations
|
||||
- title: CodeQL code scanning at Microsoft
|
||||
description: Example code scanning workflow for the CodeQL action from the Microsoft Open Source repository.
|
||||
href: /microsoft/opensource.microsoft.com/blob/main/.github/workflows/codeql-analysis.yml
|
||||
languages:
|
||||
- javascript
|
||||
tags:
|
||||
- CodeQL
|
||||
- Code scanning
|
||||
- GitHub Actions
|
||||
- title: Adversarial Robustness Toolbox (ART) CodeQL code scanning
|
||||
description: Example code scanning workflow for the CodeQL action from the Trusted AI repository.
|
||||
href: /Trusted-AI/adversarial-robustness-toolbox/blob/main/.github/workflows/codeql-analysis.yml
|
||||
languages:
|
||||
- python
|
||||
tags:
|
||||
- CodeQL
|
||||
- Code scanning
|
||||
- GitHub Actions
|
||||
|
||||
# Security policies
|
||||
- title: Microsoft security policy template
|
||||
description: Example security policy
|
||||
href: /microsoft/repo-templates/blob/main/shared/SECURITY.md
|
||||
tags:
|
||||
- Security policy
|
||||
- title: Electron security policy
|
||||
description: Example security policy
|
||||
href: /electron/electron/blob/master/SECURITY.md
|
||||
tags:
|
||||
- Security policy
|
||||
|
||||
# Example of security advisory in a major product
|
||||
- title: Security advisory for Rails
|
||||
description: Security advisory published by Rails for CVE-2020-15169.
|
||||
href: /rails/rails/security/advisories/GHSA-cfjv-5498-mph5
|
||||
tags:
|
||||
- Security advisory
|
||||
|
||||
# Sample scripts for enabling Dependabot alerts and security updates across a whole organization
|
||||
- title: Enable Dependabot alerts and security updates automatically
|
||||
description: Sample scripts for enabling Dependabot alerts and security updates across an entire organization.
|
||||
href: /github/enable-security-alerts-sample
|
||||
tags:
|
||||
- Dependabot
|
||||
- Alerts
|
||||
- Security updates
|
||||
- Organization
|
||||
- Scripts
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.3'
|
||||
|
||||
# Dependabot configuration only relevant to GitHub.com and GHES 3.3+
|
||||
# Convert "languages" to "package-ecosystems" for Dependabot configurations
|
||||
- title: Super linter configuration
|
||||
description: Example Dependabot version updates configuration from the Super linter repository.
|
||||
href: /github/super-linter/blob/master/.github/dependabot.yml
|
||||
languages:
|
||||
- github-actions
|
||||
- npm
|
||||
- bundler
|
||||
- docker
|
||||
- pip
|
||||
tags:
|
||||
- Dependabot
|
||||
- Version updates
|
||||
- Configuration
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.3'
|
||||
|
||||
- title: Dependabot version update PR
|
||||
description: Example pull request generated by the Dependabot version updates configuration in the Super linter repository.
|
||||
href: /github/super-linter/pull/1398
|
||||
languages:
|
||||
tags:
|
||||
- Dependabot
|
||||
- Version updates
|
||||
- Pull requests
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.3'
|
||||
@@ -160,34 +160,6 @@ test('navigate with side bar into article inside a map-topic inside a category',
|
||||
await expect(page).toHaveURL(/actions\/category\/map-topic\/article/)
|
||||
})
|
||||
|
||||
test('code examples search', async ({ page }) => {
|
||||
await page.goto('/code-security')
|
||||
const codeExampleResults = page.getByTestId('code-example-results')
|
||||
|
||||
// more results after clicking the 'Show more' button
|
||||
const initialResultsCount = (await codeExampleResults.getByRole('listitem').all()).length
|
||||
await page.getByTestId('code-examples-show-more').click()
|
||||
const showedMoreResultsCount = (await codeExampleResults.getByRole('listitem').all()).length
|
||||
expect(showedMoreResultsCount).toBeGreaterThan(initialResultsCount)
|
||||
|
||||
// search for the 2 'policy' code examples
|
||||
await page.getByTestId('code-examples-input').click()
|
||||
await page.getByTestId('code-examples-input').fill('policy')
|
||||
await page.getByTestId('code-examples-search-btn').click()
|
||||
expect((await codeExampleResults.getByRole('listitem').all()).length).toBe(2)
|
||||
await expect(codeExampleResults.getByText('Microsoft security policy template')).toBeVisible()
|
||||
await expect(codeExampleResults.getByText('Electron security policy')).toBeVisible()
|
||||
|
||||
// what happens when there's no search results
|
||||
await page.getByTestId('code-examples-input').click()
|
||||
await page.getByTestId('code-examples-input').fill('should be no results')
|
||||
await page.getByTestId('code-examples-search-btn').click()
|
||||
await expect(page.locator('#code-examples').getByText('Matches displayed: 0')).toBeVisible()
|
||||
await expect(
|
||||
page.locator('#code-examples').getByText('Sorry, there is no result for should be no results')
|
||||
).toBeVisible()
|
||||
})
|
||||
|
||||
test('hovercards', async ({ page }) => {
|
||||
await page.goto('/pages/quickstart')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user