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

Merge branch 'main' into codespaces-universe-megabranch

This commit is contained in:
hubwriter
2022-10-18 09:15:33 +01:00
651 changed files with 4123 additions and 3577 deletions

15
.github/actions/lib/action-context.js vendored Normal file
View File

@@ -0,0 +1,15 @@
import { readFileSync } from 'fs'
// Parses the action event payload sets repo and owner to an object from runner environment
export function getActionContext() {
const context = JSON.parse(readFileSync(process.env.GITHUB_EVENT_PATH, 'utf8'))
if (context.repository) {
context.owner = context.repository.owner.login
context.repo = context.repository.name
} else {
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/')
context.owner = owner
context.repo = repo
}
return context
}

32
.github/actions/lib/debug-time-taken.js vendored Normal file
View File

@@ -0,0 +1,32 @@
const timeInstances = new Map()
/* Meant to be called before debugTimeEnd with the same instanceName to behave like console.time() */
export function debugTimeStart(core, instanceName) {
if (timeInstances.has(instanceName)) {
core.warn(`instanceName: ${instanceName} has already been used for a debug instance.`)
return
}
timeInstances.set(instanceName, new Date())
}
/* Meant to be called after debugTimeStart with the same instanceName to behave like console.timeEnd() */
export function debugTimeEnd(core, instanceName) {
if (!timeInstances.has(instanceName)) {
core.warn(
`Invalid instanceName: ${instanceName} in debugTimeEnd. Did you call debugTimeStart first with the same instanceName?`
)
return
}
const startTime = timeInstances.get(instanceName)
const ms = new Date().getTime() - startTime.getTime()
const seconds = ms / 1000
const minutes = seconds / 60
let display = `${ms.toFixed(1)} ms`
if (minutes > 1) {
display = `${minutes.toFixed(1)} minutes`
} else if (seconds > 1) {
display = `${seconds.toFixed(1)} seconds`
}
core.debug(`Completed ${instanceName} in ${display}`)
}

18
.github/actions/lib/get-env-inputs.js vendored Normal file
View File

@@ -0,0 +1,18 @@
/*
* Validates and returns an object of expected environment variables
*
* @param {Array<string>} options - Array of environment variables expected
*
* @returns {Object} - key value of expected env variables and their values
*/
export function getEnvInputs(options) {
return Object.fromEntries(
options.map((envVarName) => {
const envVarValue = process.env[envVarName]
if (!envVarValue) {
throw new Error(`You must supply a ${envVarName} environment variable`)
}
return [envVarName, envVarValue]
})
)
}

16
.github/actions/lib/upload-artifact.js vendored Normal file
View File

@@ -0,0 +1,16 @@
/* eslint-disable import/no-extraneous-dependencies */
import fs from 'fs'
/* Writes string to file to be uploaded as an action artifact.
* Useful for debugging or passing results to downstream action
*
* @param {string} name - name of artifact
* @param {string} contents - string contents of artifact
*/
export async function uploadArtifact(name, contents) {
if (!fs.existsSync('./artifacts')) {
fs.mkdirSync('./artifacts/')
}
const filePath = `./artifacts/${name}`
fs.writeFileSync(filePath, contents)
}

View File

@@ -0,0 +1,987 @@
/* See function main in this file for documentation */
import fs from 'fs'
import path from 'path'
import cheerio from 'cheerio'
import coreLib from '@actions/core'
import got, { RequestError } from 'got'
import chalk from 'chalk'
import shortVersions from '../../middleware/contextualizers/short-versions.js'
import contextualize from '../../middleware/context.js'
import getRedirect from '../../lib/get-redirect.js'
import warmServer from '../../lib/warm-server.js'
import renderContent from '../../lib/render-content/index.js'
import { deprecated } from '../../lib/enterprise-server-releases.js'
import excludedLinks from '../../lib/excluded-links.js'
import { getEnvInputs } from './lib/get-env-inputs.js'
import { debugTimeEnd, debugTimeStart } from './lib/debug-time-taken.js'
import { uploadArtifact as uploadArtifactLib } from './lib/upload-artifact.js'
import github from '../../script/helpers/github.js'
import { getActionContext } from './lib/action-context.js'
const STATIC_PREFIXES = {
assets: path.resolve('assets'),
public: path.resolve(path.join('data', 'graphql')),
}
// Sanity check that these are valid paths
Object.entries(STATIC_PREFIXES).forEach(([key, value]) => {
if (!fs.existsSync(value)) {
throw new Error(`Can't find static prefix (${key}): ${value}`)
}
})
// Return a function that can as quickly as possible check if a certain
// href input should be skipped.
// Do this so we can use a `Set` and a `iterable.some()` for a speedier
// check.
function linksToSkipFactory() {
const set = new Set(excludedLinks.filter((regexOrURL) => typeof regexOrURL === 'string'))
const regexes = excludedLinks.filter((regexOrURL) => regexOrURL instanceof RegExp)
return (href) => set.has(href) || regexes.some((regex) => regex.test(href))
}
const linksToSkip = linksToSkipFactory(excludedLinks)
const CONTENT_ROOT = path.resolve('content')
const deprecatedVersionPrefixesRegex = new RegExp(
`enterprise(-server@|/)(${deprecated.join('|')})(/|$)`
)
// When this file is invoked directly from action as opposed to being imported
if (import.meta.url.endsWith(process.argv[1])) {
// Validate that required action inputs are present
getEnvInputs(['GITHUB_TOKEN'])
// Optional env vars
const {
ACTION_RUN_URL,
CREATE_REPORT,
CHECK_EXTERNAL_LINKS,
LEVEL,
SHOULD_COMMENT,
COMMENT_LIMIT_TO_EXTERNAL_LINKS,
FAIL_ON_FLAW,
FILES_CHANGED,
REPORT_REPOSITORY,
REPORT_AUTHOR,
REPORT_LABEL,
} = process.env
const octokit = github()
// Parse changed files JSON string
let files
if (FILES_CHANGED) {
const fileList = JSON.parse(FILES_CHANGED)
if (Array.isArray(fileList) && fileList.length > 0) {
files = fileList
} else {
console.warn(`No changed files found in PR: ${FILES_CHANGED}. Exiting...`)
process.exit(0)
}
}
const opts = {
level: LEVEL,
files,
verbose: true,
linkReports: true,
checkImages: true,
patient: true,
random: false,
language: 'en',
actionUrl: ACTION_RUN_URL,
checkExternalLinks: CHECK_EXTERNAL_LINKS === 'true',
shouldComment: SHOULD_COMMENT === 'true',
commentLimitToExternalLinks: COMMENT_LIMIT_TO_EXTERNAL_LINKS === 'true',
failOnFlaw: FAIL_ON_FLAW === 'true',
createReport: CREATE_REPORT === 'true',
reportRepository: REPORT_REPOSITORY,
reportLabel: REPORT_LABEL,
reportAuthor: REPORT_AUTHOR,
actionContext: getActionContext(),
}
main(coreLib, octokit, uploadArtifactLib, opts, {})
}
/*
* Renders all or specified pages to gather all links on them and verify them.
* Checks internal links deterministically using filesystem and external links via external requests.
* Links are considered broken for reporting and commenting if they are broken at the specified "level".
* e.g. redirects are considered a "warning" while 404s are considered "critical"
*
* When there are broken links (flaws) this action can:
* 1. Create a report issue in a specified reportRepository and link it to previous reportIssues
* 2. Create a comment similar to a report on a PR that triggered this action
* 3. Fail using core.setFailed when there are broken links
*
* opts:
* level {"warning" | "critical"} Counts links as "flaws" based on this value and status criteria
* files {Array<string>} - Limit link checking to specific files (usually changed in PR)
* language {string | Array<string>} - Render pages to check from included language (or languages array)
* checkExternalLinks {boolean} - Checks non docs.github.com urls (takes significantly longer)
* checkImages {boolean} - Check image src urls
* failOnFlaw {boolean} - When true will fail using core.setFailed when links are broken according to level (flaw)
* shouldComment {boolean} - When true attempts to comment flaws on PR that triggered action
* commentLimitToExternalLinks {boolean} - When true PR comment only includes external links
* createReport {boolean} - Creates an issue comment in reportRepository with links considered broken (flaws)
* linkReports {boolean} - When createReport is true, link the issue report to previous report(s) via comments
* reportRepository {string} - Repository in form of "owner/repo-name" that report issue will be created in
* reportLabel {string} - Label assigned to report issue,
* reportAuthor {string} - Expected author of previous report issue for linking reports (a bot user like Docubot)
* actionUrl {string} - Used to link report or comment to the action instance for debugging
* actionContext {object} - Event payload context when run from action or injected. Should include { repo, owner }
* verbose {boolean} - Set to true for more verbose logging
* random {boolean} - Randomize page order for debugging when true
* patient {boolean} - Wait longer and retry more times for rate-limited external URLS
*
*/
async function main(core, octokit, uploadArtifact, opts = {}) {
const {
level = 'warning',
files = [],
random,
language = 'en',
filter,
max,
verbose,
checkExternalLinks = false,
createReport = false,
failOnFlaw = false,
shouldComment = false,
} = opts
// Note! The reason we're using `warmServer()` in this script,
// even though there's no server involved, is because
// the `contextualize()` function calls it.
// And because warmServer() is actually idempotent, meaning it's
// cheap to call it more than once, it would be expensive to call it
// twice unnecessarily.
// If we'd manually do the same operations that `warmServer()` does
// here (e.g. `loadPageMap()`), we'd end up having to do it all over
// again, the next time `contextualize()` is called.
const { redirects, pages: pageMap, pageList } = await warmServer()
if (files.length) {
core.debug(`Limitting to files list: ${files.join(', ')}`)
}
let languages = language
if (!Array.isArray(languages)) {
languages = [languages]
}
const filters = filter || []
if (!Array.isArray(filters)) {
core.warning(`filters, ${filters} is not an array`)
}
if (random) {
shuffle(pageList)
}
debugTimeStart(core, 'getPages')
const pages = getPages(pageList, languages, filters, files, max)
debugTimeEnd(core, 'getPages')
if (checkExternalLinks && pages.length >= 100) {
core.warning(
`Warning! Checking external URLs can be time costly. You're testing ${pages.length} pages.`
)
}
debugTimeStart(core, 'processPages')
const flawsGroups = await Promise.all(
pages.map((page) => processPage(core, page, pageMap, redirects, opts))
)
debugTimeEnd(core, 'processPages')
const flaws = flawsGroups.flat()
printGlobalCacheHitRatio(core)
if (verbose) {
summarizeCounts(core, pages)
core.info(`Checked ${(globalCacheHitCount + globalCacheMissCount).toLocaleString()} links`)
}
summarizeFlaws(core, flaws)
if (flaws.length > 0) {
await uploadJsonFlawsArtifact(uploadArtifact, flaws, opts)
core.info(`All flaws written to artifact log.`)
if (createReport) {
core.info(`Creating issue for flaws...`)
const newReport = await createReportIssue(core, octokit, flaws, opts)
if (linkReports) {
await linkReports(core, octokit, newReport, opts)
}
}
if (shouldComment) {
await commentOnPR(core, octokit, flaws, opts)
}
const flawsInLevel = flaws.filter((flaw) => {
if (level === 'critical') {
return flaw?.flaw?.CRITICAL
}
// WARNING level and above
return true
})
if (flawsInLevel.length > 0) {
core.setOutput('has_flaws_at_level', flawsInLevel.length > 0)
if (failOnFlaw) {
core.setFailed(
`${flaws.length + 1} broken links found. See action artifact uploads for details`
)
}
}
}
}
async function createReportIssue(core, octokit, flaws, opts) {
const { reportRepository = 'github/docs-content', reportLabel = 'broken link report' } = opts
const [owner, repo] = reportRepository.split('/')
const brokenLinksDisplay = flawIssueDisplay(flaws, opts)
// Create issue with broken links
let newReport
try {
const { data } = await octokit.request('POST /repos/{owner}/{repo}/issues', {
owner,
repo,
title: `${flaws.length + 1} broken links found`,
body: brokenLinksDisplay,
labels: [reportLabel],
})
newReport = data
core.info(`Created broken links report at ${newReport.html_url}\n`)
} catch (error) {
core.error(error)
core.setFailed('Error creating new issue')
throw error
}
return newReport
}
async function linkReports(core, octokit, newReport, opts) {
const {
reportRepository = 'github/docs-content',
reportAuthor = 'docubot',
reportLabel = 'broken link report',
} = opts
const [owner, repo] = reportRepository.split('/')
core.debug('Attempting to link reports...')
// Find previous broken link report issue
let previousReports
try {
previousReports = await octokit.rest.issues.listForRepo({
owner,
repo,
creator: reportAuthor,
labels: reportLabel,
state: 'all', // We want to get the previous report, even if it is closed
sort: 'created',
direction: 'desc',
per_page: 25,
})
previousReports = previousReports.data
} catch (error) {
core.setFailed('Error listing issues for repo')
throw error
}
core.debug(`Found ${previousReports.length} previous reports`)
if (previousReports.length <= 1) {
core.info('No previous reports to link to')
return
}
// 2nd report should be most recent previous report
const previousReport = previousReports[1]
// Comment the old report link on the new report
try {
await octokit.rest.issues.createComment({
owner,
repo,
issue_number: newReport.number,
body: `⬅️ [Previous report](${previousReport.html_url})`,
})
core.info(`Linked old report to new report via comment on new report, #${newReport.number}`)
} catch (error) {
core.setFailed(`Error commenting on newReport, #${newReport.number}`)
throw error
}
// Comment on all previous reports that are still open
for (const previousReport of previousReports) {
if (previousReport.state === 'closed' || previousReport.html_url === newReport.html_url) {
continue
}
// If an old report is not assigned to someone we close it
const shouldClose = !previousReport.assignees.length
let body = `➡️ [Newer report](${newReport.html_url})`
if (shouldClose) {
body += '\n\nClosing in favor of newer report since there are no assignees on this issue'
}
try {
await octokit.rest.issues.createComment({
owner,
repo,
issue_number: previousReport.number,
body,
})
core.info(
`Linked old report to new report via comment on old report: #${previousReport.number}.`
)
} catch (error) {
core.setFailed(`Error commenting on previousReport, #${previousReport.number}`)
throw error
}
if (shouldClose) {
try {
await octokit.rest.issues.update({
owner,
repo,
issue_number: previousReport.number,
state: 'closed',
})
core.info(`Closing old report: #${previousReport.number} because it doesn't have assignees`)
} catch (error) {
core.setFailed(`Error closing previousReport, #${previousReport.number}`)
throw error
}
}
}
}
async function commentOnPR(core, octokit, flaws, opts) {
const { actionContext = {} } = opts
const { owner, repo } = actionContext
const pullNumber = actionContext?.pull_request?.number
if (!owner || !repo || !pullNumber) {
core.warning(`commentOnPR called outside of PR action runner context. Not creating comment.`)
return
}
const body = flawIssueDisplay(flaws, opts, false)
// Since failed external urls aren't included in PR comment, body may be empty
if (!body) {
core.info('No flaws qualify for comment')
return
}
try {
await octokit.rest.issues.createComment({
owner,
repo,
issue_number: pullNumber,
body,
})
core.info(`Created comment on PR: ${pullNumber}`)
} catch (error) {
core.setFailed(`Error commenting on PR when there are flaws`)
throw error
}
}
function flawIssueDisplay(flaws, opts, includeExternalLinkList = true) {
let output = ''
let flawsToDisplay = 0
// Group broken links for each page
const hrefsOnPageGroup = {}
for (const { page, permalink, href, text, src, flaw } of flaws) {
// When we don't want to include external links in PR comments
if (opts.commentLimitToExternalLinks && !flaw.isExternal) {
continue
}
flawsToDisplay++
const pageKey = page.fullPath
if (!hrefsOnPageGroup[pageKey]) {
hrefsOnPageGroup[pageKey] = {}
}
const linkKey = href || src
if (!hrefsOnPageGroup[pageKey][linkKey]) {
hrefsOnPageGroup[page.fullPath][linkKey] = { href, text, src, flaw, permalinkHrefs: [] }
}
if (!hrefsOnPageGroup[pageKey][linkKey].permalinkHrefs.includes(permalink.href)) {
hrefsOnPageGroup[pageKey][linkKey].permalinkHrefs.push(permalink.href)
}
}
// Don't comment if there are no qualifying flaws
if (!flawsToDisplay) {
return ''
}
// Build flaw display text
for (const [pagePath, pageHrefs] of Object.entries(hrefsOnPageGroup)) {
const fullPath = prettyFullPath(pagePath)
output += `\n\n### In \`${fullPath}\`\n`
for (const [, hrefObj] of Object.entries(pageHrefs)) {
if (hrefObj.href) {
output += `\n\n - Href: [${hrefObj.href}](${hrefObj.href})`
output += `\n - Text: ${hrefObj.text}`
} else if (hrefObj.src) {
output += `\n\n - Image src: [${hrefObj.src}](${hrefObj.src})`
} else {
output += `\n\n - WORKFLOW ERROR: Flaw has neither 'href' nor 'src'`
}
output += `\n - Flaw: \`${
hrefObj.flaw.CRITICAL ? hrefObj.flaw.CRITICAL : hrefObj.flaw.WARNING
}\``
output += `\n - On permalinks`
for (const permalinkHref of hrefObj.permalinkHrefs) {
output += `\n - \`${permalinkHref}\``
}
}
}
if (includeExternalLinkList) {
output +=
'\n\n## External URLs\n\nThe following external URLs must be verified manually. If an external URL gives a false negative, add it to the file `lib/excluded-links.js`\n\n'
for (const link of excludedLinks) {
if (typeof link === 'string') {
output += `\n - [${link}](${link})`
} else {
output += `\n - Pattern: \`${link.toString()}\``
}
}
}
return `${flawsToDisplay} broken${
opts.commentLimitToExternalLinks ? ' **external** ' : ' '
}links found in [this](${opts.actionUrl}) workflow.\n${output}`
}
function printGlobalCacheHitRatio(core) {
const hits = globalCacheHitCount
const misses = globalCacheMissCount
// It could be that the files that were tested didn't have a single
// link in them. In that case, there's no cache misses or hits at all.
// So avoid the division by zero.
if (misses + hits) {
core.debug(
`Cache hit ratio: ${hits.toLocaleString()} of ${(misses + hits).toLocaleString()} (${(
(100 * hits) /
(misses + hits)
).toFixed(1)}%)`
)
}
}
function getPages(pageList, languages, filters, files, max) {
return pageList
.filter((page) => {
if (languages.length && !languages.includes(page.languageCode)) {
return false
}
if (filters.length && !filters.find((filter) => page.relativePath.includes(filter))) {
return false
}
if (
files.length &&
// The reason for checking each file against the `relativePath`
// or the `fullPath` is to make it flexible for the user.
!files.find((file) => {
if (page.relativePath === file) return true
if (page.fullPath === file) return true
// The `page.relativePath` will always be *from* the containing
// directory it came from an might not be relative to the repo
// root. I.e.
// `content/education/quickstart.md` is the path relative to
// the repo root. But the `page.relativePath` will
// in this case be `education/quickstart.md`.
// So give it one last chance to relate to the repo root.
// This is important because you might use `git diff --name-only`
// to get the list of files to focus specifically on.
if (path.join(CONTENT_ROOT, page.relativePath) === path.resolve(file)) return true
return false
})
) {
return false
}
return true
})
.slice(0, max ? Math.min(max, pageList.length) : pageList.length)
}
async function processPage(core, page, pageMap, redirects, opts) {
const { verbose, verboseUrl } = opts
const allFlawsEach = await Promise.all(
page.permalinks.map((permalink) => {
return processPermalink(core, permalink, page, pageMap, redirects, opts)
})
)
const allFlaws = allFlawsEach.flat()
if (allFlaws.length > 0) {
if (verbose) {
printFlaws(core, allFlaws, { verboseUrl })
}
}
return allFlaws
}
async function processPermalink(core, permalink, page, pageMap, redirects, opts) {
const {
level = 'critical',
checkAnchors,
checkImages,
checkExternalLinks,
verbose,
patient,
} = opts
const html = await renderInnerHTML(page, permalink)
const $ = cheerio.load(html)
const flaws = []
const links = []
$('a[href]').each((i, link) => {
links.push(link)
})
const newFlaws = await Promise.all(
links.map(async (link) => {
const { href } = link.attribs
// The global cache can't be used for anchor links because they
// depend on each page it renders
if (!href.startsWith('#')) {
if (globalHrefCheckCache.has(href)) {
globalCacheHitCount++
return globalHrefCheckCache.get(href)
}
globalCacheMissCount++
}
const flaw = await checkHrefLink(
core,
href,
$,
redirects,
pageMap,
checkAnchors,
checkExternalLinks,
{ verbose, patient }
)
if (flaw) {
if (level === 'critical' && !flaw.CRITICAL) {
return
}
const text = $(link).text()
if (!href.startsWith('#')) {
globalHrefCheckCache.set(href, { href, flaw, text })
}
return { href, flaw, text }
} else {
if (!href.startsWith('#')) {
globalHrefCheckCache.set(href, flaw)
}
}
})
)
for (const flaw of newFlaws) {
if (flaw) {
flaws.push(Object.assign(flaw, { page, permalink }))
}
}
if (checkImages) {
$('img[src]').each((i, img) => {
let { src } = img.attribs
// Images get a cache-busting prefix injected in the image
// E.g. <img src="/assets/cb-123456/foo/bar.png">
// We need to remove that otherwise we can't look up the image
// on disk.
src = src.replace(/\/cb-\d+\//, '/')
if (globalImageSrcCheckCache.has(src)) {
globalCacheHitCount++
return globalImageSrcCheckCache.get(src)
}
const flaw = checkImageSrc(src, $)
globalImageSrcCheckCache.set(src, flaw)
if (flaw) {
if (level === 'critical' && !flaw.CRITICAL) {
return
}
flaws.push({ permalink, page, src, flaw })
}
})
}
return flaws
}
async function uploadJsonFlawsArtifact(
uploadArtifact,
flaws,
{ verboseUrl = null } = {},
artifactName = 'all-rendered-link-flaws.json'
) {
const printableFlaws = {}
for (const { page, permalink, href, text, src, flaw } of flaws) {
const fullPath = prettyFullPath(page.fullPath)
if (!(fullPath in printableFlaws)) {
printableFlaws[fullPath] = []
}
if (href) {
printableFlaws[fullPath].push({
href,
url: verboseUrl ? new URL(permalink.href, verboseUrl).toString() : permalink.href,
text,
flaw,
})
} else if (src) {
printableFlaws[fullPath].push({
src,
})
}
}
const message = JSON.stringify(printableFlaws, undefined, 2)
return uploadArtifact(artifactName, message)
}
function printFlaws(core, flaws, { verboseUrl = null } = {}) {
let previousPage = null
let previousPermalink = null
for (const { page, permalink, href, text, src, flaw } of flaws) {
const fullPath = prettyFullPath(page.fullPath)
if (page !== previousPage) {
core.info(`PAGE: ${chalk.bold(fullPath)}`)
}
previousPage = page
if (href) {
if (previousPermalink !== permalink.href) {
if (verboseUrl) {
core.info(` URL: ${new URL(permalink.href, verboseUrl).toString()}`)
} else {
core.info(` PERMALINK: ${permalink.href}`)
}
}
previousPermalink = permalink.href
core.info(` HREF: ${chalk.bold(href)}`)
core.info(` TEXT: ${text}`)
} else if (src) {
core.info(` IMG SRC: ${chalk.bold(src)}`)
} else {
throw new Error("Flaw has neither 'href' nor 'src'")
}
core.info(` FLAW: ${flaw.CRITICAL ? chalk.red(flaw.CRITICAL) : chalk.yellow(flaw.WARNING)}`)
}
}
// Given a full path, change to so it's relative to the `cwd()` so that you
// can take it from the output and paste it to something like `code ...here...`
// The problem with displaying the full path is that it's quite noisy and
// takes up a lot of space. Sure, you can copy and paste it in front of
// `vi` or `ls` or `code` but if we display it relative to `cwd()` you
// can still paste it to the next command but it's not taking up so much
// space.
function prettyFullPath(fullPath) {
return path.relative(process.cwd(), fullPath)
}
const globalHrefCheckCache = new Map()
const globalImageSrcCheckCache = new Map()
let globalCacheHitCount = 0
let globalCacheMissCount = 0
async function checkHrefLink(
core,
href,
$,
redirects,
pageMap,
checkAnchors = false,
checkExternalLinks = false,
{ verbose = false, patient = false } = {}
) {
if (href === '#') {
if (checkAnchors) {
return { WARNING: 'Link is just an empty `#`' }
}
} else if (href.startsWith('#')) {
if (checkAnchors) {
const countDOMItems = $(href).length
if (countDOMItems !== 1) {
return { WARNING: `Anchor is an empty string` }
}
}
} else if (href.startsWith('/')) {
const pathname = new URL(href, 'http://example.com').pathname
// Remember, if the Markdown has something like
//
// See [my link][/some/page/]
//
// In the post-processing, that will actually become
//
// See <a href="/en/some/page">my link</a>
//
// But, if that link was a redirect, that would have been left
// untouched.
if (pathname.endsWith('/')) {
return { WARNING: 'Links with a trailing / will always redirect' }
} else {
if (pathname.split('/')[1] in STATIC_PREFIXES) {
const staticFilePath = path.join(
STATIC_PREFIXES[pathname.split('/')[1]],
pathname.split(path.sep).slice(2).join(path.sep)
)
if (!fs.existsSync(staticFilePath)) {
return { CRITICAL: `Static file not found ${staticFilePath} (${pathname})` }
}
} else if (getRedirect(pathname, { redirects, pages: pageMap })) {
return { WARNING: `Redirect to ${getRedirect(pathname, { redirects, pages: pageMap })}` }
} else if (!pageMap[pathname]) {
if (deprecatedVersionPrefixesRegex.test(pathname)) {
return
}
return { CRITICAL: 'Broken link' }
}
}
} else if (checkExternalLinks) {
if (!href.startsWith('https://')) {
return { WARNING: `Will not check external URLs that are not HTTPS (${href})` }
}
if (linksToSkip(href)) {
return
}
const { ok, ...info } = await checkExternalURL(core, href, { verbose, patient })
if (!ok) {
return { CRITICAL: `Broken external link (${JSON.stringify(info)})`, isExternal: true }
}
}
}
const _fetchCache = new Map()
async function checkExternalURL(core, url, { verbose = false, patient = false } = {}) {
if (!url.startsWith('https://')) throw new Error('Invalid URL')
const cleanURL = url.split('#')[0]
if (!_fetchCache.has(cleanURL)) {
_fetchCache.set(cleanURL, innerFetch(core, cleanURL, { verbose, patient }))
}
return _fetchCache.get(cleanURL)
}
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
// Global for recording which domains we get rate-limited on.
// For example, if you got rate limited on `something.github.com/foo`
// and now we're asked to fetch for `something.github.com/bar`
// it's good to know to now bother yet.
const _rateLimitedDomains = new Map()
async function innerFetch(core, url, config = {}) {
const { verbose, useGET, patient } = config
const { hostname } = new URL(url)
if (_rateLimitedDomains.has(hostname)) {
await sleep(_rateLimitedDomains.get(hostname))
}
// The way `got` does retries:
//
// sleep = 1000 * Math.pow(2, retry - 1) + Math.random() * 100
//
// So, it means:
//
// 1. ~1000ms
// 2. ~2000ms
// 3. ~4000ms
//
// ...if the limit we set is 3.
// Our own timeout, in ./middleware/timeout.js defaults to 10 seconds.
// So there's no point in trying more attempts than 3 because it would
// just timeout on the 10s. (i.e. 1000 + 2000 + 4000 + 8000 > 10,000)
const retry = {
limit: patient ? 5 : 2,
}
const timeout = { request: patient ? 10000 : 2000 }
const headers = {
'User-Agent':
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',
}
const retries = config.retries || 0
const httpFunction = useGET ? got.get : got.head
if (verbose) core.info(`External URL ${useGET ? 'GET' : 'HEAD'}: ${url} (retries: ${retries})`)
try {
const r = await httpFunction(url, {
headers,
throwHttpErrors: false,
retry,
timeout,
})
if (verbose) {
core.info(
`External URL ${useGET ? 'GET' : 'HEAD'} ${url}: ${r.statusCode} (retries: ${retries})`
)
}
// If we get rate limited, remember that this hostname is now all
// rate limited. And sleep for the number of seconds that the
// `retry-after` header indicated.
if (r.statusCode === 429) {
let sleepTime = Math.min(
60_000,
Math.max(10_000, getRetryAfterSleep(r.headers['retry-after']))
)
// Sprinkle a little jitter so it doesn't all start again all
// at the same time
sleepTime += Math.random() * 10 * 1000
// Give it a bit extra when we can be really patient
if (patient) sleepTime += 30 * 1000
_rateLimitedDomains.set(hostname, sleepTime + Math.random() * 10 * 1000)
if (verbose)
core.info(
chalk.yellow(
`Rate limited on ${hostname} (${url}). Sleeping for ${(sleepTime / 1000).toFixed(1)}s`
)
)
await sleep(sleepTime)
return innerFetch(core, url, Object.assign({}, config, { retries: retries + 1 }))
} else {
_rateLimitedDomains.delete(hostname)
}
// Perhaps the server doesn't support HEAD requests.
// If so, try again with a regular GET.
if ((r.statusCode === 405 || r.statusCode === 404 || r.statusCode === 403) && !useGET) {
return innerFetch(core, url, Object.assign({}, config, { useGET: true }))
}
if (verbose) {
core.info((r.ok ? chalk.green : chalk.red)(`${r.statusCode} on ${url}`))
}
return { ok: r.ok, statusCode: r.statusCode }
} catch (err) {
if (err instanceof RequestError) {
if (verbose) {
core.info(chalk.yellow(`RequestError (${err.message}) on ${url}`))
}
return { ok: false, requestError: err.message }
}
throw err
}
}
// Return number of milliseconds from a `Retry-After` header value
function getRetryAfterSleep(headerValue) {
if (!headerValue) return 0
let ms = Math.round(parseFloat(headerValue) * 1000)
if (isNaN(ms)) {
ms = Math.max(0, new Date(headerValue) - new Date())
}
return ms
}
function checkImageSrc(src, $) {
const pathname = new URL(src, 'http://example.com').pathname
if (!pathname.startsWith('/')) {
return { WARNING: "External images can't not be checked" }
}
const prefix = pathname.split('/')[1]
if (prefix in STATIC_PREFIXES) {
const staticFilePath = path.join(
STATIC_PREFIXES[prefix],
pathname.split(path.sep).slice(2).join(path.sep)
)
if (!fs.existsSync(staticFilePath)) {
return { CRITICAL: `Static file not found (${pathname})` }
}
} else {
return { WARNING: `Unrecognized image src prefix (${prefix})` }
}
}
function summarizeFlaws(core, flaws) {
if (flaws.length) {
core.info(
chalk.bold(
`Found ${flaws.length.toLocaleString()} flaw${flaws.length === 1 ? '' : 's'} in total.`
)
)
} else {
core.info(chalk.green('No flaws found! 💖'))
}
}
function summarizeCounts(core, pages) {
const count = pages.map((page) => page.permalinks.length).reduce((a, b) => a + b, 0)
core.info(
`Tested ${count.toLocaleString()} permalinks across ${pages.length.toLocaleString()} pages`
)
}
function shuffle(array) {
let currentIndex = array.length
let randomIndex
// While there remain elements to shuffle...
while (currentIndex !== 0) {
// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex)
currentIndex--
// And swap it with the current element.
;[array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]]
}
return array
}
async function renderInnerHTML(page, permalink) {
const next = () => {}
const res = {}
const pagePath = permalink.href
const req = {
path: pagePath,
language: permalink.languageCode,
pagePath,
cookies: {},
}
await contextualize(req, res, next)
await shortVersions(req, res, next)
const context = Object.assign({}, req.context, { page })
context.relativePath = page.relativePath
return await renderContent(page.markdown, context)
}
export default main

