1
0
mirror of synced 2026-01-08 12:01:53 -05:00

Merge pull request #11609 from github/repo-sync

repo sync
This commit is contained in:
Mike Surowiec
2021-11-02 13:22:08 -07:00
committed by GitHub
83 changed files with 338 additions and 211 deletions

View File

@@ -323,13 +323,17 @@ jobs:
name: pr_build
path: ${{ runner.temp }}
- name: Extract user-changes to temp directory
# For security reasons, only extract the tar from docs-internal
# This allows us to add search indexes and early access content to the build
- if: ${{ github.repository == 'github/docs-internal' }}
name: Extract user-changes to temp directory
run: |
mkdir $RUNNER_TEMP/app
tar -x --file=$RUNNER_TEMP/app.tar -C "$RUNNER_TEMP/app/"
# Move the LFS content into the temp directory in chunks (destructively)
- name: Move the LFS objects
- if: ${{ github.repository == 'github/docs-internal' }}
name: Move the LFS objects
run: |
git lfs ls-files --name-only | xargs -n 1 -I {} sh -c 'mkdir -p "$RUNNER_TEMP/app/$(dirname {})"; mv {} "$RUNNER_TEMP/app/$(dirname {})/"'
@@ -341,9 +345,15 @@ jobs:
mv content/early-access "$RUNNER_TEMP/app/content/"
mv data/early-access "$RUNNER_TEMP/app/data/"
- name: Create a gzipped archive
- if: ${{ github.repository == 'github/docs-internal' }}
name: Create a gzipped archive (docs-internal)
run: tar -cz --file app.tar.gz "$RUNNER_TEMP/app/"
# gzip the app.tar from github/docs so we're working with the same format
- if: ${{ github.repository == 'github/docs' }}
name: Create a gzipped archive (docs)
run: gzip -9 < "$RUNNER_TEMP/app.tar" > app.tar.gz
- name: Create a Heroku build source
id: build-source
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d

View File

@@ -0,0 +1,72 @@
name: Copy to REST API issue to docs-content
# **What it does**: Copies an issue in the open source repo to the docs-content repo, comments on and closes the original issue
# **Why we have it**: REST API updates cannot be made in the open source repo. Instead, we copy the issue to an internal issue (we do not transfer so that the issue does not disappear for the contributor) and close the original issue.
# **Who does it impact**: Open source and docs-content maintainers
permissions:
contents: write
on:
issues:
types:
- labeled
jobs:
transfer-issue:
name: Transfer issue
runs-on: ubuntu-latest
if: (github.event.label.name == 'localization ' && github.repository == 'github/docs')
steps:
- name: Check if this run was triggered by a member of the docs team
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
id: triggered-by-member
with:
github-token: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
result-encoding: string
script: |
const triggerer_login = context.payload.sender.login
const teamMembers = await github.request(
`/orgs/github/teams/docs/members?per_page=100`
)
const logins = teamMembers.data.map(member => member.login)
if (logins.includes(triggerer_login)) {
console.log(`This workflow was triggered by ${triggerer_login} (on the docs team).`)
return 'true'
}
console.log(`This workflow was triggered by ${triggerer_login} (not on the docs team), so no action will be taken.`)
return 'false'
- name: Exit if not triggered by a docs team member
if: steps.triggered-by-member.outputs.result == 'false'
run: |
echo Aborting. This workflow must be triggered by a member of the docs team.
exit 1
- name: Create an issue in the localization repo
run: |
new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/localization)"
echo 'NEW_ISSUE='$new_issue_url >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
- name: Comment on the new issue
run: gh issue comment $NEW_ISSUE --body "This issue was originally opened in the open source repo as $OLD_ISSUE"
env:
GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
NEW_ISSUE: ${{ env.NEW_ISSUE }}
OLD_ISSUE: ${{ github.event.issue.html_url }}
- name: Comment on the old issue
run: gh issue comment $OLD_ISSUE --body "Thank you for opening this issue! Updates to translated content must be made internally. I have copied your issue to an internal issue, so I will close this issue."
env:
GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
OLD_ISSUE: ${{ github.event.issue.html_url }}
- name: Close the old issue
run: gh issue close $OLD_ISSUE
env:
GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}}
OLD_ISSUE: ${{ github.event.issue.html_url }}

View File

@@ -13,6 +13,7 @@ COPY --chown=node:node package-lock.json /openapi-check
ADD --chown=node:node script /openapi-check/script
ADD --chown=node:node lib /openapi-check/lib
ADD --chown=node:node content /openapi-check/content
ADD --chown=node:node data /openapi-check/data
RUN npm ci -D

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

View File

