Skip to content

Commit

Permalink
Merge branch 'main' into mm-cs-port-visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
saritai authored Apr 4, 2022
2 parents a5beffd + 9aa82f2 commit 18a05d5
Show file tree
Hide file tree
Showing 1,212 changed files with 20,511 additions and 18,280 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/needs-sme-stale-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Stale check for issues or PRs with "needs SME" label

# **What it does**: Provides stale checks on issues/PRs that need SME(subject matter expert) review on open source docs repo.
# **Why we have it**: In the open repo, we want we want frequent checks on issues/PRs that are waiting on SME review.
# **Who does it impact**: Anyone working in the open repo.

on:
schedule:
- cron: '40 20 * * *' # Run each day at 20:40 UTC / 12:40 PST

permissions:
issues: write
pull-requests: write

jobs:
stale_needs-sme:
if: ${{ github.repository == 'github/docs'' }}
runs-on: ubuntu-latest

steps:
- uses: actions/stale@7fb802b3079a276cf3c7e6ba9aa003c665b3f838
with:
only-labels: needs SME
remove-stale-when-updated: true
days-before-stale: 7 # adds stale label if no activity for 7 days
stale-issue-message: 'This is a gentle bump for the docs team that this issue is waiting for technical review.'
stale-issue-label: SME stale
days-before-issue-close: -1 # never close
stale-pr-message: 'This is a gentle bump for the docs team that this PR is waiting for technical review.'
stale-pr-label: SME stale
days-before-pr-close: -1 # never close
31 changes: 31 additions & 0 deletions .github/workflows/needs-sme-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Comment on adding "needs SME" label

# **What it does**: Comment on issues and pull requests when a "needs SME" label is added. SME = subject matter expert.
# **Why we have it**: We want to manage our queue of issues and pull requests that need sme review.
# **Who does it impact**: Everyone that works on docs or docs-internal.

on:
issues:
types: [labeled]
pull_request_target:
types: [labeled]

permissions:
issues: write
pull-requests: write

jobs:
add-comment:
if: ${{ github.repository == 'github/docs' && (github.event.label.name == 'needs SME' && github.event_name == 'issues' || github.event_name == 'pull_request_target') }}
runs-on: ubuntu-latest
steps:
- uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
with:
issue-number: ${{ github.event.issue.number }}
body: |
Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert :eyes:
- uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
with:
issue-number: ${{ github.event.pull_request_target.number }}
body: |
Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert :eyes:
40 changes: 35 additions & 5 deletions .github/workflows/orphaned-assets-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ name: 'Orphaned assets check'
# **Who does it impact**: Docs content.

on:
pull_request:
push:
branches:
- gh-readonly-queue/main/**
workflow_dispatch:
schedule:
- cron: '13 10 * * *' # Once a day at 10:13 UTC

permissions:
contents: read

jobs:
orphaned-assets-check:
if: ${{ github.repository == 'github/docs-internal' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
with:
# Using a PAT is necessary so that the new commit will trigger the
# CI in the PR. (Events from GITHUB_TOKEN don't trigger new workflows.)
token: ${{ secrets.DOCUBOT_REPO_PAT }}

- name: Setup node
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
Expand All @@ -30,4 +34,30 @@ jobs:
run: npm ci

- name: Check for orphaned assets
run: ./script/find-orphaned-assets.mjs --verbose --exit
env:
# Needed for gh
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
run: |
set -e
./script/find-orphaned-assets.mjs | xargs git rm
# If nothing to commit, exit now. It's fine. No orphans.
git status | grep 'nothing to commit' && exit 0
# Replicated from the translation pipeline PR-maker Action
git config --global user.name "docubot"
git config --global user.email "67483024+docubot@users.noreply.github.com"
date=$(date '+%Y-%m-%d-%H-%M')
branchname=orphaned-assets-$date-$GITHUB_RUN_ID
git checkout -b $branchname
git commit -m "Delete orphaned assets $date"
git push origin $branchname
gh pr create \
--title "Delete orphaned assets ($date)" \
--body "Found with the find-orphaned-assets.mjs script" \
--repo github/docs-internal \
--label docs-content-fr
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ Click **Make a contribution** at the bottom of any docs page to make small chang

<img src="./assets/images/contribution_cta.png" width="300" height="150" />

#### Make changes in a codespace

For more information about using a codespace for working on GitHub documentation, see "[Working in a codespace](https://github.com/github/docs/blob/main/contributing/codespace.md)."

#### Make changes locally

1. [Install Git LFS](https://docs.github.com/en/github/managing-large-files/versioning-large-files/installing-git-large-file-storage).
Expand All @@ -54,9 +58,6 @@ Click **Make a contribution** at the bottom of any docs page to make small chang
- Using the command line:
- [Fork the repo](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#fork-an-example-repository) so that you can make your changes without affecting the original project until you're ready to merge them.

- GitHub Codespaces:
- [Fork, edit, and preview](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace) using [GitHub Codespaces](https://github.com/features/codespaces) without having to install and run the project locally.

3. Install or update to **Node.js v16**. For more information, see [the development guide](contributing/development.md).

4. Create a working branch and start with your changes!
Expand Down
Binary file modified assets/images/help/billing/pay-now-button-disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/billing/pay-now-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/billing/payment-summary-edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/billing/payment-summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/pull_requests/merge-queue-options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/help/pull_requests/merge-queue-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed assets/images/help/repository/artifact-drop-down.png
Binary file not shown.
Binary file removed assets/images/help/repository/cancel-check-suite.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 2 additions & 12 deletions components/context/ProductLandingContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ export type ProductLandingContextT = {
intro: string
beta_product: boolean
product: Product
introLinks: {
quickstart?: string
reference?: string
overview?: string
} | null
introLinks: Record<string, string> | null
product_video?: string
featuredLinks: Record<string, Array<FeaturedLink>>
productCodeExamples: Array<CodeExample>
Expand Down Expand Up @@ -128,13 +124,7 @@ export const getProductLandingContextFromRequest = (req: any): ProductLandingCon
})
),

introLinks: page.introLinks
? {
quickstart: page.introLinks.quickstart,
reference: page.introLinks.reference,
overview: page.introLinks.overview,
}
: null,
introLinks: page.introLinks || null,

featuredLinks: getFeaturedLinksFromReq(req),

Expand Down
31 changes: 22 additions & 9 deletions components/landing/LandingHero.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { useEffect, useState } from 'react'
import cx from 'classnames'
import { useRouter } from 'next/router'
import { useMainContext } from 'components/context/MainContext'
import { LinkExternalIcon } from '@primer/octicons-react'

import { useMainContext } from 'components/context/MainContext'
import { Link } from 'components/Link'
import { useProductLandingContext } from 'components/context/ProductLandingContext'
import { useTranslation } from 'components/hooks/useTranslation'
Expand Down Expand Up @@ -46,7 +47,7 @@ export const LandingHero = () => {
href={link}
className={cx('btn btn-large f4 mt-3 mr-3 ', i === 0 && 'btn-primary')}
>
{t(key)}
{t(key) || key}
</FullLink>
)
})}
Expand All @@ -72,7 +73,8 @@ export const LandingHero = () => {
)
}

// Fully Qualified Link - it includes the version and locale in the path
// Fully Qualified Link - it includes the version and locale in the path if
// the href is not an external link.
type Props = {
href: string
children: React.ReactNode
Expand All @@ -81,13 +83,24 @@ type Props = {
export const FullLink = ({ href, children, className }: Props) => {
const router = useRouter()
const { currentVersion } = useVersion()
const locale = router.locale || 'en'
const fullyQualifiedHref = `/${locale}${
currentVersion !== 'free-pro-team@latest' ? `/${currentVersion}` : ''
}${href}`

const isExternal = href.startsWith('https')
let linkHref = href
if (!isExternal) {
const locale = router.locale || 'en'
linkHref = `/${locale}${
currentVersion !== 'free-pro-team@latest' ? `/${currentVersion}` : ''
}${href}`
}

return (
<Link href={fullyQualifiedHref} className={className}>
{children}
<Link href={linkHref} className={className}>
{children}{' '}
{isExternal && (
<span className="ml-1">
<LinkExternalIcon size="small" />
</span>
)}
</Link>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ const article: PlaygroundArticleT = {
node-version: [10.x, 12.x, 14.x, 15.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js \${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: \${{ matrix.node-version }}
- name: Install dependencies
Expand Down Expand Up @@ -275,9 +275,9 @@ const article: PlaygroundArticleT = {
node-version: [8.16.2, 10.17.0]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js \${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: \${{ matrix.node-version }}
- name: Install dependencies
Expand All @@ -304,9 +304,9 @@ const article: PlaygroundArticleT = {
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Install dependencies
Expand All @@ -333,9 +333,9 @@ const article: PlaygroundArticleT = {
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Install dependencies
Expand All @@ -362,9 +362,9 @@ const article: PlaygroundArticleT = {
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Install dependencies
Expand All @@ -391,9 +391,9 @@ const article: PlaygroundArticleT = {
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Install dependencies
Expand All @@ -420,9 +420,9 @@ const article: PlaygroundArticleT = {
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Install dependencies
Expand Down Expand Up @@ -450,9 +450,9 @@ const article: PlaygroundArticleT = {
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
always-auth: true
node-version: '12.x'
Expand Down Expand Up @@ -492,9 +492,9 @@ const article: PlaygroundArticleT = {
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12.x'
cache: 'npm'
Expand All @@ -520,9 +520,9 @@ const article: PlaygroundArticleT = {
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: '12.x'
- run: npm install
Expand Down
Loading

0 comments on commit 18a05d5

Please sign in to comment.