View File

@@ -45,7 +45,7 @@ jobs:
# Ensure this is actually a pull request and not a merge group # Ensure this is actually a pull request and not a merge group
# If its a merge group, report success without doing anything # If its a merge group, report success without doing anything
# See https://bit.ly/3qB9nZW > If a job in a workflow is skipped due to a conditional, it will report its status as "Success". # See https://bit.ly/3qB9nZW > If a job in a workflow is skipped due to a conditional, it will report its status as "Success".
if: (github.event.pull_request.head.sha || github.event.inputs.COMMIT_REF) && (github.event.number || github.event.inputs.PR_NUMBER || github.run_id) if: ((github.event.pull_request.head.sha || github.event.inputs.COMMIT_REF) && (github.event.number || github.event.inputs.PR_NUMBER || github.run_id)) && (github.repository == 'github/docs-internal' || github.repository == 'github/docs')
timeout-minutes: 15 timeout-minutes: 15
environment: environment:
name: preview-env-${{ github.event.number }} name: preview-env-${{ github.event.number }}
@@ -77,7 +77,7 @@ jobs:
password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }} password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@f211e3e9ded2d9377c8cadc4489a4e38014bc4c9 uses: docker/setup-buildx-action@95cb08cb2672c73d4ffd2f422e6d11953d2a9c70
- if: ${{ env.IS_PUBLIC_BUILD == 'true' }} - if: ${{ env.IS_PUBLIC_BUILD == 'true' }}
name: Check out main branch name: Check out main branch

View File

@@ -28,6 +28,7 @@ jobs:
destory-azure-preview-env: destory-azure-preview-env:
name: Destroy name: Destroy
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
timeout-minutes: 5 timeout-minutes: 5
env: env:
PR_NUMBER: ${{ github.event.number || github.event.inputs.PR_NUMBER }} PR_NUMBER: ${{ github.event.number || github.event.inputs.PR_NUMBER }}

View File

@@ -46,7 +46,7 @@ jobs:
password: ${{ secrets.PROD_REGISTRY_PASSWORD }} password: ${{ secrets.PROD_REGISTRY_PASSWORD }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@f211e3e9ded2d9377c8cadc4489a4e38014bc4c9 uses: docker/setup-buildx-action@95cb08cb2672c73d4ffd2f422e6d11953d2a9c70
- name: Check out repo - name: Check out repo
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
@@ -62,7 +62,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Clone docs-early-access - name: Clone docs-early-access

View File

@@ -57,7 +57,7 @@ jobs:
password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }} password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@f211e3e9ded2d9377c8cadc4489a4e38014bc4c9 uses: docker/setup-buildx-action@95cb08cb2672c73d4ffd2f422e6d11953d2a9c70
- name: Check out repo - name: Check out repo
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
@@ -80,7 +80,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Clone docs-early-access - name: Clone docs-early-access

View File

@@ -32,6 +32,7 @@ env:
jobs: jobs:
build: build:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }} runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }}
steps: steps:
- name: Install a local Elasticsearch for testing - name: Install a local Elasticsearch for testing
@@ -58,7 +59,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -1,162 +0,0 @@
name: Check all English links
# **What it does**: This script once a day checks all English links and reports in issues.
# **Why we have it**: We want to know if any links break.
# **Who does it impact**: Docs content.
on:
workflow_dispatch:
schedule:
- cron: '40 19 * * *' # once a day at 19:40 UTC / 11:40 PST
permissions:
contents: read
issues: write
jobs:
check_all_english_links:
name: Check all links
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-20.04-xl
env:
GITHUB_TOKEN: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
FIRST_RESPONDER_PROJECT: Docs content first responder
REPORT_AUTHOR: docubot
REPORT_LABEL: broken link report
REPORT_REPOSITORY: github/docs-content
steps:
- name: Check that gh CLI is installed
run: gh --version
- name: Check out repo's default branch
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with:
node-version: '16.15.0'
cache: npm
- name: Install dependencies
run: npm ci
- name: Cache nextjs build
uses: actions/cache@48af2dc4a9e8278b89d7fa154b955c30c6aaab09
with:
path: .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
- name: Build server
run: npm run build
- name: Start server in the background
env:
NODE_ENV: production
PORT: 4000
# We don't want or need the changelog entries in this context.
CHANGELOG_DISABLED: true
# The default is 10s. But because this runs overnight, we can
# be a lot more patient.
REQUEST_TIMEOUT: 20000
# Don't care about CDN caching image URLs
DISABLE_REWRITE_ASSET_URLS: true
run: |
node server.js > /tmp/stdout.log 2> /tmp/stderr.log &
sleep 6
curl --retry-connrefused --retry 5 -I http://localhost:4000/
- if: ${{ failure() }}
name: Debug server outputs on errors
run: |
echo "____STDOUT____"
cat /tmp/stdout.log
echo "____STDERR____"
cat /tmp/stderr.log
- name: Run script
timeout-minutes: 120
env:
# The default is 300 which works OK on a fast macbook pro
# but not so well in Actions.
LINKINATOR_CONCURRENCY: 100
LINKINATOR_LOG_FILE_PATH: linkinator.log
run: |
script/check-english-links.js > broken_links.md
# check-english-links.js returns 0 if no links are broken, and 1 if any links
# are broken. When an Actions step's exit code is 1, the action run's job status
# is failure and the run ends. The following steps create an issue for the
# broken link report only if any links are broken, so `if: ${{ failure() }}`
# ensures the steps run despite the previous step's failure of the job.
#
# https://docs.github.com/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions
- uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
with:
name: linkinator_log
path: linkinator.log
- uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535
if: ${{ failure() }}
with:
name: broken_links
path: ./broken_links.md
- if: ${{ failure() }}
name: Get title for issue
id: check
run: echo "::set-output name=title::$(head -1 broken_links.md)"
- if: ${{ failure() }}
name: Create issue from file
id: broken-link-report
uses: peter-evans/create-issue-from-file@b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e
with:
token: ${{ env.GITHUB_TOKEN }}
title: ${{ steps.check.outputs.title }}
content-filepath: ./broken_links.md
repository: ${{ env.REPORT_REPOSITORY }}
labels: ${{ env.REPORT_LABEL }}
- if: ${{ failure() }}
name: Close and/or comment on old issues
env:
NEW_REPORT_URL: 'https://github.com/${{ env.REPORT_REPOSITORY }}/issues/${{ steps.broken-link-report.outputs.issue-number }}'
run: |
gh alias set list-reports "issue list \
--repo ${{ env.REPORT_REPOSITORY }} \
--author ${{ env.REPORT_AUTHOR }} \
--label '${{ env.REPORT_LABEL }}'"
# Link to the previous report from the new report that triggered this
# workflow run.
previous_report_url=$(gh list-reports \
--state all \
--limit 2 \
--json url \
--jq '.[].url' \
| grep -v ${{ env.NEW_REPORT_URL }} | head -1)
gh issue comment ${{ env.NEW_REPORT_URL }} --body "⬅️ [Previous report]($previous_report_url)"
# If an old report is open and assigned to someone, link to the newer
# report without closing the old report.
for issue_url in $(gh list-reports \
--json assignees,url \
--jq '.[] | select (.assignees != []) | .url'); do
if [ "$issue_url" != "${{ env.NEW_REPORT_URL }}" ]; then
gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})"
fi
done
# Link to the newer report from any older report that is still open,
# then close the older report and remove it from the first responder's
# project board.
for issue_url in $(gh list-reports \
--search 'no:assignee' \
--json url \
--jq '.[].url'); do
if [ "$issue_url" != "${{ env.NEW_REPORT_URL }}" ]; then
gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})"
gh issue close $issue_url
gh issue edit $issue_url --remove-project "${{ env.FIRST_RESPONDER_PROJECT }}"
fi
done

View File

@@ -55,7 +55,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Merge docs-early-access repo's folders - name: Merge docs-early-access repo's folders

View File

@@ -31,6 +31,7 @@ concurrency:
jobs: jobs:
lint: lint:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repo - name: Check out repo
@@ -39,7 +40,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -19,7 +19,7 @@ concurrency:
jobs: jobs:
PR-Preview-Links: PR-Preview-Links:
if: github.event.pull_request.user.login != 'Octomerger' if: github.event.pull_request.user.login != 'Octomerger' && (github.repository == 'github/docs-internal' || github.repository == 'github/docs')
name: Add staging/live links to PR name: Add staging/live links to PR
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
@@ -59,7 +59,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install temporary dependencies - name: Install temporary dependencies

View File

@@ -25,7 +25,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -41,7 +41,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install Node.js dependencies - name: Install Node.js dependencies

View File

@@ -52,7 +52,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -1,106 +0,0 @@
name: 'Link Checker: All English'
# **What it does**: Renders the content of every page and check all internal links.
# **Why we have it**: To make sure all links connect correctly.
# **Who does it impact**: Docs content.
on:
workflow_dispatch:
merge_group:
push:
branches:
- main
pull_request:
permissions:
contents: read
# Needed for the 'trilom/file-changes-action' action
pull-requests: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
check-links:
runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }}
steps:
- name: Checkout
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with:
node-version: '16.15.0'
cache: npm
- name: Install
run: npm ci
- name: Gather files changed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.pull_request.number }}
HEAD: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
run: |
# Find the file diff in the pull request or merge group
# If its a pull request, use the faster call to the GitHub API
# For push, workflow_dispatch, and merge_group, use git diff
if [ -n "$PR" ]
then
echo __ running gh pr diff __
DIFF=`gh pr diff $PR --name-only`
elif [ -n "$HEAD" ]
then
echo __ running git fetch main __
git fetch origin main --depth 1
echo __ running git diff __
DIFF=`git diff --name-only origin/main`
else
echo __ no head, empty diff __
DIFF=''
fi
# So we can inspect the output
echo __ DIFF found __
echo $DIFF
# Formats into single line JSON array, removing any empty strings
echo __ format, write to files.json __
echo $DIFF | \
tr ' ' '\n' | \
jq --raw-input | \
jq --slurp --compact-output 'map(select(length > 0))' \
> $HOME/files.json
- name: Link check (warnings, changed files)
env:
# Don't care about CDN caching image URLs
DISABLE_REWRITE_ASSET_URLS: true
run: |
# Note as of Aug 2022, we *don't* check external links
# on the pages you touched in the PR. We could enable that
# but it has the added risk of false positives blocking CI.
# We are using this script for the daily/nightly checker that
# checks external links too. Once we're confident it really works
# well, we can consider enabling it here on every content PR too.
./script/rendered-content-link-checker.js \
--language en \
--max 100 \
--check-anchors \
--check-images \
--verbose \
--list $HOME/files.json
- name: Link check (critical, all files)
env:
# Don't care about CDN caching image URLs
DISABLE_REWRITE_ASSET_URLS: true
run: |
./script/rendered-content-link-checker.js \
--language en \
--exit \
--verbose \
--check-images \
--level critical

55
.github/workflows/link-check-daily.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: 'Link Checker: Daily'
# **What it does**: This script once a day checks all English links and reports in issue if any are broken.
# **Why we have it**: We want to know if any links break internally or externally.
# **Who does it impact**: Docs content.
on:
workflow_dispatch:
schedule:
- cron: '40 19 * * *' # once a day at 19:40 UTC / 11:40 PST
permissions:
contents: read
issues: write
jobs:
check_all_english_links:
name: Check all links
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-20.04-xl
steps:
- name: Check that gh CLI is installed
run: gh --version
- name: Check out repo's default branch
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with:
node-version: '16.15.0'
cache: npm
- name: Install dependencies
run: npm ci
- name: Run link checker
env:
LEVEL: 'critical'
# Set this to true in repo scope to enable debug logs
# ACTIONS_RUNNER_DEBUG = true
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_FR }}
REPORT_AUTHOR: docubot
REPORT_LABEL: broken link report
REPORT_REPOSITORY: github/docs-content
CREATE_REPORT: true
CHECK_EXTERNAL_LINKS: true
timeout-minutes: 30
run: node .github/actions/rendered-content-link-checker.js
- name: Upload artifact(s)
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8
with:
name: artifacts
path: ./artifacts

89
.github/workflows/link-check-on-pr.yml vendored Normal file
View File

@@ -0,0 +1,89 @@
name: 'Link Checker: On PR'
# **What it does**: Renders the content of every page and check all internal links on PR.
# **Why we have it**: To make sure all links connect correctly on changed files.
# **Who does it impact**: Docs content.
on:
workflow_dispatch:
merge_group:
push:
branches:
- main
pull_request:
permissions:
contents: read
# TODO: Uncomment if we uncomment below
# Needed for the 'trilom/file-changes-action' action
# pull-requests: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
check-links:
runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }}
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
steps:
- name: Checkout
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
- name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with:
node-version: '16.15.0'
cache: npm
- name: Install
run: npm ci
# TODO: When we want to fix redirects on changed files we can uncomment everything below
# Creates file "${{ env.HOME }}/files.json", among others
# - name: Gather files changed
# if: github.event_name != 'merge_group'
# id: file_changes
# uses: trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b
# with:
# fileOutput: 'json'
# For verification
# - name: Show files changed (debug)
# if: github.event_name != 'merge_group'
# run: cat $HOME/files.json
# - name: Link check changed pages (external links only)
# if: github.event_name != 'merge_group'
# id: changed_links
# env:
# LEVEL: 'warning'
# FILES_CHANGED: ${{ steps.file_changes.outputs.files }}
# ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
# GITHUB_TOKEN: ${{ secrets.DOCS_BOT_FR }}
# SHOULD_COMMENT: true
# CREATE_REPORT: false
# run: node .github/actions/rendered-content-link-checker.js
- name: Link check all pages (internal links only)
id: all_links
env:
LEVEL: 'critical'
ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_FR }}
SHOULD_COMMENT: true
CHECK_EXTERNAL_LINKS: false
CREATE_REPORT: false
run: node .github/actions/rendered-content-link-checker.js
- name: Upload artifact(s)
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8
with:
name: artifacts
path: ./artifacts
- name: Fail if either check has broken links in its level
if: ${{ steps.changed_links.outputs.has_flaws_at_level == 'true' || steps.all_links.outputs.has_flaws_at_level == 'true' }}
run: |
exit 1