@@ -1,3 +1,7 @@
.breadcrumbs {
clip-path: inset(-5px -5px -5px 0px);
}
.header {
display: unset;
}

View File

@@ -41,13 +41,18 @@ export const Header = () => {
return (
<div
className={`border-bottom color-border-muted no-print position-sticky top-0 z-3 ${
scroll ? 'color-shadow-medium' : 'color-shadow-small'
} color-bg-default`}
className={cx(
'border-bottom d-unset color-border-muted no-print z-3 color-bg-default',
styles.header
)}
>
{error !== '404' && <HeaderNotifications />}
<header className={cx('container-xl px-3 px-md-6 pt-3 pb-3 z-3')}>
<header
className={cx(
'color-bg-default px-3 px-md-6 pt-3 pb-3 position-sticky top-0 z-3',
scroll ? 'color-shadow-medium' : 'color-shadow-small'
)}
>
{/* desktop header */}
<div
className="d-none d-lg-flex flex-justify-end flex-items-center"

View File

@@ -808,7 +808,15 @@ on:
{% data reusables.webhooks.workflow_run_desc %}
{% data reusables.github-actions.branch-requirement %}
{% note %}
**Notes:**
* This event will only trigger a workflow run if the workflow file is on the default branch.
* You can't use `workflow_run` to chain together more than three levels of workflows. For example, if you attempt to trigger five workflows (named `B` to `F`) to run sequentially after an initial workflow `A` has run (that is: `A` → `B` → `C` → `D` → `E` → `F`), workflows `E` and `F` will not be run.
{% endnote %}
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
| --------------------- | -------------- | ------------ | -------------|

View File

@@ -19,7 +19,9 @@ shortTitle: Enable Packages with MinIO
- Make sure to configure the bucket you'll want to use in the future. We do not recommend changing your storage after you start using {% data variables.product.prodname_registry %}.
{% endwarning %}
## Prerequisites
Before you can enable and configure {% data variables.product.prodname_registry %} on {% data variables.product.product_location_enterprise %}, you need to prepare your MinIO storage bucket. To help you quickly set up a MinIO bucket and navigate MinIO's customization options, see the "[Quickstart for configuring your MinIO storage bucket for {% data variables.product.prodname_registry %}](/admin/packages/quickstart-for-configuring-your-minio-storage-bucket-for-github-packages)."
Ensure your MinIO external storage access key ID and secret have these permissions:

View File

@@ -6,8 +6,9 @@ redirect_from:
- /enterprise/admin/articles/determining-whether-a-user-account-is-dormant/
- /enterprise/admin/user-management/managing-dormant-users
- /admin/user-management/managing-dormant-users
intro: 'A user account is considered to be dormant if it has not been active for at least a month.{% ifversion ghes %} You may choose to suspend dormant users to free up user licenses.{% endif %}'
intro: '{% data reusables.enterprise-accounts.dormant-user-activity-threshold %}'
versions:
ghec: '*'
ghes: '*'
ghae: '*'
type: how_to
@@ -16,16 +17,12 @@ topics:
- Enterprise
- Licensing
---
"Activity" includes, but is not limited to:
- Signing in to {% data variables.product.product_name %}.
- Commenting on issues and pull requests.
- Creating, deleting, watching, and starring repositories.
- Pushing commits.{% ifversion ghes or ghae %}
- Accessing resources by using a personal access token or SSH key.{% endif %}
{% data reusables.enterprise-accounts.dormant-user-activity %}
{% ifversion ghes or ghae%}
## Viewing dormant users
You can view a list of all dormant users who have not been suspended and who are not site administrators.
{% data reusables.enterprise-accounts.viewing-dormant-users %}
{% data reusables.enterprise_site_admin_settings.access-settings %}
3. In the left sidebar, click **Dormant users**.
@@ -47,11 +44,29 @@ You can view a list of all dormant users who have not been suspended and who are
{% data reusables.enterprise_site_admin_settings.dormancy-threshold %}
{% data reusables.enterprise-accounts.access-enterprise %}
{% ifversion ghes or ghae %}
{% data reusables.enterprise-accounts.policies-tab %}
{% else %}
{% data reusables.enterprise-accounts.settings-tab %}
{% endif %}
{% data reusables.enterprise-accounts.options-tab %}
4. Under "Dormancy threshold", use the drop-down menu, and click the desired dormancy threshold.
![The Dormancy threshold drop-down menu](/assets/images/enterprise/site-admin-settings/dormancy-threshold-menu.png)
{% endif %}
{% ifversion ghec %}
{% data reusables.enterprise-accounts.dormant-user-release-phase %}
{% warning %}
**Note:** During the private beta, ongoing improvements to the report download feature may limit its availability.
{% endwarning %}
## Downloading the dormant users report from your enterprise account
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.enterprise-accounts-compliance-tab %}
1. To download your Dormant Users (beta) report as a CSV file, under "Other", click {% octicon "download" aria-label="The Download icon" %} **Download**.
![Download button under "Other" on the Compliance page](/assets/images/help/business-accounts/dormant-users-download-button.png)
{% endif %}

View File

@@ -38,6 +38,10 @@ You can view {% ifversion ghec %}all the {% data variables.product.prodname_ghe_
{% ifversion ghec %}1. Optionally, to view a list of pending invitations, click **_NUMBER_ pending**.
!["NUMBER pending" button to the right of search and filter options](/assets/images/help/enterprises/members-pending.png){% endif %}
## Viewing dormant users
You can view a list of all dormant users {% ifversion ghes or ghae %} who have not been suspended and {% endif %}who are not site administrators. {% data reusables.enterprise-accounts.dormant-user-activity-threshold %} For more information, see "[Managing dormant users](/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users)."
## Further reading
- "[Roles in an enterprise](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise)"

View File

@@ -0,0 +1 @@
A user account is considered to be dormant if it has not been active for {% ifversion ghec %}90 days{% else %}at least a month{% endif %}.{% ifversion ghes %} You may choose to suspend dormant users to release user licenses.{% endif %}

View File

@@ -0,0 +1,6 @@
"Activity" includes, but is not limited to:
- Signing in to {% data variables.product.product_name %}.
- Commenting on issues and pull requests.
- Creating, deleting, watching, and starring repositories.
- Pushing commits.
- Accessing resources by using a personal access token or SSH key.

View File

@@ -0,0 +1,5 @@
{% note %}
**Note:** The Dormant Users report is currently in private beta so admins only have access to this feature with a special invite. To join the private beta, receive support, or address your questions, contact the {% data variables.product.company_short %} representative who helps manage your account.
{% endnote %}

View File

@@ -0,0 +1,2 @@
1. In the enterprise account sidebar, click {% octicon "checklist" aria-label="The Compliance icon" %} **Compliance**.
![Compliance tab in the enterprise account sidebar](/assets/images/help/business-accounts/enterprise-accounts-compliance-tab.png)

View File

@@ -0,0 +1 @@
You can view a list of all dormant users who have not been suspended and who are not site administrators.

View File

@@ -3,26 +3,10 @@ import fetch from 'node-fetch'
import statsd from '../lib/statsd.js'
import FailBot from '../lib/failbot.js'
const SCHEMAS = {
page: 'docs.v0.PageEvent',
exit: 'docs.v0.ExitEvent',
link: 'docs.v0.LinkEvent',
search: 'docs.v0.SearchEvent',
searchResult: 'docs.v0.SearchResultEvent',
navigate: 'docs.v0.NavigateEvent',
survey: 'docs.v0.SurveyEvent',
experiment: 'docs.v0.ExperimentEvent',
redirect: 'docs.v0.RedirectEvent',
clipboard: 'docs.v0.ClipboardEvent',
print: 'docs.v0.PrintEvent',
preference: 'docs.v0.PreferenceEvent',
}
export default class Hydro {
constructor({ secret, endpoint } = {}) {
this.secret = secret || process.env.HYDRO_SECRET
this.endpoint = endpoint || process.env.HYDRO_ENDPOINT
this.schemas = SCHEMAS
}
/**
@@ -47,20 +31,14 @@ export default class Hydro {
* @param {any} value
*/
async publish(schema, value) {
return this.publishMany([{ schema, value }])
}
/**
* Publish multiple events to Hydro
* @param {[{ schema: string, value: any }]} events
*/
async publishMany(events) {
const body = JSON.stringify({
events: events.map(({ schema, value }) => ({
schema,
value: JSON.stringify(value), // We must double-encode the value property
cluster: 'potomac', // We only have ability to publish externally to potomac cluster
})),
events: [
{
schema,
value: JSON.stringify(value), // We must double-encode the value property
cluster: 'potomac', // We only have ability to publish externally to potomac cluster
},
],
})
const token = this.generatePayloadHmac(body)
@@ -81,23 +59,24 @@ export default class Hydro {
statsd.increment(`hydro.response_code.${res.status}`, 1, statTags)
statsd.increment('hydro.response_code.all', 1, statTags)
// Track hydro exceptions in Sentry, but don't track 503s because we can't do anything about service availability
if (!res.ok && res.status !== 503) {
// Track hydro exceptions in Sentry,
// but don't track 5xx because we can't do anything about service availability
if (!res.ok && res.status < 500) {
const err = new Error(`Hydro request failed: ${res.statusText}`)
err.status = res.status
const failures = await res.text()
FailBot.report(err, {
hydroStatus: res.status,
hydroText: res.statusText,
hydroFailures: failures,
})
// If the Hydro request failed as an "Unprocessable Entity", log it for diagnostics
if (res.status === 422) {
const failures = await res.json()
console.error(
`Hydro schema validation failed:\n - Request: ${body}\n - Failures: ${JSON.stringify(
failures
)}`
`Hydro schema validation failed:\n - Request: ${body}\n - Failures: ${failures}`
)
}

View File

@@ -260,4 +260,15 @@
- /billing/managing-billing-for-your-github-account/managing-invoices-for-your-enterprise
/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization
- /organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization
- /organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization
# The initializing-github-ae.md article is referenced in these code files:
# - lib/github/private_instance_bootstrapper/internal_support_contact.rb
# - lib/github/private_instance_bootstrapper/saml_idp_configuration.rb
# - lib/github/private_instance_bootstrapper/policies_configuration.rb
# This redirect ensures that the links don't resolve to the non-GHAE version
# of the docs as this article only exists in the GHAE docs.
/github-ae@latest/admin/configuration/configuring-your-enterprise/initializing-github-ae
- /admin/configuration/configuring-your-enterprise/initializing-github-ae
- /enterprise-server@latest/admin/configuration/configuring-your-enterprise/initializing-github-ae

View File

@@ -461,7 +461,7 @@ const preferenceSchema = {
},
}
export default {
export const eventSchema = {
oneOf: [
pageSchema,
exitSchema,
@@ -477,3 +477,18 @@ export default {
preferenceSchema,
],
}
export const hydroNames = {
page: 'docs.v0.PageEvent',
exit: 'docs.v0.ExitEvent',
link: 'docs.v0.LinkEvent',
search: 'docs.v0.SearchEvent',
searchResult: 'docs.v0.SearchResultEvent',
navigate: 'docs.v0.NavigateEvent',
survey: 'docs.v0.SurveyEvent',
experiment: 'docs.v0.ExperimentEvent',
redirect: 'docs.v0.RedirectEvent',
clipboard: 'docs.v0.ClipboardEvent',
print: 'docs.v0.PrintEvent',
preference: 'docs.v0.PreferenceEvent',
}

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bbc35c3c1e6a33afa044f0ace37f1eb13da3c3d196f874db70f1c4f192f13cd9
size 567921
oid sha256:f3f352dfe6f4d54a43e8ba4a4f1e62588158c9ee1a721d7411333d85f6db4165
size 567909

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:660fa89cf19aa45e6c96f9107178718acfd4c2bc749f564bd08c7469bf6ef6a8
size 985617
oid sha256:71fd13e49cb9bcdc2460412e0f959712cfaedc720ac4fc14ffc765ec0e56c6e0
size 985580

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:211d0efbbc86fd88f24c549cfaf0235d5f0fa78caa763e43aee63be1fde9110a
size 470029
oid sha256:aec323b11cb171b7a4e0cdbddfe1068236f5c40ea4d944320f0e46260e4ecaf5
size 470238

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9f1c1151b40ee588fe39e129c321c8ac49a5132da7c93cdf64123e4a53775a97
size 1841692
oid sha256:723eaf31d285c960d161a59485550f3b9b5ff0ac64302a94c8ada08ef11e7f77
size 1842603

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:44eebf1523eaa4e6dcf15da7979b6c6d3f56af3f2cadd46db30bf7fc076f61aa
size 500280
oid sha256:6cec476f07f2556c3d7599e2ab2289288c830501455d83096020a567097e6825
size 500362

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c2b14e2a998213318999f44062b7aa7bf90dbd2bc34f0cc96c9e373e31e377a4
size 2101110
oid sha256:ef3f4a078bf491af0b830d646fefa229e484f6ff3737cd2115668b211df7f309
size 2100752

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f6588db58e1cf402f19c019d63ee953dd880bca01a94471286969841a4adf753
size 592070
oid sha256:5dc3b02676e553afab4e0f3156816143afd590aaf80118555e34758d48eb0df2
size 592142

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d00b8012ab83933278d8d9e1c6b2609ca6dceb9846da3a9a7b55d0920f95e1f5
size 3228686
oid sha256:c6eacf78bcf0b8a2e22a6b12af349a26693909dd9965c860bce6c2571884ef00
size 3229243

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e9ffbfec19f61b6fc8fcdb3690df2c7ce59e8ef1f19d3aaf218deaf70d8f5e4b
size 498025
oid sha256:a899cce6ea51fde813838bafce007fe4e8e2ff5c909c6794eff9d0881290d3ac
size 498105

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dcc820da9723d7b64fc2ae6814b382e527aee2e9133bf4fa2c68d08f45c6e1f6
size 2125944
oid sha256:2ee531198a7052b93ef83f4d7ea4004980f2996039fbfb5ebe90d2d55421a145
size 2124879

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dcafc042c237c95369e7479692b77ea355c51bf2f39054cefd2f4d00227d30d3
size 581773
oid sha256:e99d18c1812a0019c6d0a9cc2e5dbfa6d341c54238396f32dbaa558190998b4e
size 581801

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2b6325699336f50defcada2195d93f8e0a5c37b5a1e4394922f671ba13d40a34
size 1014813
oid sha256:e377599cb29224d18352954681abd557869ac9d694074bd3d097e2fbeaf93fec
size 1015239

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aebf776f2b68c623d364c6574618c84518bd42893ddc7ced736892c74eb0d1fd
size 479867
oid sha256:0aeeefc1125ee12fa32a8af94a999a5a2dfad2851d9c815568ce10af2d954bdd
size 480217

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a9e9020f1b2d8d24de7ee8f7f5d4c20822781be9042950f2c14a6c6ade705d72
size 1886856
oid sha256:a9a32c540860b51c55b6a0bf401dea81f9cf8544098668245b9553d8f960e75e
size 1887982

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ec9198c1830488b935cccf482a4b888f185169535b26c814a8ae352e8e55d90c
size 511158
oid sha256:9c4803be8d5b7962ff839e5e59e2383b36cd4b6a1b659bdba4fe8ad0dafc0f6e
size 511152

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ec6fc3d69abf476d1e02942cb13a0bd7e4e7a26458192f1ed1f0e2b4b550763d
size 2148308
oid sha256:7ce2398b55571a0feeae61b0615e2d3bb48cee8594804049420055cf9e38abd1
size 2148643

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:438ba233fbadf96f8da074c2c1f8295fd6333a813b2ff15a30ace6bdb2378642
size 605429
oid sha256:ea6f4ec55f447357f0189206f00f236832c2fb2836dc22f99cf3c07298931d97
size 605506

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e1928a30dada8b91ffc09b0678a48fd5c04003b246effa62f611fe7e93a04772
size 3310503
oid sha256:d198853ff335437ed258f429e7e60a874a3a17e26a2b3cd3cbd00a702ce9d19d
size 3309536

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e520ca157c65ee338dd44f0f298a6b37f97291f9854c61d8e3cfd4b0ce540568
size 508970
oid sha256:269adfdd58c9bb915fcea93b6d6353d2c8ad8032e5aad49e065ca9d0eb5940a8
size 508891

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:08121e3af3f7329e46d704e59f09959e6c7f69dcddc5c0edbc89062acc6e0e44
size 2174226
oid sha256:b05ef49d322864547fb546665ae50f1491c47cfaa7ccd2ffb0cc8cdc566ee15a
size 2174294

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:123943b55c59bd6fe8e6266e8871e04afc2c4eb33695d76f88d46fcecedd1d89
size 594171
oid sha256:f3265140279e20635bc4c92138a130dd371b63bdeb6b69323e10b6282f3fefeb
size 594184

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:01eda77b09b63c9ab3f059dac9b582921040301877fddae80c3edb655bd495cb
size 1037117
oid sha256:1784770eff3b07b7f47c00231bc8e85e703203a7128870a6c300d354250e0627
size 1036599

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4d58799c852459730f68978e11f539df5157f732fd1a98bf8b85e71657373a8d
size 488787
oid sha256:e4e67efaf2ec7f98b0fbc31e2dc7f72b65dadbc6b0650db1124a961e3515b9a4
size 490055

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8fd446c94d3942a32c4eb57d83d3f9f49f0503bc5fb2ca28aa196cfc754b3f0d
size 1918843
oid sha256:68c105bc69efb8ea8c59f25436beafacfb728254374588e6817970f865dce011
size 1921026

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:01821a3bc880081847c61279aab985916c4f99e5ded0aa735c9d426123b36da4
size 520292
oid sha256:a7279cf1f4114361c2bd97db33a205abd5f4986fb59972a077c60e5a754f8111
size 520256

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8a90b71aa1066e24362332e4d842e6fbe0bbcd52916efa4e40a612ef98d5ad6c
size 2186570
oid sha256:35fab5ce30b0b7242f97646c81dc846fa3914e0e52a9a7ed5156cf4c8e4a7823
size 2187139

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:569affd4e16cb23a6e53776b9fc6315af1e469538144eb0f7d086a378cccfb9c
size 617022
oid sha256:b355bdb236a67ee0aaafc3bb8b2edc8d9502ab164dcea4f786cecb677f90a063
size 616973

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9f75763a40f125be184e9bd6d54434f4d15ca6b1a9fd5897745a1cd5e155b5af
size 3378057
oid sha256:588029b34174373e20ddc2d151b5eb4bb12e416fc59fb43b2a00b65a0a74735f
size 3376851

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4343f29045ae1ff37aa8f990ad2d1a2834e21cefd33cda1241a9108ba4f89d3e
size 518506
oid sha256:f54e0d387508ccc2908f23c0026c1e48acb74638001c598cccbfbbc138f5dd06
size 518865

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2870140732d03cb918b8f2f23933b5e79f7d5b1670ac9151672b3b9117d7ba73
size 2213589
oid sha256:49d7c34e3de3407343148c79ab579891008f5514a0e3d56b35ba88b40e8bbdb5
size 2213083

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7999156fa99860069170c882048ef0a38fd5d95931b4f8f2152e10d27a047505
size 819800
oid sha256:7faf40bc465e34a71fc2ca3f83b76cb894eb3e7484ec52be84406cbd5218f886
size 819818

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9c3f3b82ef7c26c7c2bb040539def67be4f1dc143358a48c947a044901b8269c
size 1330129
oid sha256:636af056d5b9bd2ed3b6ee94b20dd639fb77561728a726f37ed7c5d74e69c238
size 1329851

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ed55eb5ac48e4ef1c754e2084607e22490c5f37219679e1f6f9768c2077b7fe1
size 654146
oid sha256:47c2bd22cd0a5e9e8e6e9b074ce6869c9cddf93a23a4969b098c7cf6f6e69013
size 654120

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f76a98e7285fe2603b0cb8765a1a888dfe9eb4e35b559ea4a986881195c2e018
size 2448118
oid sha256:ee22995574ce74eabf84faf63f3d5e1916a4d82183b503978cf69efb073eabc8
size 2451056

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:697446bceba9bdc0a3a948a9d3437040521f73755f1d3590ea51b8cb7e936b84
size 711376
oid sha256:5d724bef603c0e29c2a97a758c5a5ea90e1d34d75a21f1053accd06e81a5c15f
size 711666

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1ef4f07379d4005cd52bcf4ec0e31aed6e466d29b44d2cf0fdd6eae65990ef71
size 2905985
oid sha256:20a73f5820f7da0938b816f5a2bac922ba37415fc9db23176ca8083109124807
size 2906353

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3e59327492aca74b690d8f11564832325eafb934a58c354757005d0fa9f90ea
size 842634
oid sha256:3ace21946a6025336c6c20e762949483551dce938e9afc4de038fbb1bbbaac9b
size 842196

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3f8fb0e0588f3d7783202872d544066eb7ff0ff1ab310f1f5af8a8ab9c752602
size 4495510
oid sha256:9462d5222228e48c8c3cac3b6cc96715e5d653b449716c40b79a6c13300cd323
size 4494740

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:be09bc933fa4ece79c5040cabeb8c90b0022637d49be4e28e6c526a5bdfd53dc
size 712122
oid sha256:854ceb080b3702ac0a019288cc54889eeb87eb21f67e07d7f9aa41634e133c01
size 712020

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7763c17e54c3b3e0df5a284ce036eefdb629c0483c8d2d030739ff79f2a32bd5
size 2949412
oid sha256:dbafb0e78916bc9666925c3eca3ef52ee689039cecba0c3be62e40fd53830905
size 2949254

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:be73cf52c82e87509caea3aa57d7417340edc649d77b848fa4b8a3dad7fa8e77
size 455858
oid sha256:7cabb7eb14da453c9fd7bd16dc9bc98c887dbfd7269e0a9f5400b58d618419ed
size 455985

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a809639713107630fe3a16f12fe9450bf58d6856de74fd01c45c7a0620194cbe
size 766065
oid sha256:245cbe0d9b277eb2e41ec63695a491ca53b7743f3b3f8323153c804ead4565d2
size 766834

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ad09be3f62b6244206513397fe5340d640f1dcc5a4c772f3eeab45f033f1009
size 378013
oid sha256:453e9a3098d2f8ba909c8b2411dcc721dd8d3b8ec304df89c9dd2abf012d6b6c
size 378469

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:043c9dfb228b5dd50433002de1ae3adab5d3a7b916dde2e30b6e966627a0a9c3
size 1416452
oid sha256:f6e417f52efbeedfe37d3e70d70672678db0c91cc94f07393fbbee0fd32e3ec4
size 1417734

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:51f4ab3421c0fa815e9b13ccf1d1915bf3a2a951bfbb1ea6d343309a58b78708
size 402811
oid sha256:e825ae385536a4bb8639a12a0eac193d977bc3094fd113af62baf2a120f06280
size 402649

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bcd06bbb5b81474930058dd0971ef1be8d2c2b4ef0ba62402edafd06593ba83f
size 1636712
oid sha256:3f57737d56a1c749e4175e2fbaf899fe86b57f6a920adf40fd031120a5e4cd83
size 1636364

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab1f8f01bf13b66e23e18249651cddaed314272f3cc9b5f5d8f241740ed1ab41
size 475387
oid sha256:f382cb2a3f04c1b7a183f3bd2fae81be019faf7a11f9002838f0e4ba9f26f5c0
size 475144

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aba7f7cfae05e67d9b392cad8b79318491879d1f3500903e5ec680fe06962582
size 2500536
oid sha256:793350bfb6b378caa1319c4a5828e41c18f8641b98c9c87083fda43ff187aeff
size 2500322

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7832353148cc33da27e651986abb0a6c3f3a88a29cb661ecf6fff38544741701
size 401240
oid sha256:34bdb29703150169b24c189d3e9be85a14d1f4e97c5af3696a4a4096317f54e7
size 401304

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1c5a95c7b39e59c5d4af4d98a07e7c94a6dd5b9bf8e2d7543ab6e64be9217fe9
size 1654899
oid sha256:29e25a138cde445d64a8ff66f1562fbf125e377e082d5ee053dd5c3cb92384e3
size 1656070

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:002646ec0f7fcd2b0a408982bcdb03988e949fd722b485e46292db7eb49c4c3e
size 699954
oid sha256:b51a8e741ad529145f45d1705d61a61b99b7a9c1ccb3254ae6c41c8478d5ce45
size 699935

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dc1e826e26f05ac8b13c82c0d7b30491b8e61f1a9ef1a5ed967b2662b5be3bc0
size 1245412
oid sha256:df535e8534b78002a306451580d237fa2b51a4cfa1807299ad864f424c40922f
size 1244948

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e1dfc5a48cfe06f1c3d93d7643315514e829d686f7749a3f9e0c893189a5cee5
size 590813
oid sha256:eca587517276357126a0494ed4a9782a4b3d5321811f8939261b2f8f9af05002
size 591221

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c6163dd028092241f25392fa6efcd85649e19ce3f99820ee349f38de076da6fb
size 2327025
oid sha256:30c74389e3cafcea21c1f500d1865ecfdcb34bb8654e8c44528c7f839f8d1b86
size 2329477

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c66ff8a1f40d66dddde56d710dc40be26cace75e0a43e44104a140085b22beed
size 629375
oid sha256:0bbe0af524c0cd33ef90a8b6fe812de60d8543c7bdc06f723b448fefc6141f4c
size 629713

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eb0ae0352492425097fddea0df098618eb7e80eadcba55370c422859754cc21e
size 2642102
oid sha256:b754343a43cdd5a0080ab60d2d42ebb960a8b837ea269c0f994f84726d77fb84
size 2641609

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2ec6080f29ffa0a9848939d0a4640b5282b4fd3ad7ee2b03aea21b3016e578e9
size 726692
oid sha256:7d78f49efa986f178be0a8f634d7f37413b9669b5f33bc47d7b2fff3096d398d
size 726812

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8b70ec170d1dcdfa14204bc4a0eaa8aca6cebfa360fc7bf110928b270be30193
size 3992742
oid sha256:2c4e7a1ba39f23911d7810eb0a4652182b5c8e8b3dd231805468610cd6013c37
size 3992533

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f10dd233dbfc8f532e5255d936311f23077be7c5bee9279e74cc1bc4dd54a495
size 628217
oid sha256:9cc80efb6a669dc8cdf99bf43c7e132e5506d71cb671a6594bc0f610798de309
size 627963

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:27466e5f488822053ea678a6b17a8cd4e2c17a2c3f67be28b9df8b681d79fa17
size 2670778
oid sha256:b446ab7e1638b6d984a2d97372e15e9664ce426075867e9b8da4d5f3bd2ff9be
size 2670098

View File

@@ -20,6 +20,7 @@ export default async function releaseNotesContext(req, res, next) {
if (!(req.pagePath.endsWith('/release-notes') || req.pagePath.endsWith('/admin'))) return next()
const [requestedPlan, requestedRelease] = req.context.currentVersion.split('@')
const releaseNotesPerPlan = req.context.site.data['release-notes'][requestedPlan]
// Release notes handling differs if version has numbered releases (like GHES) or not (like GHAE)
@@ -33,7 +34,7 @@ export default async function releaseNotesContext(req, res, next) {
if (hasNumberedReleases) {
const currentReleaseNotes = releaseNotesPerPlan[`${requestedRelease.replace(/\./g, '-')}`]
if (!currentReleaseNotes && req.pagePath.endsWith('/release-notes')) {
if (!currentReleaseNotes) {
// If the GHES version doesn't have any release notes, let's be helpful and redirect to `enterprise.github.com`
return requestedPlan === 'enterprise-server'
? res.redirect(`https://enterprise.github.com/releases/${requestedRelease}.0/notes`)

View File

@@ -2,7 +2,7 @@ import express from 'express'
import { omit } from 'lodash-es'
import Ajv from 'ajv'
import addFormats from 'ajv-formats'
import schema from '../lib/schema-event.js'
import { eventSchema, hydroNames } from '../lib/schema-event.js'
const OMIT_FIELDS = ['type']
@@ -15,14 +15,14 @@ router.post('/', async function postEvents(req, res, next) {
const isDev = process.env.NODE_ENV === 'development'
const fields = omit(req.body, '_csrf')
if (!ajv.validate(schema, fields)) {
if (!ajv.validate(eventSchema, fields)) {
return res.status(400).json(isDev ? ajv.errorsText() : {})
}
if (req.hydro.maySend()) {
// intentionally don't await this async request
// so that the http response afterwards is sent immediately
req.hydro.publish(req.hydro.schemas[fields.type], omit(fields, OMIT_FIELDS)).catch((e) => {
req.hydro.publish(hydroNames[fields.type], omit(fields, OMIT_FIELDS)).catch((e) => {
if (isDev) console.error(e)
})
}

View File

@@ -32,13 +32,22 @@ export default async function learningTrack(req, res, next) {
const currentLearningTrack = { trackName, trackProduct }
const guidePath = getPathWithoutLanguage(getPathWithoutVersion(req.pagePath))
let guideIndex = track.guides.findIndex((path) => path === guidePath)
// The raw track.guides will return all guide paths, need to use getLinkData
// so we only get guides available in the current version
const trackGuides = await getLinkData(track.guides, req.context)
const trackGuidePaths = trackGuides.map((guide) => {
return getPathWithoutLanguage(getPathWithoutVersion(guide.href))
})
let guideIndex = trackGuidePaths.findIndex((path) => path === guidePath)
// The learning track path may use Liquid version conditionals, handle the
// case where the requested path is a learning track path but won't match
// because of a Liquid conditional.
if (guideIndex < 0) {
guideIndex = await indexOfLearningTrackGuide(track.guides, guidePath, req.context)
guideIndex = await indexOfLearningTrackGuide(trackGuidePaths, guidePath, req.context)
}
// Also check if the learning track path is now a redirect to the requested
@@ -48,14 +57,14 @@ export default async function learningTrack(req, res, next) {
for (const redirect of req.context.page.redirect_from) {
if (guideIndex >= 0) break
guideIndex = await indexOfLearningTrackGuide(track.guides, redirect, req.context)
guideIndex = await indexOfLearningTrackGuide(trackGuidePaths, redirect, req.context)
}
}
if (guideIndex < 0) return noTrack()
if (guideIndex > 0) {
const prevGuidePath = track.guides[guideIndex - 1]
const prevGuidePath = trackGuidePaths[guideIndex - 1]
const result = await getLinkData(prevGuidePath, req.context, { title: true, intro: false })
if (!result) return noTrack()
@@ -64,8 +73,8 @@ export default async function learningTrack(req, res, next) {
currentLearningTrack.prevGuide = { href, title }
}
if (guideIndex < track.guides.length - 1) {
const nextGuidePath = track.guides[guideIndex + 1]
if (guideIndex < trackGuidePaths.length - 1) {
const nextGuidePath = trackGuidePaths[guideIndex + 1]
const result = await getLinkData(nextGuidePath, req.context, { title: true, intro: false })
if (!result) return noTrack()

View File

@@ -36,30 +36,6 @@ describe('hydro', () => {
})
})
describe('#publishMany', () => {
it('publishes multiple events to Hydro', async () => {
await hydro.publishMany([
{ schema: 'event-name', value: { pizza: true } },
{ schema: 'other-name', value: { salad: false } },
])
expect(params).toEqual({
events: [
{
schema: 'event-name',
value: JSON.stringify({ pizza: true }),
cluster: 'potomac',
},
{
schema: 'other-name',
value: JSON.stringify({ salad: false }),
cluster: 'potomac',
},
],
})
})
})
describe('#generatePayloadHmac', () => {
it('returns a SHA256 HMAC string', () => {
const body = JSON.stringify({ pizza: true })