View File

@@ -42,7 +42,7 @@ jobs:
password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }} password: ${{ secrets.NONPROD_REGISTRY_PASSWORD }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@f211e3e9ded2d9377c8cadc4489a4e38014bc4c9 uses: docker/setup-buildx-action@95cb08cb2672c73d4ffd2f422e6d11953d2a9c70
- name: Check out repo - name: Check out repo
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748

View File

@@ -107,7 +107,7 @@ jobs:
- name: 'Setup node' - name: 'Setup node'
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
- run: npm ci - run: npm ci

View File

@@ -21,6 +21,7 @@ permissions:
jobs: jobs:
noResponse: noResponse:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
steps: steps:
- uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb - uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb
with: with:

View File

@@ -24,7 +24,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -44,7 +44,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -45,7 +45,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -27,7 +27,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install - name: Install

View File

@@ -49,7 +49,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -22,6 +22,7 @@ concurrency:
jobs: jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
steps: steps:
- name: Check out repo - name: Check out repo
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
@@ -29,7 +30,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
- name: Run check - name: Run check
run: | run: |

View File

@@ -25,7 +25,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -29,7 +29,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: npm ci - name: npm ci
run: npm ci run: npm ci

View File

@@ -104,7 +104,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci

View File

@@ -44,7 +44,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -58,7 +58,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -31,6 +31,7 @@ env:
jobs: jobs:
lint: lint:
runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }} runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }}
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
steps: steps:
- uses: getong/elasticsearch-action@95b501ab0c83dee0aac7c39b7cea3723bef14954 - uses: getong/elasticsearch-action@95b501ab0c83dee0aac7c39b7cea3723bef14954
with: with:
@@ -48,7 +49,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -29,6 +29,7 @@ env:
jobs: jobs:
test: test:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
# Run on ubuntu-20.04-xl if the private repo or ubuntu-latest if the public repo # Run on ubuntu-20.04-xl if the private repo or ubuntu-latest if the public repo
# See pull # 17442 in the private repo for context # See pull # 17442 in the private repo for context
runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }} runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }}
@@ -164,7 +165,7 @@ jobs:
- name: Setup node - name: Setup node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -67,7 +67,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install dependencies - name: Install dependencies

View File

@@ -36,7 +36,7 @@ jobs:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
with: with:
node-version: '16.15.0' node-version: '16.17.0'
cache: npm cache: npm
- name: Install Node.js dependencies - name: Install Node.js dependencies
run: npm ci run: npm ci

3
.gitignore vendored
View File

@@ -26,3 +26,6 @@ lib/redirects/.redirects-cache*.json
# During the preview deploy untrusted user code may be cloned into this directory # During the preview deploy untrusted user code may be cloned into this directory
# We ignore it from git to keep things deterministic # We ignore it from git to keep things deterministic
user-code/ user-code/
# Logs from scripts
script/logs/

View File

@@ -64,7 +64,7 @@ For more information about using a codespace for working on GitHub documentation
### Commit your update ### Commit your update
Commit the changes once you are happy with them. See [Atom's contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#git-commit-messages) to know how to use emoji for commit messages. Commit the changes once you are happy with them. See [Atom's contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md#git-commit-messages) to know how to use emojis for commit messages.
Once your changes are ready, don't forget to [self-review](/contributing/self-review.md) to speed up the review process:zap:. Once your changes are ready, don't forget to [self-review](/contributing/self-review.md) to speed up the review process:zap:.
@@ -74,7 +74,7 @@ When you're finished with the changes, create a pull request, also known as a PR
- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request. - Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
- Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one. - Don't forget to [link PR to issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if you are solving one.
- Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge. - Enable the checkbox to [allow maintainer edits](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork) so the branch can be updated for a merge.
Once you submit your PR, a Docs team member will review your proposal. We may ask questions or request for additional information. Once you submit your PR, a Docs team member will review your proposal. We may ask questions or request additional information.
- We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch. - We may ask for changes to be made before a PR can be merged, either using [suggested changes](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request) or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
- As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations). - As you update your PR and apply changes, mark each conversation as [resolved](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#resolving-conversations).
- If you run into any merge issues, checkout this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve merge conflicts and other issues. - If you run into any merge issues, checkout this [git tutorial](https://github.com/skills/resolve-merge-conflicts) to help you resolve merge conflicts and other issues.
@@ -91,9 +91,9 @@ Now that you are part of the GitHub docs community, see how else you can [contri
This site can be developed on Windows, however a few potential gotchas need to be kept in mind: This site can be developed on Windows, however a few potential gotchas need to be kept in mind:
1. Regular Expressions: Windows uses `\r\n` for line endings, while Unix based systems use `\n`. Therefore when working on Regular Expressions, use `\r?\n` instead of `\n` in order to support both environments. The Node.js [`os.EOL`](https://nodejs.org/api/os.html#os_os_eol) property can be used to get an OS-specific end-of-line marker. 1. Regular Expressions: Windows uses `\r\n` for line endings, while Unix-based systems use `\n`. Therefore, when working on Regular Expressions, use `\r?\n` instead of `\n` in order to support both environments. The Node.js [`os.EOL`](https://nodejs.org/api/os.html#os_os_eol) property can be used to get an OS-specific end-of-line marker.
2. Paths: Windows systems use `\` for the path separator, which would be returned by `path.join` and others. You could use `path.posix`, `path.posix.join` etc and the [slash](https://ghub.io/slash) module, if you need forward slashes - like for constructing URLs - or ensure your code works with either. 2. Paths: Windows systems use `\` for the path separator, which would be returned by `path.join` and others. You could use `path.posix`, `path.posix.join` etc and the [slash](https://ghub.io/slash) module, if you need forward slashes - like for constructing URLs - or ensure your code works with either.
3. Bash: Not every Windows developer has a terminal that fully supports Bash, so it's generally preferred to write [scripts](/script) in JavaScript instead of Bash. 3. Bash: Not every Windows developer has a terminal that fully supports Bash, so it's generally preferred to write [scripts](/script) in JavaScript instead of Bash.
4. Filename too long error: There is a 260 character limit for a filename when Git is compiled with `msys`. While the suggestions below are not guaranteed to work and could possibly cause other issues, a few workarounds include: 4. Filename too long error: There is a 260 character limit for a filename when Git is compiled with `msys`. While the suggestions below are not guaranteed to work and could cause other issues, a few workarounds include:
- Update Git configuration: `git config --system core.longpaths true` - Update Git configuration: `git config --system core.longpaths true`
- Consider using a different Git client on Windows - Consider using a different Git client on Windows

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -11,7 +11,11 @@ export default function ClientSideRefresh() {
useSWR( useSWR(
router.asPath, router.asPath,
() => { () => {
router.replace(router.asPath, undefined, { scroll: false }) // Remember, in NextJS, the `router.locale` is never including the
// `router.asPath`. So we have to make sure it's always there
// otherwise, after this hook runs, you lose that `/en` prefix
// in the URL on the address bar.
router.replace(`/${router.locale}${router.asPath}`, undefined, { scroll: false })
}, },
{ {
// Implied here is that `revalidateOnFocus: true` which the default // Implied here is that `revalidateOnFocus: true` which the default

View File

@@ -88,13 +88,11 @@ export const PlatformPicker = ({ variant = 'subnav' }: Props) => {
const onClickPlatform = useCallback( const onClickPlatform = useCallback(
(platform: string) => { (platform: string) => {
// Set platform in query param without altering other query params // Set platform in query param without altering other query params
const [pathRoot, pathQuery = ''] = asPath.split('?') const [asPathRoot, asPathQuery = ''] = router.asPath.split('#')[0].split('?')
const params = new URLSearchParams(pathQuery) const params = new URLSearchParams(asPathQuery)
params.set(platformQueryKey, platform) params.set(platformQueryKey, platform)
router.push({ pathname: pathRoot, query: params.toString() }, undefined, { const newPath = `/${locale}${asPathRoot}?${params}`
shallow: true, router.push(newPath, undefined, { shallow: true, locale })
locale,
})
sendEvent({ sendEvent({
type: EventType.preference, type: EventType.preference,
@@ -108,7 +106,7 @@ export const PlatformPicker = ({ variant = 'subnav' }: Props) => {
expires: 365, expires: 365,
}) })
}, },
[asPath] [asPath, locale]
) )
// only show platforms that are in the current article // only show platforms that are in the current article

View File

@@ -94,13 +94,11 @@ export const ToolPicker = ({ variant = 'subnav' }: Props) => {
const onClickTool = useCallback( const onClickTool = useCallback(
(tool: string) => { (tool: string) => {
// Set tool in query param without altering other query params // Set tool in query param without altering other query params
const [pathRoot, pathQuery = ''] = asPath.split('?') const [asPathRoot, asPathQuery = ''] = router.asPath.split('#')[0].split('?')
const params = new URLSearchParams(pathQuery) const params = new URLSearchParams(asPathQuery)
params.set(toolQueryKey, tool) params.set(toolQueryKey, tool)
router.push({ pathname: pathRoot, query: params.toString() }, undefined, { const newPath = `/${locale}${asPathRoot}?${params}`
shallow: true, router.push(newPath, undefined, { shallow: true, locale })
locale,
})
sendEvent({ sendEvent({
type: EventType.preference, type: EventType.preference,
@@ -113,7 +111,7 @@ export const ToolPicker = ({ variant = 'subnav' }: Props) => {
expires: 365, expires: 365,
}) })
}, },
[asPath] [asPath, locale]
) )
if (variant === 'underlinenav') { if (variant === 'underlinenav') {

View File

@@ -13,13 +13,6 @@ export type ProductT = {
versions?: Array<string> versions?: Array<string>
} }
export type ProductGroupT = {
name: string
icon: string
octicon: string
children: Array<ProductT>
}
type VersionItem = { type VersionItem = {
// free-pro-team@latest, enterprise-cloud@latest, enterprise-server@3.3 ... // free-pro-team@latest, enterprise-cloud@latest, enterprise-server@3.3 ...
version: string version: string
@@ -77,7 +70,6 @@ export type MainContextT = {
article?: BreadcrumbT article?: BreadcrumbT
} }
activeProducts: Array<ProductT> activeProducts: Array<ProductT>
productGroups: Array<ProductGroupT>
communityRedirect: { communityRedirect: {
name: string name: string
href: string href: string
@@ -137,7 +129,6 @@ export const getMainContext = async (req: any, res: any): Promise<MainContextT>
return { return {
breadcrumbs: req.context.breadcrumbs || {}, breadcrumbs: req.context.breadcrumbs || {},
activeProducts: req.context.activeProducts, activeProducts: req.context.activeProducts,
productGroups: req.context.productGroups,
communityRedirect: req.context.page?.communityRedirect || {}, communityRedirect: req.context.page?.communityRedirect || {},
currentProduct: req.context.productMap[req.context.currentProduct] || null, currentProduct: req.context.productMap[req.context.currentProduct] || null,
currentLayoutName: req.context.currentLayoutName, currentLayoutName: req.context.currentLayoutName,

View File

@@ -1,4 +1,5 @@
import { ProductT, ProductGroupT, useMainContext } from 'components/context/MainContext' import { ProductT, useMainContext } from 'components/context/MainContext'
import type { ProductGroupT } from 'components/homepage/ProductSelections'
import React from 'react' import React from 'react'
import { useRouter } from 'next/router' import { useRouter } from 'next/router'

View File

@@ -1,11 +1,20 @@
import { useMainContext } from 'components/context/MainContext'
import React from 'react' import React from 'react'
import type { ProductT } from 'components/context/MainContext'
import { ProductSelectionCard } from './ProductSelectionCard' import { ProductSelectionCard } from './ProductSelectionCard'
export const ProductSelections = () => { export type ProductGroupT = {
const { productGroups } = useMainContext() name: string
icon: string
octicon: string
children: Array<ProductT>
}
type Props = {
productGroups: Array<ProductGroupT>
}
export const ProductSelections = ({ productGroups }: Props) => {
return ( return (
<section className="container-xl pb-lg-4 mt-6 px-3 px-md-6" data-testid="product"> <section className="container-xl pb-lg-4 mt-6 px-3 px-md-6" data-testid="product">
<div className=""> <div className="">

View File

@@ -12,15 +12,13 @@ type Props = {
export const TableOfContents = (props: Props) => { export const TableOfContents = (props: Props) => {
const { items, variant = 'expanded' } = props const { items, variant = 'expanded' } = props
const actionItems = (items || []).filter((item) => typeof item !== 'undefined')
return ( return (
<ul <ul
data-testid="table-of-contents" data-testid="table-of-contents"
className={cx(variant === 'compact' ? 'list-style-outside pl-2' : '')} className={cx(variant === 'compact' ? 'list-style-outside pl-2' : '')}
> >
{variant === 'expanded' && {variant === 'expanded' &&
actionItems.map((item) => { items.map((item) => {
const { fullPath: href, title, intro } = item const { fullPath: href, title, intro } = item
return ( return (
@@ -43,7 +41,7 @@ export const TableOfContents = (props: Props) => {
{variant === 'compact' && ( {variant === 'compact' && (
<ActionList> <ActionList>
{actionItems.map((item) => { {items.map((item) => {
const { fullPath: href, title, childTocItems } = item const { fullPath: href, title, childTocItems } = item
return ( return (
<React.Fragment key={href}> <React.Fragment key={href}>

View File

@@ -1,6 +1,6 @@
--- ---
title: About notifications title: About notifications
intro: 'Notifications provide updates about the activity on {% data variables.product.product_location %} that you''ve subscribed to. You can use the notifications inbox to customize, triage, and manage your updates.' intro: 'Notifications provide updates about the activity on {% data variables.location.product_location %} that you''ve subscribed to. You can use the notifications inbox to customize, triage, and manage your updates.'
redirect_from: redirect_from:
- /articles/notifications - /articles/notifications
- /articles/about-notifications - /articles/about-notifications
@@ -18,7 +18,7 @@ topics:
## Notifications and subscriptions ## Notifications and subscriptions
You can choose to receive ongoing updates about specific activity on {% data variables.product.product_location %} through a subscription. Notifications are updates that you receive for specific activity that you are subscribed to. You can choose to receive ongoing updates about specific activity on {% data variables.location.product_location %} through a subscription. Notifications are updates that you receive for specific activity that you are subscribed to.
### Subscription options ### Subscription options
@@ -46,7 +46,7 @@ In general, you are automatically subscribed to conversations by default when yo
By default, you also automatically watch all repositories that you create and are owned by your personal account. By default, you also automatically watch all repositories that you create and are owned by your personal account.
To unsubscribe from conversations you're automatically subscribed to, you can change your notification settings or directly unsubscribe or unwatch activity on {% data variables.product.product_location %}. For more information, see "[Managing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)." To unsubscribe from conversations you're automatically subscribed to, you can change your notification settings or directly unsubscribe or unwatch activity on {% data variables.location.product_location %}. For more information, see "[Managing your subscriptions](/github/managing-subscriptions-and-notifications-on-github/managing-your-subscriptions)."
## Customizing notifications and subscriptions ## Customizing notifications and subscriptions
@@ -88,7 +88,7 @@ From your inbox you can also triage multiple notifications at once. For more inf
## Customizing your notifications inbox ## Customizing your notifications inbox
To focus on a group of notifications in your inbox on {% data variables.product.product_location %}{% ifversion fpt or ghes or ghec %} or {% data variables.product.prodname_mobile %}{% endif %}, you can create custom filters. For example, you can create a custom filter for an open source project you contribute to and only see notifications for that repository in which you are mentioned. For more information, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox)." For more examples of how to customize your triaging workflow, see "[Customizing a workflow for triaging your notifications](/github/managing-subscriptions-and-notifications-on-github/customizing-a-workflow-for-triaging-your-notifications)." To focus on a group of notifications in your inbox on {% data variables.location.product_location %}{% ifversion fpt or ghes or ghec %} or {% data variables.product.prodname_mobile %}{% endif %}, you can create custom filters. For example, you can create a custom filter for an open source project you contribute to and only see notifications for that repository in which you are mentioned. For more information, see "[Managing notifications from your inbox](/github/managing-subscriptions-and-notifications-on-github/managing-notifications-from-your-inbox)." For more examples of how to customize your triaging workflow, see "[Customizing a workflow for triaging your notifications](/github/managing-subscriptions-and-notifications-on-github/customizing-a-workflow-for-triaging-your-notifications)."
## Notification retention policy ## Notification retention policy

View File

@@ -26,11 +26,11 @@ topics:
## Notification delivery options ## Notification delivery options
You can receive notifications for activity on {% data variables.product.product_location %} in the following locations. You can receive notifications for activity on {% data variables.location.product_location %} in the following locations.
- The notifications inbox in the {% data variables.product.product_location %} web interface{% ifversion fpt or ghes or ghec %} - The notifications inbox in the {% data variables.location.product_location %} web interface{% ifversion fpt or ghes or ghec %}
- The notifications inbox on {% data variables.product.prodname_mobile %}, which syncs with the inbox on {% data variables.product.product_location %}{% endif %} - The notifications inbox on {% data variables.product.prodname_mobile %}, which syncs with the inbox on {% data variables.location.product_location %}{% endif %}
- An email client that uses a verified email address, which can also sync with the notifications inbox on {% data variables.product.product_location %}{% ifversion fpt or ghes or ghec %} and {% data variables.product.prodname_mobile %}{% endif %} - An email client that uses a verified email address, which can also sync with the notifications inbox on {% data variables.location.product_location %}{% ifversion fpt or ghes or ghec %} and {% data variables.product.prodname_mobile %}{% endif %}
{% ifversion fpt or ghes or ghec %} {% ifversion fpt or ghes or ghec %}
{% data reusables.notifications-v2.notifications-inbox-required-setting %} For more information, see "[Choosing your notification settings](#choosing-your-notification-settings)." {% data reusables.notifications-v2.notifications-inbox-required-setting %} For more information, see "[Choosing your notification settings](#choosing-your-notification-settings)."
@@ -40,12 +40,12 @@ You can receive notifications for activity on {% data variables.product.product_
### Benefits of the notifications inbox ### Benefits of the notifications inbox
The notifications inbox on {% data variables.product.product_location %}{% ifversion fpt or ghes or ghec %} and {% data variables.product.prodname_mobile %}{% endif %} includes triaging options designed specifically for your {% data variables.product.prodname_dotcom %} notifications flow, including options to: The notifications inbox on {% data variables.location.product_location %}{% ifversion fpt or ghes or ghec %} and {% data variables.product.prodname_mobile %}{% endif %} includes triaging options designed specifically for your {% data variables.product.prodname_dotcom %} notifications flow, including options to:
- Triage multiple notifications at once. - Triage multiple notifications at once.
- Mark completed notifications as **Done** and remove them from your inbox. To view all of your notifications marked as **Done**, use the `is:done` query. - Mark completed notifications as **Done** and remove them from your inbox. To view all of your notifications marked as **Done**, use the `is:done` query.
- Save a notification to review later. Saved notifications are flagged in your inbox and kept indefinitely. To view all of your saved notifications, use the `is:saved` query. - Save a notification to review later. Saved notifications are flagged in your inbox and kept indefinitely. To view all of your saved notifications, use the `is:saved` query.
- Unsubscribe and remove a notification from your inbox. - Unsubscribe and remove a notification from your inbox.
- Preview the issue, pull request, or team discussion where the notification originates on {% data variables.product.product_location %} from within the notifications inbox. - Preview the issue, pull request, or team discussion where the notification originates on {% data variables.location.product_location %} from within the notifications inbox.
- See one of the latest reasons you're receiving a notification from your inbox with a `reasons` label. - See one of the latest reasons you're receiving a notification from your inbox with a `reasons` label.
- Create custom filters to focus on different notifications when you want. - Create custom filters to focus on different notifications when you want.
- Group notifications in your inbox by repository or date to get a quick overview with less context switching - Group notifications in your inbox by repository or date to get a quick overview with less context switching
@@ -85,7 +85,7 @@ Anytime you comment in a conversation or when someone @mentions your username, y
{% else %} {% else %}
For conversations you're watching or participating in, you can choose whether you want to receive notifications by email or through the notifications inbox on {% data variables.product.product_location %}{% ifversion ghes %} and {% data variables.product.prodname_mobile %}{% endif %}. For more information, see "[Choosing your notification settings](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#choosing-your-notification-settings)." For conversations you're watching or participating in, you can choose whether you want to receive notifications by email or through the notifications inbox on {% data variables.location.product_location %}{% ifversion ghes %} and {% data variables.product.prodname_mobile %}{% endif %}. For more information, see "[Choosing your notification settings](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#choosing-your-notification-settings)."
![Screenshot of participating and watching notifications options](/assets/images/help/notifications-v2/participating-and-watching-options.png){% endif %} ![Screenshot of participating and watching notifications options](/assets/images/help/notifications-v2/participating-and-watching-options.png){% endif %}
@@ -103,7 +103,7 @@ If you do not enable watching or participating notifications for web{% ifversion
## Customizing your email notifications ## Customizing your email notifications
After enabling email notifications, {% data variables.product.product_location %} will send notifications to you as multipart emails that contain both HTML and plain text copies of the content. Email notification content includes any Markdown, @mentions, emojis, hash-links, and more, that appear in the original content on {% data variables.product.product_location %}. If you only want to see the text in the email, you can configure your email client to display the plain text copy only. After enabling email notifications, {% data variables.location.product_location %} will send notifications to you as multipart emails that contain both HTML and plain text copies of the content. Email notification content includes any Markdown, @mentions, emojis, hash-links, and more, that appear in the original content on {% data variables.location.product_location %}. If you only want to see the text in the email, you can configure your email client to display the plain text copy only.
{% data reusables.notifications.outbound_email_tip %} {% data reusables.notifications.outbound_email_tip %}
@@ -117,7 +117,7 @@ If you're using Gmail, you can click a button beside the notification email to v
{% endif %} {% endif %}
Choose a default email address where you want to send updates for conversations you're participating in or watching. You can also specify which activity on {% data variables.product.product_location %} you want to receive updates for using your default email address. For example, choose whether you want updates to your default email from: Choose a default email address where you want to send updates for conversations you're participating in or watching. You can also specify which activity on {% data variables.location.product_location %} you want to receive updates for using your default email address. For example, choose whether you want updates to your default email from:
- Comments on issues and pull requests. - Comments on issues and pull requests.
- Pull request reviews. - Pull request reviews.
- Pull request pushes. - Pull request pushes.
@@ -131,11 +131,11 @@ You can also send notifications for a specific repository to an email address. F
## Filtering email notifications ## Filtering email notifications
Each email notification that {% data variables.product.product_location %} sends contains header information. The header information in every email is consistent, so you can use it in your email client to filter or forward all {% data variables.product.prodname_dotcom %} notifications, or certain types of {% data variables.product.prodname_dotcom %} notifications. Each email notification that {% data variables.location.product_location %} sends contains header information. The header information in every email is consistent, so you can use it in your email client to filter or forward all {% data variables.product.prodname_dotcom %} notifications, or certain types of {% data variables.product.prodname_dotcom %} notifications.
If you believe you're receiving notifications that don't belong to you, examine the `X-GitHub-Recipient` and `X-GitHub-Recipient-Address` headers. These headers show who the intended recipient is. Depending on your email setup, you may receive notifications intended for another user. If you believe you're receiving notifications that don't belong to you, examine the `X-GitHub-Recipient` and `X-GitHub-Recipient-Address` headers. These headers show who the intended recipient is. Depending on your email setup, you may receive notifications intended for another user.
Email notifications from {% data variables.product.product_location %} contain the following header information: Email notifications from {% data variables.location.product_location %} contain the following header information:
| Header | Information | | Header | Information |
| --- | --- | | --- | --- |

View File

@@ -105,7 +105,7 @@ To add a `repo:` filter, you must include the owner of the repository in the que
### Supported `is:` queries ### Supported `is:` queries
To filter notifications for specific activity on {% data variables.product.product_location %}, you can use the `is` query. For example, to only see repository invitation updates, use `is:repository-invitation`{% ifversion not ghae %}, and to only see {% data variables.product.prodname_dependabot_alerts %}, use `is:repository-vulnerability-alert`{% endif %}. To filter notifications for specific activity on {% data variables.location.product_location %}, you can use the `is` query. For example, to only see repository invitation updates, use `is:repository-invitation`{% ifversion not ghae %}, and to only see {% data variables.product.prodname_dependabot_alerts %}, use `is:repository-vulnerability-alert`{% endif %}.
- `is:check-suite` - `is:check-suite`
- `is:commit` - `is:commit`

View File

@@ -14,7 +14,7 @@ shortTitle: Your profile README
--- ---
## About your profile README ## About your profile README
You can share information about yourself with the community on {% data variables.product.product_location %} by creating a profile README. {% data variables.product.prodname_dotcom %} shows your profile README at the top of your profile page. You can share information about yourself with the community on {% data variables.location.product_location %} by creating a profile README. {% data variables.product.prodname_dotcom %} shows your profile README at the top of your profile page.
You decide what information to include in your profile README, so you have full control over how you present yourself on {% data variables.product.prodname_dotcom %}. Here are some examples of information that visitors may find interesting, fun, or useful in your profile README. You decide what information to include in your profile README, so you have full control over how you present yourself on {% data variables.product.prodname_dotcom %}. Here are some examples of information that visitors may find interesting, fun, or useful in your profile README.

View File

@@ -59,7 +59,7 @@ You can change the name that is displayed on your profile. This name may also be
{% ifversion fpt or ghec %} {% ifversion fpt or ghec %}
{% note %} {% note %}
**Note:** If you're a member of an {% data variables.product.prodname_emu_enterprise %}, any changes to your profile name must be made through your identity provider instead of {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.enterprise-accounts.emu-more-info-account %} **Note:** If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, any changes to your profile name must be made through your identity provider instead of {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.enterprise-accounts.emu-more-info-account %}
{% endnote %} {% endnote %}
{% endif %} {% endif %}

View File

@@ -20,7 +20,7 @@ If you publicize your private contributions, people without access to the privat
{% note %} {% note %}
**Note:** {% ifversion fpt or ghes or ghec %}On {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_name %}{% endif %}, public contributions on your profile are visible {% ifversion fpt or ghec %}to anyone in the world who can access {% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}only to other users of {% data variables.product.product_location%}{% endif %}.{% elsif ghae %}On {% data variables.product.prodname_ghe_managed %}, only other members of your enterprise can see the contributions on your profile.{% endif %} **Note:** {% ifversion fpt or ghes or ghec %}On {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_name %}{% endif %}, public contributions on your profile are visible {% ifversion fpt or ghec %}to anyone in the world who can access {% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}only to other users of {% data variables.location.product_location%}{% endif %}.{% elsif ghae %}On {% data variables.product.prodname_ghe_managed %}, only other members of your enterprise can see the contributions on your profile.{% endif %}
{% endnote %} {% endnote %}

View File

@@ -93,5 +93,5 @@ The contribution activity section includes a detailed timeline of your work, inc
## Viewing contributions from {% data variables.product.prodname_enterprise %} on {% data variables.product.prodname_dotcom_the_website %} ## Viewing contributions from {% data variables.product.prodname_enterprise %} on {% data variables.product.prodname_dotcom_the_website %}
If you use {% ifversion fpt or ghec %}{% data variables.product.prodname_ghe_server %}{% ifversion ghae %} or {% data variables.product.prodname_ghe_managed %}{% endif %}{% else %}{% data variables.product.product_name %}{% endif %} and your enterprise owner enables {% data variables.product.prodname_unified_contributions %}, you can send enterprise contribution counts from to your {% data variables.product.prodname_dotcom_the_website %} profile. For more information, see "[Sending enterprise contributions to your {% data variables.product.prodname_dotcom_the_website %} profile](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)." If you use {% ifversion fpt or ghec %}{% data variables.product.prodname_ghe_server %}{% ifversion ghae %} or {% data variables.product.prodname_ghe_managed %}{% endif %}{% else %}{% data variables.product.product_name %}{% endif %} and your enterprise owner enables {% data variables.enterprise.prodname_unified_contributions %}, you can send enterprise contribution counts from to your {% data variables.product.prodname_dotcom_the_website %} profile. For more information, see "[Sending enterprise contributions to your {% data variables.product.prodname_dotcom_the_website %} profile](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)."

View File

@@ -18,7 +18,7 @@ shortTitle: Missing contributions
## About your contribution graph ## About your contribution graph
Your profile contributions graph is a record of contributions you've made to repositories {% ifversion ghae %}owned by{% else %}on{% endif %} {% data variables.product.product_location %}. Contributions are timestamped according to Coordinated Universal Time (UTC) rather than your local time zone. Contributions are only counted if they meet certain criteria. In some cases, we may need to rebuild your graph in order for contributions to appear. Your profile contributions graph is a record of contributions you've made to repositories {% ifversion ghae %}owned by{% else %}on{% endif %} {% data variables.location.product_location %}. Contributions are timestamped according to Coordinated Universal Time (UTC) rather than your local time zone. Contributions are only counted if they meet certain criteria. In some cases, we may need to rebuild your graph in order for contributions to appear.
If you are part of an organization that uses SAML single sign-on (SSO), you wont be able to see contribution activity from the organization on your profile if you do not have an active SSO session. People viewing your profile from outside your organization will see anonymized contribution activity of your contribution activity for your organization. If you are part of an organization that uses SAML single sign-on (SSO), you wont be able to see contribution activity from the organization on your profile if you do not have an active SSO session. People viewing your profile from outside your organization will see anonymized contribution activity of your contribution activity for your organization.
@@ -30,7 +30,7 @@ Issues, pull requests and discussions will appear on your contribution graph if
### Commits ### Commits
Commits will appear on your contributions graph if they meet **all** of the following conditions: Commits will appear on your contributions graph if they meet **all** of the following conditions:
- The email address used for the commits is associated with your account on {% data variables.product.product_location %}. - The email address used for the commits is associated with your account on {% data variables.location.product_location %}.
- The commits were made in a standalone repository, not a fork. - The commits were made in a standalone repository, not a fork.
- The commits were made: - The commits were made:
- In the repository's default branch - In the repository's default branch
@@ -54,7 +54,7 @@ After making a commit that meets the requirements to count as a contribution, yo
### Your local Git commit email isn't connected to your account ### Your local Git commit email isn't connected to your account
Commits must be made with an email address that is connected to your account on {% data variables.product.product_location %}{% ifversion fpt or ghec %}, or the {% data variables.product.prodname_dotcom %}-provided `noreply` email address provided to you in your email settings,{% endif %} in order to appear on your contributions graph.{% ifversion fpt or ghec %} For more information about `noreply` email addresses, see "[Setting your commit email address](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#about-commit-email-addresses)."{% endif %} Commits must be made with an email address that is connected to your account on {% data variables.location.product_location %}{% ifversion fpt or ghec %}, or the {% data variables.product.prodname_dotcom %}-provided `noreply` email address provided to you in your email settings,{% endif %} in order to appear on your contributions graph.{% ifversion fpt or ghec %} For more information about `noreply` email addresses, see "[Setting your commit email address](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#about-commit-email-addresses)."{% endif %}
You can check the email address used for a commit by adding `.patch` to the end of a commit URL, e.g. <a href="https://github.com/octocat/octocat.github.io/commit/67c0afc1da354d8571f51b6f0af8f2794117fd10.patch" data-proofer-ignore>https://github.com/octocat/octocat.github.io/commit/67c0afc1da354d8571f51b6f0af8f2794117fd10.patch</a>: You can check the email address used for a commit by adding `.patch` to the end of a commit URL, e.g. <a href="https://github.com/octocat/octocat.github.io/commit/67c0afc1da354d8571f51b6f0af8f2794117fd10.patch" data-proofer-ignore>https://github.com/octocat/octocat.github.io/commit/67c0afc1da354d8571f51b6f0af8f2794117fd10.patch</a>:
@@ -67,7 +67,7 @@ Subject: [PATCH] updated index for better welcome message
The email address in the `From:` field is the address that was set in the [local git config settings](/articles/set-up-git). In this example, the email address used for the commit is `octocat@nowhere.com`. The email address in the `From:` field is the address that was set in the [local git config settings](/articles/set-up-git). In this example, the email address used for the commit is `octocat@nowhere.com`.
If the email address used for the commit is not connected to your account on {% data variables.product.product_location %}, {% ifversion ghae %}change the email address used to author commits in Git. For more information, see "[Setting your commit email address](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#setting-your-commit-email-address-in-git)."{% else %}you must [add the email address](/articles/adding-an-email-address-to-your-github-account) to your account on {% data variables.product.product_location %}. Your contributions graph will be rebuilt automatically when you add the new address.{% endif %} If the email address used for the commit is not connected to your account on {% data variables.location.product_location %}, {% ifversion ghae %}change the email address used to author commits in Git. For more information, see "[Setting your commit email address](/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address#setting-your-commit-email-address-in-git)."{% else %}you must [add the email address](/articles/adding-an-email-address-to-your-github-account) to your account on {% data variables.location.product_location %}. Your contributions graph will be rebuilt automatically when you add the new address.{% endif %}
{% warning %} {% warning %}
@@ -93,7 +93,7 @@ If your commits are in a non-default or non-`gh-pages` branch and you'd like the
Commits made in a fork will not count toward your contributions. To make them count, you must do one of the following: Commits made in a fork will not count toward your contributions. To make them count, you must do one of the following:
- [Open a pull request](/articles/creating-a-pull-request) to have your changes merged into the parent repository. - [Open a pull request](/articles/creating-a-pull-request) to have your changes merged into the parent repository.
- To detach the fork and turn it into a standalone repository on {% data variables.product.product_location %}, contact {% data variables.contact.contact_support %}. If the fork has forks of its own, let {% data variables.contact.contact_support %} know if the forks should move with your repository into a new network or remain in the current network. For more information, see "[About forks](/articles/about-forks/)." - To detach the fork and turn it into a standalone repository on {% data variables.location.product_location %}, contact {% data variables.contact.contact_support %}. If the fork has forks of its own, let {% data variables.contact.contact_support %} know if the forks should move with your repository into a new network or remain in the current network. For more information, see "[About forks](/articles/about-forks/)."
## Further reading ## Further reading

View File

@@ -1,6 +1,6 @@
--- ---
title: Setting up and managing your personal account on GitHub title: Setting up and managing your personal account on GitHub
intro: You can manage settings for your personal account on {% ifversion fpt or ghec or ghes %}{% data variables.product.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}, including email preferences, access to personal repositories, and organization memberships. You can also manage the account itself. intro: You can manage settings for your personal account on {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}, including email preferences, access to personal repositories, and organization memberships. You can also manage the account itself.
shortTitle: Personal accounts shortTitle: Personal accounts
redirect_from: redirect_from:
- /categories/setting-up-and-managing-your-github-user-account - /categories/setting-up-and-managing-your-github-user-account

View File

@@ -25,7 +25,7 @@ Repositories owned by an organization can grant more granular access. For more i
{% ifversion fpt or ghec %} {% ifversion fpt or ghec %}
If you're a member of an {% data variables.product.prodname_emu_enterprise %}, you can only invite other members of your enterprise to collaborate with you. {% data reusables.enterprise-accounts.emu-more-info-account %} If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you can only invite other members of your enterprise to collaborate with you. {% data reusables.enterprise-accounts.emu-more-info-account %}
{% note %} {% note %}

View File

@@ -21,7 +21,7 @@ shortTitle: Add an email address
**Notes**: **Notes**:
- {% data reusables.user-settings.no-verification-disposable-emails %} - {% data reusables.user-settings.no-verification-disposable-emails %}
- If you're a member of an {% data variables.product.prodname_emu_enterprise %}, you cannot make changes to your email address on {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.enterprise-accounts.emu-more-info-account %} - If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you cannot make changes to your email address on {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.enterprise-accounts.emu-more-info-account %}
{% endnote %} {% endnote %}

View File

@@ -1,6 +1,6 @@
--- ---
title: Managing email preferences title: Managing email preferences
intro: 'You can add or change the email addresses associated with your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}. You can also manage emails you receive from {% data variables.product.product_name %}.' intro: 'You can add or change the email addresses associated with your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. You can also manage emails you receive from {% data variables.product.product_name %}.'
redirect_from: redirect_from:
- /categories/managing-email-preferences - /categories/managing-email-preferences
- /articles/managing-email-preferences - /articles/managing-email-preferences

View File

@@ -1,6 +1,6 @@
--- ---
title: Remembering your GitHub username or email title: Remembering your GitHub username or email
intro: 'Are you signing in to {% data variables.product.product_location %} for the first time in a while? If so, welcome back! If you can''t remember the username for your personal account on {% data variables.product.product_name %}, you can try these methods for remembering it.' intro: 'Are you signing in to {% data variables.location.product_location %} for the first time in a while? If so, welcome back! If you can''t remember the username for your personal account on {% data variables.product.product_name %}, you can try these methods for remembering it.'
redirect_from: redirect_from:
- /articles/oh-noes-i-ve-forgotten-my-username-email - /articles/oh-noes-i-ve-forgotten-my-username-email
- /articles/oh-noes-i-ve-forgotten-my-username-or-email - /articles/oh-noes-i-ve-forgotten-my-username-or-email

View File

@@ -1,6 +1,6 @@
--- ---
title: Setting your commit email address title: Setting your commit email address
intro: 'You can set the email address that is used to author commits on {% data variables.product.product_location %} and on your computer.' intro: 'You can set the email address that is used to author commits on {% data variables.location.product_location %} and on your computer.'
redirect_from: redirect_from:
- /articles/keeping-your-email-address-private - /articles/keeping-your-email-address-private
- /articles/setting-your-commit-email-address-on-github - /articles/setting-your-commit-email-address-on-github
@@ -25,9 +25,9 @@ shortTitle: Set commit email address
--- ---
## About commit email addresses ## About commit email addresses
{% data variables.product.prodname_dotcom %} uses your commit email address to associate commits with your account on {% data variables.product.product_location %}. You can choose the email address that will be associated with the commits you push from the command line as well as web-based Git operations you make. {% data variables.product.prodname_dotcom %} uses your commit email address to associate commits with your account on {% data variables.location.product_location %}. You can choose the email address that will be associated with the commits you push from the command line as well as web-based Git operations you make.
For web-based Git operations, you can set your commit email address on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}. For commits you push from the command line, you can set your commit email address in Git. For web-based Git operations, you can set your commit email address on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. For commits you push from the command line, you can set your commit email address in Git.
{% ifversion fpt or ghec %}Any commits you made prior to changing your commit email address are still associated with your previous email address.{% else %}After changing your commit email address on {% data variables.product.product_name %}, the new email address will be visible in all of your future web-based Git operations by default. Any commits you made prior to changing your commit email address are still associated with your previous email address.{% endif %} {% ifversion fpt or ghec %}Any commits you made prior to changing your commit email address are still associated with your previous email address.{% else %}After changing your commit email address on {% data variables.product.product_name %}, the new email address will be visible in all of your future web-based Git operations by default. Any commits you made prior to changing your commit email address are still associated with your previous email address.{% endif %}
@@ -45,17 +45,17 @@ For web-based Git operations, you can set your commit email address on {% ifvers
You can also choose to block commits you push from the command line that expose your personal email address. For more information, see "[Blocking command line pushes that expose your personal email](/articles/blocking-command-line-pushes-that-expose-your-personal-email-address)."{% endif %} You can also choose to block commits you push from the command line that expose your personal email address. For more information, see "[Blocking command line pushes that expose your personal email](/articles/blocking-command-line-pushes-that-expose-your-personal-email-address)."{% endif %}
To ensure that commits are attributed to you and appear in your contributions graph, use an email address that is connected to your account on {% data variables.product.product_location %}{% ifversion fpt or ghec %}, or the `noreply` email address provided to you in your email settings{% endif %}. {% ifversion not ghae %}For more information, see "[Adding an email address to your {% data variables.product.prodname_dotcom %} account](/github/setting-up-and-managing-your-github-user-account/adding-an-email-address-to-your-github-account)."{% endif %} To ensure that commits are attributed to you and appear in your contributions graph, use an email address that is connected to your account on {% data variables.location.product_location %}{% ifversion fpt or ghec %}, or the `noreply` email address provided to you in your email settings{% endif %}. {% ifversion not ghae %}For more information, see "[Adding an email address to your {% data variables.product.prodname_dotcom %} account](/github/setting-up-and-managing-your-github-user-account/adding-an-email-address-to-your-github-account)."{% endif %}
{% ifversion fpt or ghec %} {% ifversion fpt or ghec %}
{% note %} {% note %}
**Note:** If you created your account on {% data variables.product.product_location %} _after_ July 18, 2017, your `noreply` email address for {% data variables.product.product_name %} is a seven-digit ID number and your username in the form of <code>ID+USERNAME@users.noreply.github.com</code>. If you created your account on {% data variables.product.product_location %} _prior to_ July 18, 2017, your `noreply` email address from {% data variables.product.product_name %} is <code>USERNAME@users.noreply.github.com</code>. You can get an ID-based `noreply` email address for {% data variables.product.product_name %} by selecting (or deselecting and reselecting) **Keep my email address private** in your email settings. **Note:** If you created your account on {% data variables.location.product_location %} _after_ July 18, 2017, your `noreply` email address for {% data variables.product.product_name %} is a seven-digit ID number and your username in the form of <code>ID+USERNAME@users.noreply.github.com</code>. If you created your account on {% data variables.location.product_location %} _prior to_ July 18, 2017, your `noreply` email address from {% data variables.product.product_name %} is <code>USERNAME@users.noreply.github.com</code>. You can get an ID-based `noreply` email address for {% data variables.product.product_name %} by selecting (or deselecting and reselecting) **Keep my email address private** in your email settings.
{% endnote %} {% endnote %}
If you use your `noreply` email address for {% data variables.product.product_name %} to make commits and then [change your username](/articles/changing-your-github-username), those commits will not be associated with your account on {% data variables.product.product_location %}. This does not apply if you're using the ID-based `noreply` address from {% data variables.product.product_name %}. For more information, see "[Changing your {% data variables.product.prodname_dotcom %} username](/articles/changing-your-github-username)."{% endif %} If you use your `noreply` email address for {% data variables.product.product_name %} to make commits and then [change your username](/articles/changing-your-github-username), those commits will not be associated with your account on {% data variables.location.product_location %}. This does not apply if you're using the ID-based `noreply` address from {% data variables.product.product_name %}. For more information, see "[Changing your {% data variables.product.prodname_dotcom %} username](/articles/changing-your-github-username)."{% endif %}
## Setting your commit email address on {% data variables.product.prodname_dotcom %} ## Setting your commit email address on {% data variables.product.prodname_dotcom %}
@@ -69,7 +69,7 @@ If you use your `noreply` email address for {% data variables.product.product_na
## Setting your commit email address in Git ## Setting your commit email address in Git
You can use the `git config` command to change the email address you associate with your Git commits. The new email address you set will be visible in any future commits you push to {% data variables.product.product_location %} from the command line. Any commits you made prior to changing your commit email address are still associated with your previous email address. You can use the `git config` command to change the email address you associate with your Git commits. The new email address you set will be visible in any future commits you push to {% data variables.location.product_location %} from the command line. Any commits you made prior to changing your commit email address are still associated with your previous email address.
### Setting your email address for every repository on your computer ### Setting your email address for every repository on your computer
@@ -87,7 +87,7 @@ You can use the `git config` command to change the email address you associate w
### Setting your email address for a single repository ### Setting your email address for a single repository
{% data variables.product.product_name %} uses the email address set in your local Git configuration to associate commits pushed from the command line with your account on {% data variables.product.product_location %}. {% data variables.product.product_name %} uses the email address set in your local Git configuration to associate commits pushed from the command line with your account on {% data variables.location.product_location %}.
You can change the email address associated with commits you make in a single repository. This will override your global Git configuration settings in this one repository, but will not affect any other repositories. You can change the email address associated with commits you make in a single repository. This will override your global Git configuration settings in this one repository, but will not affect any other repositories.

View File

@@ -1,6 +1,6 @@
--- ---
title: Changing your GitHub username title: Changing your GitHub username
intro: 'You can change the username for your account on {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_location %} if your instance uses built-in authentication{% endif %}.' intro: 'You can change the username for your account on {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.location.product_location %} if your instance uses built-in authentication{% endif %}.'
redirect_from: redirect_from:
- /articles/how-to-change-your-username - /articles/how-to-change-your-username
- /articles/changing-your-github-user-name - /articles/changing-your-github-user-name
@@ -25,11 +25,11 @@ shortTitle: Change your username
{% ifversion ghec %} {% ifversion ghec %}
**Note**: Members of an {% data variables.product.prodname_emu_enterprise %} cannot change usernames. Your enterprise's IdP administrator controls your username for {% data variables.product.product_name %}. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)." **Note**: Members of an {% data variables.enterprise.prodname_emu_enterprise %} cannot change usernames. Your enterprise's IdP administrator controls your username for {% data variables.product.product_name %}. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/about-enterprise-managed-users)."
{% elsif ghes %} {% elsif ghes %}
**Note**: If you sign into {% data variables.product.product_location %} with LDAP credentials or single sign-on (SSO), only your local administrator can change your username. For more information about authentication methods for {% data variables.product.product_name %}, see "[Authenticating users for {% data variables.product.product_location %}](/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance)." **Note**: If you sign into {% data variables.location.product_location %} with LDAP credentials or single sign-on (SSO), only your local administrator can change your username. For more information about authentication methods for {% data variables.product.product_name %}, see "[Authenticating users for {% data variables.location.product_location %}](/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance)."
{% endif %} {% endif %}
@@ -53,7 +53,7 @@ After changing your username, your old username becomes available for anyone els
{% ifversion fpt or ghec %} {% ifversion fpt or ghec %}
If you're a member of an {% data variables.product.prodname_emu_enterprise %}, you cannot make changes to your username. {% data reusables.enterprise-accounts.emu-more-info-account %} If you're a member of an {% data variables.enterprise.prodname_emu_enterprise %}, you cannot make changes to your username. {% data reusables.enterprise-accounts.emu-more-info-account %}
{% endif %} {% endif %}
@@ -67,7 +67,7 @@ If the new owner of your old username creates a repository with the same name as
## Links to your previous profile page ## Links to your previous profile page
After changing your username, links to your previous profile page, such as `https://{% data variables.command_line.backticks %}/previoususername`, will return a 404 error. We recommend updating any links to your account on {% data variables.product.product_location %} from elsewhere{% ifversion fpt or ghec %}, such as your LinkedIn or Twitter profile{% endif %}. After changing your username, links to your previous profile page, such as `https://{% data variables.command_line.backticks %}/previoususername`, will return a 404 error. We recommend updating any links to your account on {% data variables.location.product_location %} from elsewhere{% ifversion fpt or ghec %}, such as your LinkedIn or Twitter profile{% endif %}.
## Your Git commits ## Your Git commits

View File

@@ -12,11 +12,11 @@ miniTocMaxHeadingLevel: 3
## About accessibility settings ## About accessibility settings
To create an experience on {% ifversion fpt or ghec or ghes %}{% data variables.product.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} that fits your needs, you can customize the user interface. Accessibility settings can be essential for people with disabilities, but can be useful to anyone. For example, customization of keyboard shortcuts is essential to people who navigate using voice control, but can be useful to anyone when a keyboard shortcut for {% data variables.product.product_name %} clashes with another application shortcut. To create an experience on {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %} that fits your needs, you can customize the user interface. Accessibility settings can be essential for people with disabilities, but can be useful to anyone. For example, customization of keyboard shortcuts is essential to people who navigate using voice control, but can be useful to anyone when a keyboard shortcut for {% data variables.product.product_name %} clashes with another application shortcut.
## Managing accessibility settings ## Managing accessibility settings
You can decide whether you want to use some or all keyboard shortcuts on {% ifversion fpt or ghec %}{% data variables.product.product_location %}{% elsif ghes or ghae %}the website for {% data variables.product.product_location %}{% endif %}, and you can control the display of animated images. You can decide whether you want to use some or all keyboard shortcuts on {% ifversion fpt or ghec %}{% data variables.location.product_location %}{% elsif ghes or ghae %}the website for {% data variables.location.product_location %}{% endif %}, and you can control the display of animated images.
### Managing keyboard shortcuts ### Managing keyboard shortcuts

View File

@@ -1,6 +1,6 @@
--- ---
title: Managing the default branch name for your repositories title: Managing the default branch name for your repositories
intro: 'You can set the default branch name for new repositories that you create on {% data variables.product.product_location %}.' intro: 'You can set the default branch name for new repositories that you create on {% data variables.location.product_location %}.'
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -16,7 +16,7 @@ shortTitle: Manage default branch name
--- ---
## About management of the default branch name ## About management of the default branch name
When you create a new repository on {% data variables.product.product_location %}, the repository contains one branch, which is the default branch. You can change the name that {% data variables.product.product_name %} uses for the default branch in new repositories you create. For more information about the default branch, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)." When you create a new repository on {% data variables.location.product_location %}, the repository contains one branch, which is the default branch. You can change the name that {% data variables.product.product_name %} uses for the default branch in new repositories you create. For more information about the default branch, see "[About branches](/github/collaborating-with-issues-and-pull-requests/about-branches#about-the-default-branch)."
{% data reusables.branches.change-default-branch %} {% data reusables.branches.change-default-branch %}

View File

@@ -27,7 +27,7 @@ Before you leave your company, make sure you update the following information in
If you've been working with repositories that belong to an organization, you'll want to [remove yourself as a member of the organization](/articles/removing-yourself-from-an-organization). Note that if you are the organization owner, you should first [transfer ownership of the organization](/articles/transferring-organization-ownership) to another person. If you've been working with repositories that belong to an organization, you'll want to [remove yourself as a member of the organization](/articles/removing-yourself-from-an-organization). Note that if you are the organization owner, you should first [transfer ownership of the organization](/articles/transferring-organization-ownership) to another person.
Unless you're using a {% data variables.product.prodname_managed_user %}, you'll still be able to access your personal account, even after leaving the organization. For more information about {% data variables.product.prodname_emus %}, see "[About {% data variables.product.prodname_emus %}]({% ifversion not ghec%}/enterprise-cloud@latest{% endif %}/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users){% ifversion not ghec %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} Unless you're using a {% data variables.enterprise.prodname_managed_user %}, you'll still be able to access your personal account, even after leaving the organization. For more information about {% data variables.product.prodname_emus %}, see "[About {% data variables.product.prodname_emus %}]({% ifversion not ghec%}/enterprise-cloud@latest{% endif %}/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users){% ifversion not ghec %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}
## Removing professional associations with personal repositories ## Removing professional associations with personal repositories

View File

@@ -1,6 +1,6 @@
--- ---
title: Deleting your personal account title: Deleting your personal account
intro: 'You can delete your personal account on {% data variables.product.product_location %} at any time.' intro: 'You can delete your personal account on {% data variables.location.product_location %} at any time.'
redirect_from: redirect_from:
- /articles/deleting-a-user-account - /articles/deleting-a-user-account
- /articles/deleting-your-user-account - /articles/deleting-your-user-account
@@ -25,13 +25,13 @@ Deleting your personal account removes all repositories, forks of private reposi
{% note %} {% note %}
**Note**: If your enterprise manages your account and you sign into {% data variables.product.product_location %} through your company's identity provider (IdP), you cannot delete your account. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users)." **Note**: If your enterprise manages your account and you sign into {% data variables.location.product_location %} through your company's identity provider (IdP), you cannot delete your account. For more information, see "[About {% data variables.product.prodname_emus %}](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users)."
{% endnote %} {% endnote %}
{% endif %} {% endif %}
{% ifversion fpt or ghec %}When you delete your account we stop billing you. The email address associated with the account becomes available for use with a different account on {% data variables.product.product_location %}. After 90 days, the account name also becomes available to anyone else to use on a new account. {% endif %} {% ifversion fpt or ghec %}When you delete your account we stop billing you. The email address associated with the account becomes available for use with a different account on {% data variables.location.product_location %}. After 90 days, the account name also becomes available to anyone else to use on a new account. {% endif %}
If you're the only owner of an organization, you must transfer ownership to another person or delete the organization before you can delete your personal account. If there are other owners in the organization, you must remove yourself from the organization before you can delete your personal account. If you're the only owner of an organization, you must transfer ownership to another person or delete the organization before you can delete your personal account. If there are other owners in the organization, you must remove yourself from the organization before you can delete your personal account.

View File

@@ -1,6 +1,6 @@
--- ---
title: Managing your personal account title: Managing your personal account
intro: 'You can manage your personal account on {% ifversion fpt or ghec or ghes %}{% data variables.product.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}. For example, you can {% ifversion fpt or ghec %}manage multiple accounts, {% endif %}convert an account to an organization{% ifversion fpt or ghec or ghes %}, or delete an account{% endif %}.' intro: 'You can manage your personal account on {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}. For example, you can {% ifversion fpt or ghec %}manage multiple accounts, {% endif %}convert an account to an organization{% ifversion fpt or ghec or ghes %}, or delete an account{% endif %}.'
shortTitle: Manage personal account shortTitle: Manage personal account
versions: versions:
fpt: '*' fpt: '*'

View File

@@ -1,6 +1,6 @@
--- ---
title: Managing multiple accounts title: Managing multiple accounts
intro: 'If you use one workstation to contribute to projects for more than one account on {% data variables.product.product_location %}, you can modify your Git configuration to simplify the contribution process.' intro: 'If you use one workstation to contribute to projects for more than one account on {% data variables.location.product_location %}, you can modify your Git configuration to simplify the contribution process.'
versions: versions:
feature: multiple-accounts-one-workstation feature: multiple-accounts-one-workstation
topics: topics:
@@ -12,9 +12,9 @@ shortTitle: Manage multiple accounts
## About management of multiple accounts ## About management of multiple accounts
In some cases, you may need to use multiple accounts on {% data variables.product.product_location %}. For example, you may have a personal account for open source contributions, and your employer may also create and manage a user account for you within an enterprise. In some cases, you may need to use multiple accounts on {% data variables.location.product_location %}. For example, you may have a personal account for open source contributions, and your employer may also create and manage a user account for you within an enterprise.
You cannot use your {% data variables.product.prodname_managed_user %} to contribute to public projects on {% data variables.product.product_location %}, so you must contribute to those resources using your personal account. For more information, see "[About {% data variables.product.prodname_emus %}]({% ifversion fpt %}/enterprise-cloud@latest{% endif %}/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users#abilities-and-restrictions-of-managed-user-accounts){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% elsif ghec %}."{% endif %} You cannot use your {% data variables.enterprise.prodname_managed_user %} to contribute to public projects on {% data variables.location.product_location %}, so you must contribute to those resources using your personal account. For more information, see "[About {% data variables.product.prodname_emus %}]({% ifversion fpt %}/enterprise-cloud@latest{% endif %}/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users#abilities-and-restrictions-of-managed-user-accounts){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% elsif ghec %}."{% endif %}
If you want to use one workstation to contribute from both accounts, you can simplify contribution with Git by using a mixture of protocols to access repository data, or by using credentials on a per-repository basis. If you want to use one workstation to contribute from both accounts, you can simplify contribution with Git by using a mixture of protocols to access repository data, or by using credentials on a per-repository basis.
@@ -24,13 +24,13 @@ If you want to use one workstation to contribute from both accounts, you can sim
{% endwarning %} {% endwarning %}
If you aren't required to use a {% data variables.product.prodname_managed_user %}, {% data variables.product.company_short %} recommends that you use one personal account for all your work on {% data variables.product.product_location %}. With a single personal account, you can contribute to a combination of personal, open source, or professional projects using one identity. Other people can invite the account to contribute to both individual repositories and repositories owned by an organization, and the account can be a member of multiple organizations or enterprises. If you aren't required to use a {% data variables.enterprise.prodname_managed_user %}, {% data variables.product.company_short %} recommends that you use one personal account for all your work on {% data variables.location.product_location %}. With a single personal account, you can contribute to a combination of personal, open source, or professional projects using one identity. Other people can invite the account to contribute to both individual repositories and repositories owned by an organization, and the account can be a member of multiple organizations or enterprises.
## Contributing to two accounts using HTTPS and SSH ## Contributing to two accounts using HTTPS and SSH
If you contribute with two accounts from one workstation, you can access repositories by using a different protocol and credentials for each account. If you contribute with two accounts from one workstation, you can access repositories by using a different protocol and credentials for each account.
Git can use either the HTTPS or SSH protocol to access and update data in repositories on {% data variables.product.product_location %}. The protocol you use to clone a repository determines which credentials your workstation will use to authenticate when you access the repository. With this approach to account management, you store the credentials for one account to use for HTTPS connections and upload an SSH key to the other account to use for SSH connections. Git can use either the HTTPS or SSH protocol to access and update data in repositories on {% data variables.location.product_location %}. The protocol you use to clone a repository determines which credentials your workstation will use to authenticate when you access the repository. With this approach to account management, you store the credentials for one account to use for HTTPS connections and upload an SSH key to the other account to use for SSH connections.
You can find both the HTTPS or an SSH URLs for cloning a repository on {% data variables.product.product_name %}. For more information, see "[Cloning a repository](/repositories/creating-and-managing-repositories/cloning-a-repository)." You can find both the HTTPS or an SSH URLs for cloning a repository on {% data variables.product.product_name %}. For more information, see "[Cloning a repository](/repositories/creating-and-managing-repositories/cloning-a-repository)."
@@ -98,7 +98,7 @@ To use a different SSH key for different repositories that you clone to your wor
2. Choose the correct SSH key for authentication. 2. Choose the correct SSH key for authentication.
3. Modify `GIT_SSH_COMMAND` accordingly. For more information about `GIT_SSH_COMMAND`, see [Environment Variables](https://git-scm.com/docs/git#Documentation/git.txt-codeGITSSHCOMMANDcode) in the Git documentation. 3. Modify `GIT_SSH_COMMAND` accordingly. For more information about `GIT_SSH_COMMAND`, see [Environment Variables](https://git-scm.com/docs/git#Documentation/git.txt-codeGITSSHCOMMANDcode) in the Git documentation.
For example, the following command sets the `GIT_SSH_COMMAND` environment variable to specify an SSH command that uses the private key file at **_PATH/TO/KEY/FILE_** for authentication to clone the repository named **_OWNER_**/**_REPOSITORY_** on {% data variables.product.product_location %}. For example, the following command sets the `GIT_SSH_COMMAND` environment variable to specify an SSH command that uses the private key file at **_PATH/TO/KEY/FILE_** for authentication to clone the repository named **_OWNER_**/**_REPOSITORY_** on {% data variables.location.product_location %}.
<pre> <pre>
GIT_SSH_COMMAND='ssh -i <em>PATH/TO/KEY/FILE</em> -o IdentitiesOnly=yes' git clone git@github.com:<em>OWNER</em>/<em>REPOSITORY</em> GIT_SSH_COMMAND='ssh -i <em>PATH/TO/KEY/FILE</em> -o IdentitiesOnly=yes' git clone git@github.com:<em>OWNER</em>/<em>REPOSITORY</em>

View File

@@ -51,7 +51,7 @@ For a definition of common terms, see "[Core concepts for {% data variables.prod
{% data variables.product.product_name %} offers CI starter workflow for a variety of languages and frameworks. {% data variables.product.product_name %} offers CI starter workflow for a variety of languages and frameworks.
Browse the complete list of CI starter workflow offered by {% data variables.product.company_short %} in the {% ifversion fpt or ghec %}[actions/starter-workflows](https://github.com/actions/starter-workflows/tree/main/ci) repository{% else %} `actions/starter-workflows` repository on {% data variables.product.product_location %}{% endif %}. Browse the complete list of CI starter workflow offered by {% data variables.product.company_short %} in the {% ifversion fpt or ghec %}[actions/starter-workflows](https://github.com/actions/starter-workflows/tree/main/ci) repository{% else %} `actions/starter-workflows` repository on {% data variables.location.product_location %}{% endif %}.
## Further reading ## Further reading

View File

@@ -27,9 +27,9 @@ Once you complete this project, you should understand how to build your own comp
## Prerequisites ## Prerequisites
Before you begin, you'll create a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}. Before you begin, you'll create a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}.
1. Create a new public repository on {% data variables.product.product_location %}. You can choose any repository name, or use the following `hello-world-composite-action` example. You can add these files after your project has been pushed to {% data variables.product.product_name %}. For more information, see "[Create a new repository](/articles/creating-a-new-repository)." 1. Create a new public repository on {% data variables.location.product_location %}. You can choose any repository name, or use the following `hello-world-composite-action` example. You can add these files after your project has been pushed to {% data variables.product.product_name %}. For more information, see "[Create a new repository](/articles/creating-a-new-repository)."
1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)." 1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)."

View File

@@ -44,7 +44,7 @@ You may find it helpful to have a basic understanding of {% data variables.produ
Before you begin, you'll need to create a {% data variables.product.prodname_dotcom %} repository. Before you begin, you'll need to create a {% data variables.product.prodname_dotcom %} repository.
1. Create a new repository on {% data variables.product.product_location %}. You can choose any repository name or use "hello-world-docker-action" like this example. For more information, see "[Create a new repository](/articles/creating-a-new-repository)." 1. Create a new repository on {% data variables.location.product_location %}. You can choose any repository name or use "hello-world-docker-action" like this example. For more information, see "[Create a new repository](/articles/creating-a-new-repository)."
1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)." 1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)."

View File

@@ -41,7 +41,7 @@ Before you begin, you'll need to download Node.js and create a public {% data va
{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}https://nodejs.org/en/download/{% else %}https://nodejs.org/en/download/releases/{% endif %} {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}https://nodejs.org/en/download/{% else %}https://nodejs.org/en/download/releases/{% endif %}
1. Create a new public repository on {% data variables.product.product_location %} and call it "hello-world-javascript-action". For more information, see "[Create a new repository](/articles/creating-a-new-repository)." 1. Create a new public repository on {% data variables.location.product_location %} and call it "hello-world-javascript-action". For more information, see "[Create a new repository](/articles/creating-a-new-repository)."
1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)." 1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)."
@@ -141,29 +141,31 @@ In your `hello-world-javascript-action` directory, create a `README.md` file tha
- Environment variables the action uses. - Environment variables the action uses.
- An example of how to use your action in a workflow. - An example of how to use your action in a workflow.
```markdown{:copy} ````markdown{:copy}
# Hello world javascript action # Hello world javascript action
This action prints "Hello World" or "Hello" + the name of a person to greet to the log. This action prints "Hello World" or "Hello" + the name of a person to greet to the log.
## Inputs ## Inputs
## `who-to-greet` ### `who-to-greet`
**Required** The name of the person to greet. Default `"World"`. **Required** The name of the person to greet. Default `"World"`.
## Outputs ## Outputs
## `time` ### `time`
The time we greeted you. The time we greeted you.
## Example usage ## Example usage
```yaml
uses: actions/hello-world-javascript-action@v1.1 uses: actions/hello-world-javascript-action@v1.1
with: with:
who-to-greet: 'Mona the Octocat' who-to-greet: 'Mona the Octocat'
``` ```
````
## Commit, tag, and push your action to GitHub ## Commit, tag, and push your action to GitHub

View File

@@ -147,7 +147,7 @@ You can also view the logs of each workflow run and the history of workflow runs
## Tracking deployments through apps ## Tracking deployments through apps
{% ifversion fpt or ghec %} {% ifversion fpt or ghec %}
If your personal account or organization on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} is integrated with Microsoft Teams or Slack, you can track deployments that use environments through Microsoft Teams or Slack. For example, you can receive notifications through the app when a deployment is pending approval, when a deployment is approved, or when the deployment status changes. For more information about integrating Microsoft Teams or Slack, see "[GitHub extensions and integrations](/github/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations#team-communication-tools)." If your personal account or organization on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} is integrated with Microsoft Teams or Slack, you can track deployments that use environments through Microsoft Teams or Slack. For example, you can receive notifications through the app when a deployment is pending approval, when a deployment is approved, or when the deployment status changes. For more information about integrating Microsoft Teams or Slack, see "[GitHub extensions and integrations](/github/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations#team-communication-tools)."
{% endif %} {% endif %}
You can also build an app that uses deployment and deployment status webhooks to track deployments. {% data reusables.actions.environment-deployment-event %} For more information, see "[Apps](/developers/apps)" and "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment)." You can also build an app that uses deployment and deployment status webhooks to track deployments. {% data reusables.actions.environment-deployment-event %} For more information, see "[Apps](/developers/apps)" and "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment)."

View File

@@ -17,7 +17,7 @@ type: overview
## About self-hosted runners ## About self-hosted runners
A self-hosted runner is a system that you deploy and manage to execute jobs from {% data variables.product.prodname_actions %} on {% ifversion ghae or ghec %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}. For more information about {% data variables.product.prodname_actions %}, see "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions){% ifversion fpt %}."{% elsif ghec or ghes or ghae %}" and "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)."{% endif %} A self-hosted runner is a system that you deploy and manage to execute jobs from {% data variables.product.prodname_actions %} on {% ifversion ghae or ghec %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. For more information about {% data variables.product.prodname_actions %}, see "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions){% ifversion fpt %}."{% elsif ghec or ghes or ghae %}" and "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)."{% endif %}
{% data reusables.actions.self-hosted-runner-description %} {% data reusables.actions.self-hosted-runner-locations %} {% data reusables.actions.self-hosted-runner-description %} {% data reusables.actions.self-hosted-runner-locations %}
@@ -143,14 +143,14 @@ The self-hosted runner connects to {% data variables.product.product_name %} to
{% data reusables.actions.self-hosted-runner-ports-protocols %} {% data reusables.actions.self-hosted-runner-ports-protocols %}
{% ifversion fpt or ghec %} {% ifversion fpt or ghec %}
Since the self-hosted runner opens a connection to {% data variables.product.product_location %}, you do not need to allow {% data variables.product.prodname_dotcom %} to make inbound connections to your self-hosted runner. Since the self-hosted runner opens a connection to {% data variables.location.product_location %}, you do not need to allow {% data variables.product.prodname_dotcom %} to make inbound connections to your self-hosted runner.
{% elsif ghes or ghae %} {% elsif ghes or ghae %}
Only an outbound connection from the runner to {% data variables.product.product_location %} is required. There is no need for an inbound connection from {% data variables.product.product_location %} to the runner. Only an outbound connection from the runner to {% data variables.location.product_location %} is required. There is no need for an inbound connection from {% data variables.location.product_location %} to the runner.
{%- endif %} {%- endif %}
{% ifversion ghes %} {% ifversion ghes %}
{% data variables.product.product_name %} must accept inbound connections from your runners over {% ifversion ghes %}HTTP(S){% else %}HTTPS{% endif %} at {% data variables.product.product_location %}'s hostname and API subdomain, and your runners must allow outbound connections over {% ifversion ghes %}HTTP(S){% else %}HTTPS{% endif %} to {% data variables.product.product_location %}'s hostname and API subdomain. {% data variables.product.product_name %} must accept inbound connections from your runners over {% ifversion ghes %}HTTP(S){% else %}HTTPS{% endif %} at {% data variables.location.product_location %}'s hostname and API subdomain, and your runners must allow outbound connections over {% ifversion ghes %}HTTP(S){% else %}HTTPS{% endif %} to {% data variables.location.product_location %}'s hostname and API subdomain.
{% elsif ghae %} {% elsif ghae %}
@@ -217,7 +217,7 @@ If you use an IP address allow list for your {% data variables.product.prodname_
{% else %} {% else %}
{% ifversion ghes %}Self-hosted runners do not require any external internet access in order to function. As a result, you can use network routing to direct communication between the self-hosted runner and {% data variables.product.product_location %}. For example, you can assign a private IP address to your self-hosted runner and configure routing to send traffic to {% data variables.product.product_location %}, with no need for traffic to traverse a public network.{% endif %} {% ifversion ghes %}Self-hosted runners do not require any external internet access in order to function. As a result, you can use network routing to direct communication between the self-hosted runner and {% data variables.location.product_location %}. For example, you can assign a private IP address to your self-hosted runner and configure routing to send traffic to {% data variables.location.product_location %}, with no need for traffic to traverse a public network.{% endif %}
{% endif %} {% endif %}
@@ -233,7 +233,7 @@ For more information about troubleshooting common network connectivity issues, s
## Communication between self-hosted runners and {% data variables.product.prodname_dotcom_the_website %} ## Communication between self-hosted runners and {% data variables.product.prodname_dotcom_the_website %}
Self-hosted runners do not need to connect to {% data variables.product.prodname_dotcom_the_website %} unless you have enabled automatic access to {% data variables.product.prodname_dotcom_the_website %} actions for {% data variables.product.product_location %}. For more information, see "[About using actions in your enterprise](/admin/github-actions/managing-access-to-actions-from-githubcom/about-using-actions-in-your-enterprise)." Self-hosted runners do not need to connect to {% data variables.product.prodname_dotcom_the_website %} unless you have enabled automatic access to {% data variables.product.prodname_dotcom_the_website %} actions for {% data variables.location.product_location %}. For more information, see "[About using actions in your enterprise](/admin/github-actions/managing-access-to-actions-from-githubcom/about-using-actions-in-your-enterprise)."
If you have enabled automatic access to {% data variables.product.prodname_dotcom_the_website %} actions, then the self-hosted runner will connect directly to {% data variables.product.prodname_dotcom_the_website %} to download actions. You must ensure that the machine has the appropriate network access to communicate with the {% data variables.product.prodname_dotcom %} URLs listed below. If you have enabled automatic access to {% data variables.product.prodname_dotcom_the_website %} actions, then the self-hosted runner will connect directly to {% data variables.product.prodname_dotcom_the_website %} to download actions. You must ensure that the machine has the appropriate network access to communicate with the {% data variables.product.prodname_dotcom %} URLs listed below.

View File

@@ -37,7 +37,7 @@ shortTitle: Monitor & troubleshoot
### Checking self-hosted runner network connectivity ### Checking self-hosted runner network connectivity
You can use the self-hosted runner application's `run` script with the `--check` parameter to check that a self-hosted runner can access all required network services on {% data variables.product.product_location %}. You can use the self-hosted runner application's `run` script with the `--check` parameter to check that a self-hosted runner can access all required network services on {% data variables.location.product_location %}.
In addition to `--check`, you must provide two arguments to the script: In addition to `--check`, you must provide two arguments to the script:
@@ -260,7 +260,7 @@ User=runner-user
{% endlinux %} {% endlinux %}
{% ifversion ghes %} {% ifversion ghes %}
## Resolving runners that are offline after an upgrade of {% data variables.product.product_location %} ## Resolving runners that are offline after an upgrade of {% data variables.location.product_location %}
{% data reusables.actions.upgrade-runners-before-upgrade-ghes %} {% data reusables.actions.upgrade-runners-before-upgrade-ghes %}

View File

@@ -33,7 +33,7 @@ topics:
{% elsif ghes or ghae %} {% elsif ghes or ghae %}
You must host your own Linux, Windows, or macOS virtual machines to run workflows for {% data variables.product.product_location %}. {% data reusables.actions.self-hosted-runner-locations %} You must host your own Linux, Windows, or macOS virtual machines to run workflows for {% data variables.location.product_location %}. {% data reusables.actions.self-hosted-runner-locations %}
{% endif %} {% endif %}

View File

@@ -76,7 +76,7 @@ Called workflows that are owned by the same user or organization{% ifversion ghe
## Limitations ## Limitations
{% ifversion nested-reusable-workflow %} {% ifversion nested-reusable-workflow %}
* You can connect up to four levels of workflows. For more information, see "[Calling a nested reusable workflow](#calling-a-nested-reusable-workflow)." * You can connect up to four levels of workflows. For more information, see "[Nesting reusable workflows](#nesting-reusable-workflows)."
{% else %} {% else %}
* Reusable workflows can't call other reusable workflows. * Reusable workflows can't call other reusable workflows.
{% endif %} {% endif %}

View File

@@ -41,13 +41,13 @@ Storing artifacts uses storage space on {% data variables.product.product_name %
{% else %} {% else %}
Artifacts consume storage space on the external blob storage that is configured for {% data variables.product.prodname_actions %} on {% data variables.product.product_location %}. Artifacts consume storage space on the external blob storage that is configured for {% data variables.product.prodname_actions %} on {% data variables.location.product_location %}.
{% endif %} {% endif %}
Artifacts are uploaded during a workflow run, and you can view an artifact's name and size in the UI. When an artifact is downloaded using the {% data variables.product.product_name %} UI, all files that were individually uploaded as part of the artifact get zipped together into a single file. This means that billing is calculated based on the size of the uploaded artifact and not the size of the zip file. Artifacts are uploaded during a workflow run, and you can view an artifact's name and size in the UI. When an artifact is downloaded using the {% data variables.product.product_name %} UI, all files that were individually uploaded as part of the artifact get zipped together into a single file. This means that billing is calculated based on the size of the uploaded artifact and not the size of the zip file.
{% data variables.product.product_name %} provides two actions that you can use to upload and download build artifacts. For more information, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `actions/upload-artifact` and `download-artifact` actions on {% data variables.product.product_location %}{% endif %}. {% data variables.product.product_name %} provides two actions that you can use to upload and download build artifacts. For more information, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `actions/upload-artifact` and `download-artifact` actions on {% data variables.location.product_location %}{% endif %}.
To share data between jobs: To share data between jobs:
@@ -70,7 +70,7 @@ You can create a continuous integration (CI) workflow to build and test your cod
The output of building and testing your code often produces files you can use to debug test failures and production code that you can deploy. You can configure a workflow to build and test the code pushed to your repository and report a success or failure status. You can upload the build and test output to use for deployments, debugging failed tests or crashes, and viewing test suite coverage. The output of building and testing your code often produces files you can use to debug test failures and production code that you can deploy. You can configure a workflow to build and test the code pushed to your repository and report a success or failure status. You can upload the build and test output to use for deployments, debugging failed tests or crashes, and viewing test suite coverage.
You can use the `upload-artifact` action to upload artifacts. When uploading an artifact, you can specify a single file or directory, or multiple files or directories. You can also exclude certain files or directories, and use wildcard patterns. We recommend that you provide a name for an artifact, but if no name is provided then `artifact` will be used as the default name. For more information on syntax, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) action{% else %} `actions/upload-artifact` action on {% data variables.product.product_location %}{% endif %}. You can use the `upload-artifact` action to upload artifacts. When uploading an artifact, you can specify a single file or directory, or multiple files or directories. You can also exclude certain files or directories, and use wildcard patterns. We recommend that you provide a name for an artifact, but if no name is provided then `artifact` will be used as the default name. For more information on syntax, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) action{% else %} `actions/upload-artifact` action on {% data variables.location.product_location %}{% endif %}.
### Example ### Example
@@ -171,11 +171,11 @@ You can also download all artifacts in a workflow run by not specifying a name.
If you download all workflow run's artifacts, a directory for each artifact is created using its name. If you download all workflow run's artifacts, a directory for each artifact is created using its name.
For more information on syntax, see the {% ifversion fpt or ghec %}[actions/download-artifact](https://github.com/actions/download-artifact) action{% else %} `actions/download-artifact` action on {% data variables.product.product_location %}{% endif %}. For more information on syntax, see the {% ifversion fpt or ghec %}[actions/download-artifact](https://github.com/actions/download-artifact) action{% else %} `actions/download-artifact` action on {% data variables.location.product_location %}{% endif %}.
## Passing data between jobs in a workflow ## Passing data between jobs in a workflow
You can use the `upload-artifact` and `download-artifact` actions to share data between jobs in a workflow. This example workflow illustrates how to pass data between jobs in the same workflow. For more information, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `actions/upload-artifact` and `download-artifact` actions on {% data variables.product.product_location %}{% endif %}. You can use the `upload-artifact` and `download-artifact` actions to share data between jobs in a workflow. This example workflow illustrates how to pass data between jobs in the same workflow. For more information, see the {% ifversion fpt or ghec %}[actions/upload-artifact](https://github.com/actions/upload-artifact) and [download-artifact](https://github.com/actions/download-artifact) actions{% else %} `actions/upload-artifact` and `download-artifact` actions on {% data variables.location.product_location %}{% endif %}.
Jobs that are dependent on a previous job's artifacts must wait for the dependent job to complete successfully. This workflow uses the `needs` keyword to ensure that `job_1`, `job_2`, and `job_3` run sequentially. For example, `job_2` requires `job_1` using the `needs: job_1` syntax. Jobs that are dependent on a previous job's artifacts must wait for the dependent job to complete successfully. This workflow uses the `needs` keyword to ensure that `job_1`, `job_2`, and `job_3` run sequentially. For example, `job_2` requires `job_1` using the `needs: job_1` syntax.

View File

@@ -148,12 +148,12 @@ The following table shows which toolkit functions are available within a workflo
| `core.getState` | Accessible using environment variable `STATE_{NAME}` | | `core.getState` | Accessible using environment variable `STATE_{NAME}` |
| `core.isDebug` | Accessible using environment variable `RUNNER_DEBUG` | | `core.isDebug` | Accessible using environment variable `RUNNER_DEBUG` |
{%- ifversion actions-job-summaries %} {%- ifversion actions-job-summaries %}
| `core.summary` | Accessible using environment variable `GITHUB_STEP_SUMMARY` | | `core.summary` | Accessible using environment file `GITHUB_STEP_SUMMARY` |
{%- endif %} {%- endif %}
| `core.saveState` | {% ifversion actions-save-state-set-output-envs %}Accessible using environment variable `GITHUB_STATE`{% else %}`save-state`{% endif %} | | `core.saveState` | {% ifversion actions-save-state-set-output-envs %}Accessible using environment file `GITHUB_STATE`{% else %}`save-state`{% endif %} |
| `core.setCommandEcho` | `echo` | | `core.setCommandEcho` | `echo` |
| `core.setFailed` | Used as a shortcut for `::error` and `exit 1` | | `core.setFailed` | Used as a shortcut for `::error` and `exit 1` |
| `core.setOutput` | {% ifversion actions-save-state-set-output-envs %}Accessible using environment variable `GITHUB_OUTPUT`{% else %}`set-output`{% endif %} | | `core.setOutput` | {% ifversion actions-save-state-set-output-envs %}Accessible using environment file `GITHUB_OUTPUT`{% else %}`set-output`{% endif %} |
| `core.setSecret` | `add-mask` | | `core.setSecret` | `add-mask` |
| `core.startGroup` | `group` | | `core.startGroup` | `group` |
| `core.warning` | `warning` | | `core.warning` | `warning` |

View File

@@ -115,7 +115,7 @@ For more information, see "[Reusing workflows](/actions/learn-github-actions/reu
#### `on.workflow_call.inputs.<input_id>.type` #### `on.workflow_call.inputs.<input_id>.type`
Required if input is defined for the `on.workflow_call` keyword. The value of this parameter is a string specifying the data type of the input. This must be one of: `boolean`, `number`, `string` or `choice`. Required if input is defined for the `on.workflow_call` keyword. The value of this parameter is a string specifying the data type of the input. This must be one of: `boolean`, `number`, or `string`.
### `on.workflow_call.outputs` ### `on.workflow_call.outputs`

View File

@@ -1,7 +1,7 @@
--- ---
title: Configuring code scanning for your appliance title: Configuring code scanning for your appliance
shortTitle: Configuring code scanning shortTitle: Configuring code scanning
intro: 'You can enable, configure and disable {% data variables.product.prodname_code_scanning %} for {% data variables.product.product_location %}. {% data variables.product.prodname_code_scanning_capc %} allows users to scan code for vulnerabilities and errors.' intro: 'You can enable, configure and disable {% data variables.product.prodname_code_scanning %} for {% data variables.location.product_location %}. {% data variables.product.prodname_code_scanning_capc %} allows users to scan code for vulnerabilities and errors.'
product: '{% data reusables.gated-features.code-scanning %}' product: '{% data reusables.gated-features.code-scanning %}'
miniTocMaxHeadingLevel: 3 miniTocMaxHeadingLevel: 3
redirect_from: redirect_from:
@@ -24,7 +24,7 @@ topics:
{% data reusables.code-scanning.about-code-scanning %} {% data reusables.code-scanning.about-code-scanning %}
You can configure {% data variables.product.prodname_code_scanning %} to run {% data variables.product.prodname_codeql %} analysis and third-party analysis. {% data variables.product.prodname_code_scanning_capc %} also supports running analysis natively using {% data variables.product.prodname_actions %} or externally using existing CI/CD infrastructure. The table below summarizes all the options available to users when you configure {% data variables.product.product_location %} to allow {% data variables.product.prodname_code_scanning %} using actions. You can configure {% data variables.product.prodname_code_scanning %} to run {% data variables.product.prodname_codeql %} analysis and third-party analysis. {% data variables.product.prodname_code_scanning_capc %} also supports running analysis natively using {% data variables.product.prodname_actions %} or externally using existing CI/CD infrastructure. The table below summarizes all the options available to users when you configure {% data variables.location.product_location %} to allow {% data variables.product.prodname_code_scanning %} using actions.
{% data reusables.code-scanning.enabling-options %} {% data reusables.code-scanning.enabling-options %}
@@ -74,7 +74,7 @@ If you set up the {% data variables.product.prodname_codeql %} action sync tool,
### Configuring {% data variables.product.prodname_github_connect %} to sync {% data variables.product.prodname_actions %} ### Configuring {% data variables.product.prodname_github_connect %} to sync {% data variables.product.prodname_actions %}
1. If you want to download action workflows on demand from {% data variables.product.prodname_dotcom_the_website %}, you need to enable {% data variables.product.prodname_github_connect %}. For more information, see "[Enabling {% data variables.product.prodname_github_connect %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud#enabling-github-connect)." 1. If you want to download action workflows on demand from {% data variables.product.prodname_dotcom_the_website %}, you need to enable {% data variables.product.prodname_github_connect %}. For more information, see "[Enabling {% data variables.product.prodname_github_connect %}](/admin/configuration/managing-connections-between-your-enterprise-accounts/connecting-your-enterprise-account-to-github-enterprise-cloud#enabling-github-connect)."
2. You'll also need to enable {% data variables.product.prodname_actions %} for {% data variables.product.product_location %}. For more information, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server)." 2. You'll also need to enable {% data variables.product.prodname_actions %} for {% data variables.location.product_location %}. For more information, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.prodname_ghe_server %}](/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server)."
3. The next step is to configure access to actions on {% data variables.product.prodname_dotcom_the_website %} using {% data variables.product.prodname_github_connect %}. For more information, see "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/enterprise/admin/github-actions/enabling-automatic-access-to-githubcom-actions-using-github-connect)." 3. The next step is to configure access to actions on {% data variables.product.prodname_dotcom_the_website %} using {% data variables.product.prodname_github_connect %}. For more information, see "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/enterprise/admin/github-actions/enabling-automatic-access-to-githubcom-actions-using-github-connect)."
4. Add a self-hosted runner to your repository, organization, or enterprise account. For more information, see "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)." 4. Add a self-hosted runner to your repository, organization, or enterprise account. For more information, see "[Adding self-hosted runners](/actions/hosting-your-own-runners/adding-self-hosted-runners)."

View File

@@ -1,7 +1,7 @@
--- ---
title: Configuring dependency review for your appliance title: Configuring dependency review for your appliance
shortTitle: Configuring dependency review shortTitle: Configuring dependency review
intro: 'To helps users understand dependency changes when reviewing pull requests, you can enable, configure, and disable dependency review for {% data variables.product.product_location %}.' intro: 'To helps users understand dependency changes when reviewing pull requests, you can enable, configure, and disable dependency review for {% data variables.location.product_location %}.'
product: '{% data reusables.gated-features.dependency-review %}' product: '{% data reusables.gated-features.dependency-review %}'
miniTocMaxHeadingLevel: 3 miniTocMaxHeadingLevel: 3
versions: versions:

View File

@@ -1,7 +1,7 @@
--- ---
title: Configuring secret scanning for your appliance title: Configuring secret scanning for your appliance
shortTitle: Configuring secret scanning shortTitle: Configuring secret scanning
intro: 'You can enable, configure, and disable {% data variables.product.prodname_secret_scanning %} for {% data variables.product.product_location %}. {% data variables.product.prodname_secret_scanning_caps %} allows users to scan code for accidentally committed secrets.' intro: 'You can enable, configure, and disable {% data variables.product.prodname_secret_scanning %} for {% data variables.location.product_location %}. {% data variables.product.prodname_secret_scanning_caps %} allows users to scan code for accidentally committed secrets.'
product: '{% data reusables.gated-features.secret-scanning %}' product: '{% data reusables.gated-features.secret-scanning %}'
miniTocMaxHeadingLevel: 3 miniTocMaxHeadingLevel: 3
redirect_from: redirect_from:
@@ -29,7 +29,7 @@ If someone checks a secret with a known pattern into a repository, {% data varia
## Prerequisites for {% data variables.product.prodname_secret_scanning %} ## Prerequisites for {% data variables.product.prodname_secret_scanning %}
- The [SSSE3](https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf#G3.1106470) (Supplemental Streaming SIMD Extensions 3) CPU flag needs to be enabled on the VM/KVM that runs {% data variables.product.product_location %}. - The [SSSE3](https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf#G3.1106470) (Supplemental Streaming SIMD Extensions 3) CPU flag needs to be enabled on the VM/KVM that runs {% data variables.location.product_location %}.
- A license for {% data variables.product.prodname_GH_advanced_security %}{% ifversion ghes %} (see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)"){% endif %} - A license for {% data variables.product.prodname_GH_advanced_security %}{% ifversion ghes %} (see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)"){% endif %}
@@ -46,7 +46,7 @@ The SSSE3 set of instructions is required because {% data variables.product.prod
grep -iE '^flags.*ssse3' /proc/cpuinfo >/dev/null | echo $? grep -iE '^flags.*ssse3' /proc/cpuinfo >/dev/null | echo $?
``` ```
If this returns the value `0`, it means that the SSSE3 flag is available and enabled. You can now enable {% data variables.product.prodname_secret_scanning %} for {% data variables.product.product_location %}. For more information, see "[Enabling {% data variables.product.prodname_secret_scanning %}](#enabling-secret-scanning)" below. If this returns the value `0`, it means that the SSSE3 flag is available and enabled. You can now enable {% data variables.product.prodname_secret_scanning %} for {% data variables.location.product_location %}. For more information, see "[Enabling {% data variables.product.prodname_secret_scanning %}](#enabling-secret-scanning)" below.
If this doesn't return `0`, SSSE3 is not enabled on your VM/KVM. You need to refer to the documentation of the hardware/hypervisor on how to enable the flag, or make it available to guest VMs. If this doesn't return `0`, SSSE3 is not enabled on your VM/KVM. You need to refer to the documentation of the hardware/hypervisor on how to enable the flag, or make it available to guest VMs.

View File

@@ -44,7 +44,7 @@ For guidance on a phased deployment of GitHub Advanced Security, see "[Introduct
1. Upgrade your license for {% data variables.product.product_name %} to include {% data variables.product.prodname_GH_advanced_security %}.{% ifversion ghes %} For information about licensing, see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)."{% endif %} 1. Upgrade your license for {% data variables.product.product_name %} to include {% data variables.product.prodname_GH_advanced_security %}.{% ifversion ghes %} For information about licensing, see "[About billing for {% data variables.product.prodname_GH_advanced_security %}](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)."{% endif %}
2. Download the new license file. For more information, see "[Downloading your license for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise)." 2. Download the new license file. For more information, see "[Downloading your license for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise/downloading-your-license-for-github-enterprise)."
3. Upload the new license file to {% data variables.product.product_location %}. For more information, see "[Uploading a new license to {% data variables.product.prodname_ghe_server %}](/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)."{% ifversion ghes %} 3. Upload the new license file to {% data variables.location.product_location %}. For more information, see "[Uploading a new license to {% data variables.product.prodname_ghe_server %}](/billing/managing-your-license-for-github-enterprise/uploading-a-new-license-to-github-enterprise-server)."{% ifversion ghes %}
4. Review the prerequisites for the features you plan to enable. 4. Review the prerequisites for the features you plan to enable.
- {% data variables.product.prodname_code_scanning_capc %}, see "[Configuring {% data variables.product.prodname_code_scanning %} for your appliance](/admin/advanced-security/configuring-code-scanning-for-your-appliance#prerequisites-for-code-scanning)." - {% data variables.product.prodname_code_scanning_capc %}, see "[Configuring {% data variables.product.prodname_code_scanning %} for your appliance](/admin/advanced-security/configuring-code-scanning-for-your-appliance#prerequisites-for-code-scanning)."
@@ -68,11 +68,11 @@ When {% data variables.product.product_name %} has finished restarting, you're r
## Enabling or disabling {% data variables.product.prodname_GH_advanced_security %} features via the administrative shell (SSH) ## Enabling or disabling {% data variables.product.prodname_GH_advanced_security %} features via the administrative shell (SSH)
You can enable or disable features programmatically on {% data variables.product.product_location %}. For more information about the administrative shell and command-line utilities for {% data variables.product.prodname_ghe_server %}, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)" and "[Command-line utilities](/admin/configuration/command-line-utilities#ghe-config)." You can enable or disable features programmatically on {% data variables.location.product_location %}. For more information about the administrative shell and command-line utilities for {% data variables.product.prodname_ghe_server %}, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)" and "[Command-line utilities](/admin/configuration/command-line-utilities#ghe-config)."
For example, you can enable any {% data variables.product.prodname_GH_advanced_security %} feature with your infrastructure-as-code tooling when you deploy an instance for staging or disaster recovery. For example, you can enable any {% data variables.product.prodname_GH_advanced_security %} feature with your infrastructure-as-code tooling when you deploy an instance for staging or disaster recovery.
1. SSH into {% data variables.product.product_location %}. 1. SSH into {% data variables.location.product_location %}.
1. Enable features for {% data variables.product.prodname_GH_advanced_security %}. 1. Enable features for {% data variables.product.prodname_GH_advanced_security %}.
- To enable {% data variables.product.prodname_code_scanning_capc %}, enter the following commands. - To enable {% data variables.product.prodname_code_scanning_capc %}, enter the following commands.

View File

@@ -13,8 +13,8 @@ topics:
- Dependency graph - Dependency graph
--- ---
You can allow users to identify their projects' dependencies by {% ifversion ghes %}enabling{% elsif ghae %}using{% endif %} the dependency graph for {% data variables.product.product_location %}. For more information, see "{% ifversion ghes %}[Enabling the dependency graph for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise){% elsif ghae %}[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph){% endif %}." You can allow users to identify their projects' dependencies by {% ifversion ghes %}enabling{% elsif ghae %}using{% endif %} the dependency graph for {% data variables.location.product_location %}. For more information, see "{% ifversion ghes %}[Enabling the dependency graph for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise){% elsif ghae %}[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph){% endif %}."
You can also allow users on {% data variables.product.product_location %} to find and fix vulnerabilities in their code dependencies by enabling {% data variables.product.prodname_dependabot_alerts %}{% ifversion ghes > 3.2 %} and {% data variables.product.prodname_dependabot_updates %}{% endif %}. For more information, see "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)." You can also allow users on {% data variables.location.product_location %} to find and fix vulnerabilities in their code dependencies by enabling {% data variables.product.prodname_dependabot_alerts %}{% ifversion ghes > 3.2 %} and {% data variables.product.prodname_dependabot_updates %}{% endif %}. For more information, see "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)."
After you enable {% data variables.product.prodname_dependabot_alerts %}, you can view vulnerability data from the {% data variables.product.prodname_advisory_database %} on {% data variables.product.product_location %} and manually sync the data. For more information, see "[Viewing the vulnerability data for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/viewing-the-vulnerability-data-for-your-enterprise)." After you enable {% data variables.product.prodname_dependabot_alerts %}, you can view vulnerability data from the {% data variables.product.prodname_advisory_database %} on {% data variables.location.product_location %} and manually sync the data. For more information, see "[Viewing the vulnerability data for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/viewing-the-vulnerability-data-for-your-enterprise)."

View File

@@ -19,11 +19,11 @@ topics:
After you enable the dependency graph for your enterprise, you can enable {% data variables.product.prodname_dependabot %} to detect insecure dependencies in your repository{% ifversion ghes > 3.2 %} and automatically fix the vulnerabilities{% endif %}. For more information, see "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)." After you enable the dependency graph for your enterprise, you can enable {% data variables.product.prodname_dependabot %} to detect insecure dependencies in your repository{% ifversion ghes > 3.2 %} and automatically fix the vulnerabilities{% endif %}. For more information, see "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)."
{% ifversion ghes %} {% ifversion ghes %}
You can enable the dependency graph via the {% data variables.enterprise.management_console %} or the administrative shell. We recommend using the {% data variables.enterprise.management_console %} unless {% data variables.product.product_location %} uses clustering. You can enable the dependency graph via the {% data variables.enterprise.management_console %} or the administrative shell. We recommend using the {% data variables.enterprise.management_console %} unless {% data variables.location.product_location %} uses clustering.
## Enabling the dependency graph via the {% data variables.enterprise.management_console %} ## Enabling the dependency graph via the {% data variables.enterprise.management_console %}
If {% data variables.product.product_location %} uses clustering, you cannot enable the dependency graph with the {% data variables.enterprise.management_console %} and must use the administrative shell instead. For more information, see "[Enabling the dependency graph via the administrative shell](#enabling-the-dependency-graph-via-the-administrative-shell)." If {% data variables.location.product_location %} uses clustering, you cannot enable the dependency graph with the {% data variables.enterprise.management_console %} and must use the administrative shell instead. For more information, see "[Enabling the dependency graph via the administrative shell](#enabling-the-dependency-graph-via-the-administrative-shell)."
{% data reusables.enterprise_site_admin_settings.sign-in %} {% data reusables.enterprise_site_admin_settings.sign-in %}
{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.access-settings %}
@@ -38,7 +38,7 @@ If {% data variables.product.product_location %} uses clustering, you cannot ena
{% endif %} {% endif %}
{% data reusables.enterprise_site_admin_settings.sign-in %} {% data reusables.enterprise_site_admin_settings.sign-in %}
1. In the administrative shell, enable the dependency graph on {% data variables.product.product_location %}: 1. In the administrative shell, enable the dependency graph on {% data variables.location.product_location %}:
{% ifversion ghes %}```shell {% ifversion ghes %}```shell
ghe-config app.dependency-graph.enabled true ghe-config app.dependency-graph.enabled true
``` ```

View File

@@ -1,8 +1,8 @@
--- ---
title: Viewing the vulnerability data for your enterprise title: Viewing the vulnerability data for your enterprise
intro: 'You can view vulnerability data from the {% data variables.product.prodname_advisory_database %} on {% data variables.product.product_location %}.' intro: 'You can view vulnerability data from the {% data variables.product.prodname_advisory_database %} on {% data variables.location.product_location %}.'
shortTitle: View vulnerability data shortTitle: View vulnerability data
permissions: 'Site administrators can view vulnerability data on {% data variables.product.product_location %}.' permissions: 'Site administrators can view vulnerability data on {% data variables.location.product_location %}.'
versions: versions:
ghes: '*' ghes: '*'
ghae: '*' ghae: '*'
@@ -13,7 +13,7 @@ topics:
- Dependency graph - Dependency graph
--- ---
If {% data variables.product.prodname_dependabot_alerts %} are enabled for your enterprise, you can view all vulnerabilities that were downloaded to {% data variables.product.product_location %} from the {% data variables.product.prodname_advisory_database %}. If {% data variables.product.prodname_dependabot_alerts %} are enabled for your enterprise, you can view all vulnerabilities that were downloaded to {% data variables.location.product_location %} from the {% data variables.product.prodname_advisory_database %}.
You can manually sync vulnerability data from {% data variables.product.prodname_dotcom_the_website %} to update the list. You can manually sync vulnerability data from {% data variables.product.prodname_dotcom_the_website %} to update the list.

View File

@@ -13,28 +13,28 @@ miniTocMaxHeadingLevel: 3
## About {% data variables.product.prodname_github_connect %} ## About {% data variables.product.prodname_github_connect %}
{% data variables.product.prodname_github_connect %} enhances {% data variables.product.product_name %} by allowing {% data variables.product.product_location %} to benefit from the power of {% data variables.product.prodname_dotcom_the_website %} in limited ways. After you enable {% data variables.product.prodname_github_connect %}, you can enable additional features and workflows that rely on {% data variables.product.prodname_dotcom_the_website %}, such as {% data variables.product.prodname_dependabot_alerts %} for security vulnerabilities that are tracked in the {% data variables.product.prodname_advisory_database %}. {% data variables.product.prodname_github_connect %} enhances {% data variables.product.product_name %} by allowing {% data variables.location.product_location %} to benefit from the power of {% data variables.product.prodname_dotcom_the_website %} in limited ways. After you enable {% data variables.product.prodname_github_connect %}, you can enable additional features and workflows that rely on {% data variables.product.prodname_dotcom_the_website %}, such as {% data variables.product.prodname_dependabot_alerts %} for security vulnerabilities that are tracked in the {% data variables.product.prodname_advisory_database %}.
{% data variables.product.prodname_github_connect %} does not open {% data variables.product.product_location %} to the public internet. None of your enterprise's private data is exposed to {% data variables.product.prodname_dotcom_the_website %} users. Instead, {% data variables.product.prodname_github_connect %} transmits only the limited data needed for the individual features you choose to enable. Unless you enable license sync, no personal data is transmitted by {% data variables.product.prodname_github_connect %}. For more information about what data is transmitted by {% data variables.product.prodname_github_connect %}, see "[Data transmission for {% data variables.product.prodname_github_connect %}](#data-transmission-for-github-connect)." {% data variables.product.prodname_github_connect %} does not open {% data variables.location.product_location %} to the public internet. None of your enterprise's private data is exposed to {% data variables.product.prodname_dotcom_the_website %} users. Instead, {% data variables.product.prodname_github_connect %} transmits only the limited data needed for the individual features you choose to enable. Unless you enable license sync, no personal data is transmitted by {% data variables.product.prodname_github_connect %}. For more information about what data is transmitted by {% data variables.product.prodname_github_connect %}, see "[Data transmission for {% data variables.product.prodname_github_connect %}](#data-transmission-for-github-connect)."
Enabling {% data variables.product.prodname_github_connect %} will not allow {% data variables.product.prodname_dotcom_the_website %} users to make changes to {% data variables.product.product_name %}. Enabling {% data variables.product.prodname_github_connect %} will not allow {% data variables.product.prodname_dotcom_the_website %} users to make changes to {% data variables.product.product_name %}.
To enable {% data variables.product.prodname_github_connect %}, you configure a connection between {% data variables.product.product_location %} and an organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that uses {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)." To enable {% data variables.product.prodname_github_connect %}, you configure a connection between {% data variables.location.product_location %} and an organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that uses {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
After enabling {% data variables.product.prodname_github_connect %}, you will be able to enable features such as {% ifversion ghes %}automatic user license sync and {% endif %}{% data variables.product.prodname_dependabot_alerts %}. For more information about all of the features available, see "[{% data variables.product.prodname_github_connect %} features](#github-connect-features)." After enabling {% data variables.product.prodname_github_connect %}, you will be able to enable features such as {% ifversion ghes %}automatic user license sync and {% endif %}{% data variables.product.prodname_dependabot_alerts %}. For more information about all of the features available, see "[{% data variables.product.prodname_github_connect %} features](#github-connect-features)."
## {% data variables.product.prodname_github_connect %} features ## {% data variables.product.prodname_github_connect %} features
After you configure the connection between {% data variables.product.product_location %} and {% data variables.product.prodname_ghe_cloud %}, you can enable individual features of {% data variables.product.prodname_github_connect %} for your enterprise. After you configure the connection between {% data variables.location.product_location %} and {% data variables.product.prodname_ghe_cloud %}, you can enable individual features of {% data variables.product.prodname_github_connect %} for your enterprise.
Feature | Description | More information | Feature | Description | More information |
------- | ----------- | ---------------- |{% ifversion ghes %} ------- | ----------- | ---------------- |{% ifversion ghes %}
Automatic user license sync | Manage license usage across your {% data variables.product.prodname_enterprise %} deployments by automatically syncing user licenses from {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}. | "[Enabling automatic user license sync for your enterprise](/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise)"{% endif %}{% ifversion ghes or ghae %} Automatic user license sync | Manage license usage across your {% data variables.product.prodname_enterprise %} deployments by automatically syncing user licenses from {% data variables.location.product_location %} to {% data variables.product.prodname_ghe_cloud %}. | "[Enabling automatic user license sync for your enterprise](/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise)"{% endif %}{% ifversion ghes or ghae %}
{% data variables.product.prodname_dependabot %} | Allow users to find and fix vulnerabilities in code dependencies. | "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)"{% endif %} {% data variables.product.prodname_dependabot %} | Allow users to find and fix vulnerabilities in code dependencies. | "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)"{% endif %}
{% data variables.product.prodname_dotcom_the_website %} actions | Allow users to use actions from {% data variables.product.prodname_dotcom_the_website %} in workflow files. | "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)"{% ifversion server-statistics %} {% data variables.product.prodname_dotcom_the_website %} actions | Allow users to use actions from {% data variables.product.prodname_dotcom_the_website %} in workflow files. | "[Enabling automatic access to {% data variables.product.prodname_dotcom_the_website %} actions using {% data variables.product.prodname_github_connect %}](/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect)"{% ifversion server-statistics %}
{% data variables.product.prodname_server_statistics %} | Analyze your own aggregate data from GitHub Enterprise Server, and help us improve GitHub products. | "[Enabling {% data variables.product.prodname_server_statistics %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)"{% endif %} {% data variables.product.prodname_server_statistics %} | Analyze your own aggregate data from GitHub Enterprise Server, and help us improve GitHub products. | "[Enabling {% data variables.product.prodname_server_statistics %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)"{% endif %}
Unified search | Allow users to include repositories on {% data variables.product.prodname_dotcom_the_website %} in their search results when searching from {% data variables.product.product_location %}. | "[Enabling {% data variables.product.prodname_unified_search %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise)" Unified search | Allow users to include repositories on {% data variables.product.prodname_dotcom_the_website %} in their search results when searching from {% data variables.location.product_location %}. | "[Enabling {% data variables.enterprise.prodname_unified_search %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-unified-search-for-your-enterprise)"
Unified contributions | Allow users to include anonymized contribution counts for their work on {% data variables.product.product_location %} in their contribution graphs on {% data variables.product.prodname_dotcom_the_website %}. | "[Enabling {% data variables.product.prodname_unified_contributions %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise)" Unified contributions | Allow users to include anonymized contribution counts for their work on {% data variables.location.product_location %} in their contribution graphs on {% data variables.product.prodname_dotcom_the_website %}. | "[Enabling {% data variables.enterprise.prodname_unified_contributions %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-unified-contributions-for-your-enterprise)"
## Data transmission for {% data variables.product.prodname_github_connect %} ## Data transmission for {% data variables.product.prodname_github_connect %}
@@ -53,17 +53,17 @@ When you enable {% data variables.product.prodname_github_connect %} or specific
- The public key portion of your {% data variables.product.prodname_ghe_server %} license - The public key portion of your {% data variables.product.prodname_ghe_server %} license
- A hash of your {% data variables.product.prodname_ghe_server %} license - A hash of your {% data variables.product.prodname_ghe_server %} license
- The customer name on your {% data variables.product.prodname_ghe_server %} license - The customer name on your {% data variables.product.prodname_ghe_server %} license
- The version of {% data variables.product.product_location_enterprise %}{% endif %} - The version of {% data variables.location.product_location_enterprise %}{% endif %}
- The hostname of {% data variables.product.product_location %} - The hostname of {% data variables.location.product_location %}
- The organization or enterprise account on {% data variables.product.prodname_ghe_cloud %} that's connected to {% data variables.product.product_location %} - The organization or enterprise account on {% data variables.product.prodname_ghe_cloud %} that's connected to {% data variables.location.product_location %}
- The authentication token that's used by {% data variables.product.product_location %} to make requests to {% data variables.product.prodname_ghe_cloud %} - The authentication token that's used by {% data variables.location.product_location %} to make requests to {% data variables.product.prodname_ghe_cloud %}
- If Transport Layer Security (TLS) is enabled and configured on {% data variables.product.product_location %}{% ifversion ghes %} - If Transport Layer Security (TLS) is enabled and configured on {% data variables.location.product_location %}{% ifversion ghes %}
- The {% data variables.product.prodname_github_connect %} features that are enabled on {% data variables.product.product_location %}, and the date and time of enablement{% endif %} - The {% data variables.product.prodname_github_connect %} features that are enabled on {% data variables.location.product_location %}, and the date and time of enablement{% endif %}
- The dormancy threshold for your enterprise - The dormancy threshold for your enterprise
- The number of dormant users for your enterprise - The number of dormant users for your enterprise
- A count of license-consuming seats, which does not include suspended users - A count of license-consuming seats, which does not include suspended users
{% data variables.product.prodname_github_connect %} syncs the above connection data between {% data variables.product.product_location %} and {% data variables.product.prodname_ghe_cloud %} weekly, from the day and approximate time that {% data variables.product.prodname_github_connect %} was enabled. {% data variables.product.prodname_github_connect %} syncs the above connection data between {% data variables.location.product_location %} and {% data variables.product.prodname_ghe_cloud %} weekly, from the day and approximate time that {% data variables.product.prodname_github_connect %} was enabled.
### Data transmitted by individual features of {% data variables.product.prodname_github_connect %} ### Data transmitted by individual features of {% data variables.product.prodname_github_connect %}

View File

@@ -1,6 +1,6 @@
--- ---
title: Enabling automatic user license sync for your enterprise title: Enabling automatic user license sync for your enterprise
intro: 'You can manage license usage across your {% data variables.product.prodname_enterprise %} environments by automatically syncing user licenses from {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}.' intro: 'You can manage license usage across your {% data variables.product.prodname_enterprise %} environments by automatically syncing user licenses from {% data variables.location.product_location %} to {% data variables.product.prodname_ghe_cloud %}.'
redirect_from: redirect_from:
- /enterprise/admin/installation/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud - /enterprise/admin/installation/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
- /enterprise/admin/configuration/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud - /enterprise/admin/configuration/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
@@ -35,7 +35,7 @@ You can also manually upload {% data variables.product.prodname_ghe_server %} us
## Enabling license synchronization ## Enabling license synchronization
Before enabling license synchronization on {% data variables.product.product_location %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)." Before enabling license synchronization on {% data variables.location.product_location %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.github-connect-tab %} {% data reusables.enterprise-accounts.github-connect-tab %}

View File

@@ -1,6 +1,6 @@
--- ---
title: Enabling Dependabot for your enterprise title: Enabling Dependabot for your enterprise
intro: 'You can allow users of {% data variables.product.product_location %} to find and fix vulnerabilities in code dependencies by enabling {% data variables.product.prodname_dependabot_alerts %}{% ifversion ghes > 3.2 %} and {% data variables.product.prodname_dependabot_updates %}{% endif %}.' intro: 'You can allow users of {% data variables.location.product_location %} to find and fix vulnerabilities in code dependencies by enabling {% data variables.product.prodname_dependabot_alerts %}{% ifversion ghes > 3.2 %} and {% data variables.product.prodname_dependabot_updates %}{% endif %}.'
miniTocMaxHeadingLevel: 3 miniTocMaxHeadingLevel: 3
shortTitle: Dependabot shortTitle: Dependabot
redirect_from: redirect_from:
@@ -26,14 +26,14 @@ topics:
## About {% data variables.product.prodname_dependabot %} for {% data variables.product.product_name %} ## About {% data variables.product.prodname_dependabot %} for {% data variables.product.product_name %}
{% data variables.product.prodname_dependabot %} helps users of {% data variables.product.product_location %} find and fix vulnerabilities in their dependencies.{% ifversion ghes > 3.2 %} You can enable {% data variables.product.prodname_dependabot_alerts %} to notify users about vulnerable dependencies and {% data variables.product.prodname_dependabot_updates %} to fix the vulnerabilities and keep dependencies updated to the latest version. {% data variables.product.prodname_dependabot %} helps users of {% data variables.location.product_location %} find and fix vulnerabilities in their dependencies.{% ifversion ghes > 3.2 %} You can enable {% data variables.product.prodname_dependabot_alerts %} to notify users about vulnerable dependencies and {% data variables.product.prodname_dependabot_updates %} to fix the vulnerabilities and keep dependencies updated to the latest version.
### About {% data variables.product.prodname_dependabot_alerts %} ### About {% data variables.product.prodname_dependabot_alerts %}
{% endif %} {% endif %}
{% data reusables.dependabot.dependabot-alerts-beta %} {% data reusables.dependabot.dependabot-alerts-beta %}
With {% data variables.product.prodname_dependabot_alerts %}, {% data variables.product.prodname_dotcom %} identifies insecure dependencies in repositories and creates alerts on {% data variables.product.product_location %}, using data from the {% data variables.product.prodname_advisory_database %} and the dependency graph service. With {% data variables.product.prodname_dependabot_alerts %}, {% data variables.product.prodname_dotcom %} identifies insecure dependencies in repositories and creates alerts on {% data variables.location.product_location %}, using data from the {% data variables.product.prodname_advisory_database %} and the dependency graph service.
{% data reusables.repositories.tracks-vulnerabilities %} {% data reusables.repositories.tracks-vulnerabilities %}
@@ -43,20 +43,20 @@ You can also choose to manually sync vulnerability data at any time. For more in
{% note %} {% note %}
**Note:** When you enable {% data variables.product.prodname_dependabot_alerts %}, no code or information about code from {% data variables.product.product_location %} is uploaded to {% data variables.product.prodname_dotcom_the_website %}. **Note:** When you enable {% data variables.product.prodname_dependabot_alerts %}, no code or information about code from {% data variables.location.product_location %} is uploaded to {% data variables.product.prodname_dotcom_the_website %}.
{% endnote %} {% endnote %}
When {% data variables.product.product_location %} receives information about a vulnerability, it identifies repositories in {% data variables.product.product_location %} that use the affected version of the dependency and generates {% data variables.product.prodname_dependabot_alerts %}. You can choose whether or not to notify users automatically about new {% data variables.product.prodname_dependabot_alerts %}. When {% data variables.location.product_location %} receives information about a vulnerability, it identifies repositories in {% data variables.location.product_location %} that use the affected version of the dependency and generates {% data variables.product.prodname_dependabot_alerts %}. You can choose whether or not to notify users automatically about new {% data variables.product.prodname_dependabot_alerts %}.
For repositories with {% data variables.product.prodname_dependabot_alerts %} enabled, scanning is triggered on any push to the default branch that contains a manifest file or lock file. Additionally, when a new vulnerability record is added to {% data variables.product.product_location %}, {% data variables.product.product_name %} scans all existing repositories on {% data variables.product.product_location %} and generates alerts for any repository that is vulnerable. For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)." For repositories with {% data variables.product.prodname_dependabot_alerts %} enabled, scanning is triggered on any push to the default branch that contains a manifest file or lock file. Additionally, when a new vulnerability record is added to {% data variables.location.product_location %}, {% data variables.product.product_name %} scans all existing repositories on {% data variables.location.product_location %} and generates alerts for any repository that is vulnerable. For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)."
{% ifversion ghes > 3.2 %} {% ifversion ghes > 3.2 %}
### About {% data variables.product.prodname_dependabot_updates %} ### About {% data variables.product.prodname_dependabot_updates %}
{% data reusables.dependabot.beta-security-and-version-updates %} {% data reusables.dependabot.beta-security-and-version-updates %}
After you enable {% data variables.product.prodname_dependabot_alerts %}, you can choose to enable {% data variables.product.prodname_dependabot_updates %}. When {% data variables.product.prodname_dependabot_updates %} are enabled for {% data variables.product.product_location %}, users can configure repositories so that their dependencies are updated and kept secure automatically. After you enable {% data variables.product.prodname_dependabot_alerts %}, you can choose to enable {% data variables.product.prodname_dependabot_updates %}. When {% data variables.product.prodname_dependabot_updates %} are enabled for {% data variables.location.product_location %}, users can configure repositories so that their dependencies are updated and kept secure automatically.
{% note %} {% note %}

View File

@@ -12,7 +12,7 @@ shortTitle: Server Statistics
## About {% data variables.product.prodname_server_statistics %} ## About {% data variables.product.prodname_server_statistics %}
{% data variables.product.prodname_server_statistics %} collects aggregate usage data from {% data variables.product.product_location %}, which you can use to better anticipate the needs of your organization, understand how your team works, and show the value you get from {% data variables.product.prodname_ghe_server %}. {% data variables.product.prodname_server_statistics %} collects aggregate usage data from {% data variables.location.product_location %}, which you can use to better anticipate the needs of your organization, understand how your team works, and show the value you get from {% data variables.product.prodname_ghe_server %}.
{% data variables.product.prodname_server_statistics %} only collects certain aggregate metrics on repositories, issues, pull requests, and other features.{% data variables.product.prodname_dotcom %} content, such as code, issues, comments, or pull request content, is not collected. For more information, see "[About {% data variables.product.prodname_server_statistics %}](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/about-server-statistics)." {% data variables.product.prodname_server_statistics %} only collects certain aggregate metrics on repositories, issues, pull requests, and other features.{% data variables.product.prodname_dotcom %} content, such as code, issues, comments, or pull request content, is not collected. For more information, see "[About {% data variables.product.prodname_server_statistics %}](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/about-server-statistics)."

View File

@@ -1,7 +1,7 @@
--- ---
title: Enabling unified contributions for your enterprise title: Enabling unified contributions for your enterprise
shortTitle: Unified contributions shortTitle: Unified contributions
intro: 'You can allow users to include anonymized contribution counts for their work on {% data variables.product.product_location %} in their contribution graphs on {% data variables.product.prodname_dotcom_the_website %}.' intro: 'You can allow users to include anonymized contribution counts for their work on {% data variables.location.product_location %} in their contribution graphs on {% data variables.product.prodname_dotcom_the_website %}.'
redirect_from: redirect_from:
- /enterprise/admin/guides/developer-workflow/enabling-unified-contributions-between-github-enterprise-and-github-com - /enterprise/admin/guides/developer-workflow/enabling-unified-contributions-between-github-enterprise-and-github-com
- /enterprise/admin/guides/developer-workflow/enabling-unified-contributions-between-github-enterprise-server-and-github-com - /enterprise/admin/guides/developer-workflow/enabling-unified-contributions-between-github-enterprise-server-and-github-com
@@ -11,7 +11,7 @@ redirect_from:
- /admin/configuration/enabling-unified-contributions-between-github-enterprise-server-and-githubcom - /admin/configuration/enabling-unified-contributions-between-github-enterprise-server-and-githubcom
- /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-unified-contributions-between-github-enterprise-server-and-githubcom - /admin/configuration/managing-connections-between-github-enterprise-server-and-github-enterprise-cloud/enabling-unified-contributions-between-github-enterprise-server-and-githubcom
- /admin/configuration/managing-connections-between-your-enterprise-accounts/enabling-unified-contributions-between-your-enterprise-account-and-githubcom - /admin/configuration/managing-connections-between-your-enterprise-accounts/enabling-unified-contributions-between-your-enterprise-account-and-githubcom
permissions: 'Enterprise owners can enable unified contributions between {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.' permissions: 'Enterprise owners can enable unified contributions between {% data variables.location.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.'
versions: versions:
ghes: '*' ghes: '*'
ghae: '*' ghae: '*'
@@ -25,9 +25,9 @@ topics:
## About unified contributions ## About unified contributions
As an enterprise owner, you can allow end users to send anonymized contribution counts for their work from {% data variables.product.product_location %} to their {% data variables.product.prodname_dotcom_the_website %} contribution graph. As an enterprise owner, you can allow end users to send anonymized contribution counts for their work from {% data variables.location.product_location %} to their {% data variables.product.prodname_dotcom_the_website %} contribution graph.
After you enable {% data variables.product.prodname_unified_contributions %}, before individual users can send contribution counts from {% data variables.product.product_location %} to {% data variables.product.prodname_dotcom_the_website %}, each user must also connect their user account on {% data variables.product.product_name %} with a personal account on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Sending enterprise contributions to your {% data variables.product.prodname_dotcom_the_website %} profile](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)." After you enable {% data variables.enterprise.prodname_unified_contributions %}, before individual users can send contribution counts from {% data variables.location.product_location %} to {% data variables.product.prodname_dotcom_the_website %}, each user must also connect their user account on {% data variables.product.product_name %} with a personal account on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Sending enterprise contributions to your {% data variables.product.prodname_dotcom_the_website %} profile](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile)."
{% data reusables.github-connect.sync-frequency %} {% data reusables.github-connect.sync-frequency %}
@@ -37,14 +37,14 @@ If the enterprise owner disables the functionality or individual users opt out o
## Enabling unified contributions ## Enabling unified contributions
Before enabling {% data variables.product.prodname_unified_contributions %} on {% data variables.product.product_location %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)." Before enabling {% data variables.enterprise.prodname_unified_contributions %} on {% data variables.location.product_location %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
{% ifversion ghes %} {% ifversion ghes %}
{% data reusables.github-connect.access-dotcom-and-enterprise %} {% data reusables.github-connect.access-dotcom-and-enterprise %}
{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.business %} {% data reusables.enterprise_site_admin_settings.business %}
{% data reusables.enterprise-accounts.github-connect-tab %}{% else %} {% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
1. Sign in to {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}. 1. Sign in to {% data variables.location.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
{% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %} {% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %}
1. Under "Users can share contribution counts to {% data variables.product.prodname_dotcom_the_website %}", click **Request access**. 1. Under "Users can share contribution counts to {% data variables.product.prodname_dotcom_the_website %}", click **Request access**.
![Request access to unified contributions option](/assets/images/enterprise/site-admin-settings/dotcom-ghe-connection-request-access.png){% ifversion ghes %} ![Request access to unified contributions option](/assets/images/enterprise/site-admin-settings/dotcom-ghe-connection-request-access.png){% ifversion ghes %}

View File

@@ -1,7 +1,7 @@
--- ---
title: Enabling unified search for your enterprise title: Enabling unified search for your enterprise
shortTitle: Unified search shortTitle: Unified search
intro: 'You can allow users to include repositories on {% data variables.product.prodname_dotcom_the_website %} in their search results when searching from {% data variables.product.product_location %}.' intro: 'You can allow users to include repositories on {% data variables.product.prodname_dotcom_the_website %} in their search results when searching from {% data variables.location.product_location %}.'
redirect_from: redirect_from:
- /enterprise/admin/guides/developer-workflow/enabling-unified-search-between-github-enterprise-and-github-com - /enterprise/admin/guides/developer-workflow/enabling-unified-search-between-github-enterprise-and-github-com
- /enterprise/admin/guides/developer-workflow/enabling-unified-search-between-github-enterprise-server-and-github-com - /enterprise/admin/guides/developer-workflow/enabling-unified-search-between-github-enterprise-server-and-github-com
@@ -22,30 +22,30 @@ topics:
- GitHub search - GitHub search
--- ---
## About {% data variables.product.prodname_unified_search %} ## About {% data variables.enterprise.prodname_unified_search %}
{% data reusables.github-connect.beta %} {% data reusables.github-connect.beta %}
When you enable unified search, users can view search results from content on {% data variables.product.prodname_dotcom_the_website %} when searching from {% data variables.product.product_location %}{% ifversion ghae %} on {% data variables.product.prodname_ghe_managed %}{% endif %}. When you enable unified search, users can view search results from content on {% data variables.product.prodname_dotcom_the_website %} when searching from {% data variables.location.product_location %}{% ifversion ghae %} on {% data variables.product.prodname_ghe_managed %}{% endif %}.
You can choose to allow search results for public repositories on {% data variables.product.prodname_dotcom_the_website %}, and you can separately choose to allow search results for private repositories on {% data variables.product.prodname_ghe_cloud %}. If you enable unified search for private repositories, users can only search private repositories that they have access to and that are owned by the connected organization or enterprise account. For more information, see "[About searching on {% data variables.product.prodname_dotcom %}](/search-github/getting-started-with-searching-on-github/about-searching-on-github/#searching-across-github-enterprise-and-githubcom-simultaneously)." You can choose to allow search results for public repositories on {% data variables.product.prodname_dotcom_the_website %}, and you can separately choose to allow search results for private repositories on {% data variables.product.prodname_ghe_cloud %}. If you enable unified search for private repositories, users can only search private repositories that they have access to and that are owned by the connected organization or enterprise account. For more information, see "[About searching on {% data variables.product.prodname_dotcom %}](/search-github/getting-started-with-searching-on-github/about-searching-on-github/#searching-across-github-enterprise-and-githubcom-simultaneously)."
Users will never be able to search {% data variables.product.product_location %} from {% data variables.product.prodname_dotcom_the_website %}, even if they have access to both environments. Users will never be able to search {% data variables.location.product_location %} from {% data variables.product.prodname_dotcom_the_website %}, even if they have access to both environments.
After you enable unified search for {% data variables.product.product_location %}, before individual users can see search results from private repositories on {% data variables.product.prodname_dotcom_the_website %} in {% data variables.product.product_location %}, each user must also connect their user account on {% data variables.product.product_name %} with a user account on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Enabling {% data variables.product.prodname_dotcom_the_website %} repository search in your private enterprise account](/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment)." After you enable unified search for {% data variables.location.product_location %}, before individual users can see search results from private repositories on {% data variables.product.prodname_dotcom_the_website %} in {% data variables.location.product_location %}, each user must also connect their user account on {% data variables.product.product_name %} with a user account on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Enabling {% data variables.product.prodname_dotcom_the_website %} repository search in your private enterprise account](/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment)."
Searching via the REST and GraphQL APIs does not include {% data variables.product.prodname_dotcom_the_website %} search results. Advanced search and searching for wikis in {% data variables.product.prodname_dotcom_the_website %} are not supported. Searching via the REST and GraphQL APIs does not include {% data variables.product.prodname_dotcom_the_website %} search results. Advanced search and searching for wikis in {% data variables.product.prodname_dotcom_the_website %} are not supported.
## Enabling {% data variables.product.prodname_unified_search %} ## Enabling {% data variables.enterprise.prodname_unified_search %}
Before you can enable {% data variables.product.prodname_unified_search %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)." Before you can enable {% data variables.enterprise.prodname_unified_search %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."
{% ifversion ghes %} {% ifversion ghes %}
{% data reusables.github-connect.access-dotcom-and-enterprise %} {% data reusables.github-connect.access-dotcom-and-enterprise %}
{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.business %} {% data reusables.enterprise_site_admin_settings.business %}
{% data reusables.enterprise-accounts.github-connect-tab %}{% else %} {% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
1. Sign into {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}. 1. Sign into {% data variables.location.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
{% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %} {% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %}
1. Under "Users can search {% data variables.product.prodname_dotcom_the_website %}", use the drop-down menu and click **Enabled**. 1. Under "Users can search {% data variables.product.prodname_dotcom_the_website %}", use the drop-down menu and click **Enabled**.
![Enable search option in the search GitHub.com drop-down menu](/assets/images/enterprise/site-admin-settings/github-dotcom-enable-search.png) ![Enable search option in the search GitHub.com drop-down menu](/assets/images/enterprise/site-admin-settings/github-dotcom-enable-search.png)

View File

@@ -1,6 +1,6 @@
--- ---
title: Configuring GitHub Connect title: Configuring GitHub Connect
intro: 'With {% data variables.product.prodname_github_connect %}, you can access additional features and workflows by connecting {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}.' intro: 'With {% data variables.product.prodname_github_connect %}, you can access additional features and workflows by connecting {% data variables.location.product_location %} to {% data variables.product.prodname_ghe_cloud %}.'
redirect_from: redirect_from:
- /enterprise/admin/developer-workflow/connecting-github-enterprise-to-github-com - /enterprise/admin/developer-workflow/connecting-github-enterprise-to-github-com
- /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-and-github-com - /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-and-github-com

View File

@@ -1,7 +1,7 @@
--- ---
title: Managing GitHub Connect title: Managing GitHub Connect
shortTitle: Manage GitHub Connect shortTitle: Manage GitHub Connect
intro: 'You can enable {% data variables.product.prodname_github_connect %} to access additional features and workflows for {% data variables.product.product_location %}.' intro: 'You can enable {% data variables.product.prodname_github_connect %} to access additional features and workflows for {% data variables.location.product_location %}.'
redirect_from: redirect_from:
- /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-to-github-com - /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-to-github-com
- /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-server-to-github-com - /enterprise/admin/guides/developer-workflow/connecting-github-enterprise-server-to-github-com
@@ -26,9 +26,9 @@ topics:
## About {% data variables.product.prodname_github_connect %} ## About {% data variables.product.prodname_github_connect %}
You can access additional features and workflows on {% data variables.product.product_location %} by enabling {% data variables.product.prodname_github_connect %}. For more information, see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect)." You can access additional features and workflows on {% data variables.location.product_location %} by enabling {% data variables.product.prodname_github_connect %}. For more information, see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect)."
When you enable {% data variables.product.prodname_github_connect %}, you configure a connection between {% data variables.product.product_location %} and an organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. Enabling {% data variables.product.prodname_github_connect %} creates a {% data variables.product.prodname_github_app %} owned by the organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. {% data variables.product.product_name %} uses the {% data variables.product.prodname_github_app %}'s credentials to make requests to {% data variables.product.prodname_ghe_cloud %}. When you enable {% data variables.product.prodname_github_connect %}, you configure a connection between {% data variables.location.product_location %} and an organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. Enabling {% data variables.product.prodname_github_connect %} creates a {% data variables.product.prodname_github_app %} owned by the organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}. {% data variables.product.product_name %} uses the {% data variables.product.prodname_github_app %}'s credentials to make requests to {% data variables.product.prodname_ghe_cloud %}.
{% ifversion ghes %} {% ifversion ghes %}
{% data variables.product.prodname_ghe_server %} stores credentials from the {% data variables.product.prodname_github_app %}. The following credentials will be replicated to all nodes in a high availability or cluster environment, and stored in any backups, including snapshots created by {% data variables.product.prodname_enterprise_backup_utilities %}. {% data variables.product.prodname_ghe_server %} stores credentials from the {% data variables.product.prodname_github_app %}. The following credentials will be replicated to all nodes in a high availability or cluster environment, and stored in any backups, including snapshots created by {% data variables.product.prodname_enterprise_backup_utilities %}.
@@ -41,7 +41,7 @@ When you enable {% data variables.product.prodname_github_connect %}, you config
To use {% data variables.product.prodname_github_connect %}, you must have an organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that uses {% data variables.product.prodname_ghe_cloud %}. You may already have {% data variables.product.prodname_ghe_cloud %} included in your plan. {% data reusables.enterprise.link-to-ghec-trial %} To use {% data variables.product.prodname_github_connect %}, you must have an organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that uses {% data variables.product.prodname_ghe_cloud %}. You may already have {% data variables.product.prodname_ghe_cloud %} included in your plan. {% data reusables.enterprise.link-to-ghec-trial %}
{% ifversion ghes %} {% ifversion ghes %}
If your organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} uses IP allow lists, you must add the IP address or network for {% data variables.product.product_location %} to your IP allow list on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Managing allowed IP addresses for your organization](/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization)" and "[Enforcing policies for security settings in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-allowed-ip-addresses-for-organizations-in-your-enterprise)" in the {% data variables.product.prodname_ghe_cloud %} documentation. If your organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} uses IP allow lists, you must add the IP address or network for {% data variables.location.product_location %} to your IP allow list on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Managing allowed IP addresses for your organization](/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization)" and "[Enforcing policies for security settings in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-allowed-ip-addresses-for-organizations-in-your-enterprise)" in the {% data variables.product.prodname_ghe_cloud %} documentation.
To configure a connection, your proxy configuration must allow connectivity to `github.com`, `api.github.com`, and `uploads.github.com`. For more information, see "[Configuring an outbound web proxy server](/enterprise/admin/guides/installation/configuring-an-outbound-web-proxy-server)." To configure a connection, your proxy configuration must allow connectivity to `github.com`, `api.github.com`, and `uploads.github.com`. For more information, see "[Configuring an outbound web proxy server](/enterprise/admin/guides/installation/configuring-an-outbound-web-proxy-server)."
{% endif %} {% endif %}
@@ -50,15 +50,15 @@ To configure a connection, your proxy configuration must allow connectivity to `
Enterprise owners who are also owners of an organization or enterprise account that uses {% data variables.product.prodname_ghe_cloud %} can enable {% data variables.product.prodname_github_connect %}. Enterprise owners who are also owners of an organization or enterprise account that uses {% data variables.product.prodname_ghe_cloud %} can enable {% data variables.product.prodname_github_connect %}.
If you're connecting {% data variables.product.product_location %} to an organization on {% data variables.product.prodname_ghe_cloud %} that is not owned by an enterprise account, you must sign into {% data variables.product.prodname_dotcom_the_website %} as an organization owner. If you're connecting {% data variables.location.product_location %} to an organization on {% data variables.product.prodname_ghe_cloud %} that is not owned by an enterprise account, you must sign into {% data variables.product.prodname_dotcom_the_website %} as an organization owner.
If you're connecting {% data variables.product.product_location %} to an organization on {% data variables.product.prodname_ghe_cloud %} that is owned by an enterprise account or to an enterprise account itself, you must sign into {% data variables.product.prodname_dotcom_the_website %} as an enterprise owner. If you're connecting {% data variables.location.product_location %} to an organization on {% data variables.product.prodname_ghe_cloud %} that is owned by an enterprise account or to an enterprise account itself, you must sign into {% data variables.product.prodname_dotcom_the_website %} as an enterprise owner.
{% ifversion ghes %} {% ifversion ghes %}
1. Sign in to {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}. 1. Sign in to {% data variables.location.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.github-connect-tab %}{% else %} {% data reusables.enterprise-accounts.github-connect-tab %}{% else %}
1. Sign in to {% data variables.product.product_location %} and {% data variables.product.prodname_dotcom_the_website %}. 1. Sign in to {% data variables.location.product_location %} and {% data variables.product.prodname_dotcom_the_website %}.
{% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %} {% data reusables.enterprise-accounts.access-enterprise %}{% data reusables.enterprise-accounts.github-connect-tab %}{% endif %}
1. Under "{% data variables.product.prodname_github_connect %} is not enabled yet", click **Enable {% data variables.product.prodname_github_connect %}**. By clicking **Enable {% data variables.product.prodname_github_connect %}**, you agree to the "<a href="/github/site-policy/github-terms-for-additional-products-and-features#connect" class="dotcom-only">{% data variables.product.prodname_dotcom %} Terms for Additional Products and Features</a>." 1. Under "{% data variables.product.prodname_github_connect %} is not enabled yet", click **Enable {% data variables.product.prodname_github_connect %}**. By clicking **Enable {% data variables.product.prodname_github_connect %}**, you agree to the "<a href="/github/site-policy/github-terms-for-additional-products-and-features#connect" class="dotcom-only">{% data variables.product.prodname_dotcom %} Terms for Additional Products and Features</a>."
{% ifversion ghes %} {% ifversion ghes %}
@@ -72,7 +72,7 @@ If you're connecting {% data variables.product.product_location %} to an organiz
Enterprise owners can disable {% data variables.product.prodname_github_connect %}. Enterprise owners can disable {% data variables.product.prodname_github_connect %}.
When you disconnect from {% data variables.product.prodname_ghe_cloud %}, the {% data variables.product.prodname_github_connect %} {% data variables.product.prodname_github_app %} is deleted from your enterprise account or organization and credentials stored on {% data variables.product.product_location %} are deleted. When you disconnect from {% data variables.product.prodname_ghe_cloud %}, the {% data variables.product.prodname_github_connect %} {% data variables.product.prodname_github_app %} is deleted from your enterprise account or organization and credentials stored on {% data variables.location.product_location %} are deleted.
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.github-connect-tab %} {% data reusables.enterprise-accounts.github-connect-tab %}

View File

@@ -14,13 +14,13 @@ topics:
- Fundamentals - Fundamentals
- Infrastructure - Infrastructure
--- ---
If you configure a hostname instead of a hard-coded IP address, you will be able to change the physical hardware that {% data variables.product.product_location %} runs on without affecting users or client software. If you configure a hostname instead of a hard-coded IP address, you will be able to change the physical hardware that {% data variables.location.product_location %} runs on without affecting users or client software.
The hostname setting in the {% data variables.enterprise.management_console %} should be set to an appropriate fully qualified domain name (FQDN) which is resolvable on the internet or within your internal network. For example, your hostname setting could be `github.companyname.com.` Web and API requests will automatically redirect to the hostname configured in the {% data variables.enterprise.management_console %}. Note that `localhost` is not a valid hostname setting. The hostname setting in the {% data variables.enterprise.management_console %} should be set to an appropriate fully qualified domain name (FQDN) which is resolvable on the internet or within your internal network. For example, your hostname setting could be `github.companyname.com.` Web and API requests will automatically redirect to the hostname configured in the {% data variables.enterprise.management_console %}. Note that `localhost` is not a valid hostname setting.
Hostnames must be less than 63 characters in length per [Section 2.3.4 of the Domain Names Specification RFC](https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4). Hostnames must be less than 63 characters in length per [Section 2.3.4 of the Domain Names Specification RFC](https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4).
After you configure a hostname, you can enable subdomain isolation to further increase the security of {% data variables.product.product_location %}. For more information, see "[Enabling subdomain isolation](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)." After you configure a hostname, you can enable subdomain isolation to further increase the security of {% data variables.location.product_location %}. For more information, see "[Enabling subdomain isolation](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)."
For more information on the supported hostname types, see [Section 2.1 of the HTTP RFC](https://tools.ietf.org/html/rfc1123#section-2). For more information on the supported hostname types, see [Section 2.1 of the HTTP RFC](https://tools.ietf.org/html/rfc1123#section-2).
@@ -29,11 +29,11 @@ For more information on the supported hostname types, see [Section 2.1 of the HT
{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_site_admin_settings.management-console %}
{% data reusables.enterprise_management_console.hostname-menu-item %} {% data reusables.enterprise_management_console.hostname-menu-item %}
4. Type the hostname you'd like to set for {% data variables.product.product_location %}. 4. Type the hostname you'd like to set for {% data variables.location.product_location %}.
![Field for setting a hostname](/assets/images/enterprise/management-console/hostname-field.png) ![Field for setting a hostname](/assets/images/enterprise/management-console/hostname-field.png)
5. To test the DNS and SSL settings for the new hostname, click **Test domain settings**. 5. To test the DNS and SSL settings for the new hostname, click **Test domain settings**.
![Test domain settings button](/assets/images/enterprise/management-console/test-domain-settings.png) ![Test domain settings button](/assets/images/enterprise/management-console/test-domain-settings.png)
{% data reusables.enterprise_management_console.test-domain-settings-failure %} {% data reusables.enterprise_management_console.test-domain-settings-failure %}
{% data reusables.enterprise_management_console.save-settings %} {% data reusables.enterprise_management_console.save-settings %}
To help mitigate various cross-site scripting vulnerabilities, we recommend that you enable subdomain isolation for {% data variables.product.product_location %} after you configure a hostname. For more information, see "[Enabling subdomain isolation](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)." To help mitigate various cross-site scripting vulnerabilities, we recommend that you enable subdomain isolation for {% data variables.location.product_location %} after you configure a hostname. For more information, see "[Enabling subdomain isolation](/enterprise/admin/guides/installation/enabling-subdomain-isolation/)."

Some files were not shown because too many files have changed in this diff Show More