Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 18 additions & 71 deletions .github/workflows/local-dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Local development

# **What it does**: Can you start the local server like a writer would do?
# **Why we have it**: Our CI is often heavily geared on testing in "production"
# that historically we've been known to break local
# development sometimes.
# **What it does**: Basic smoke test to ensure local dev server starts and serves content
# **Why we have it**: Catch catastrophic "npm start is completely broken" scenarios
# **Who does it impact**: Engineers, Contributors.

on:
Expand All @@ -28,76 +26,25 @@ jobs:
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}

# Note that we don't check out docs-early-access, Elasticsearch,
# or any remote translations. Nothing fancy here!

- name: Disable Next.js telemetry
run: npx next telemetry disable

- name: Install headless browser
run: npx playwright install --no-shell

# The Playwright test, with the env vars we set here, takes care of
# starting a server and shutting it down when it's done.
# That's why it's important this step comes before the `npm start &`
# step below.
- name: Run Playwright tests
env:
# This is what local dev contributors are expected to do.
PLAYWRIGHT_START_SERVER_COMMAND: 'npm start'
# This is so that timeouts aren't retried, which can lead to
# tests not exiting at the end with a non-zero. Otherwise,
# by default failures are marked as "flaky" instead of "failed".
PLAYWRIGHT_RETRIES: 0
TEST_EARLY_ACCESS: ${{ github.repository == 'github/docs-internal' }}
# workaround for https://github.com/nodejs/node/issues/59364 as of 22.18.0
NODE_OPTIONS: '--no-experimental-strip-types --max-old-space-size=8192'
run: npm run playwright-test -- playwright-local-dev

- name: Start server in the background
run: npm start > /tmp/stdout.log 2> /tmp/stderr.log &

- name: View the home page
run: |
echo "Going to sleep a little to wait for the server to start"
sleep 15
curl --fail --retry-connrefused --retry 5 http://localhost:4000/

- name: Run basic tests
run: npm run test-local-dev

- if: ${{ failure() }}
name: Debug server outputs on errors
- name: Start server and basic smoke test
run: |
echo "____STDOUT____"
cat /tmp/stdout.log
echo "____STDERR____"
cat /tmp/stderr.log

- name: Pre-commit hooks should prevent bad Markdown edits
run: |
set -e

# This test assumes this one file always exists
ls content/get-started/start-your-journey/hello-world.md

# Not sure if it matters but we're in a detached HEAD state
# after the actions/checkout action.
git checkout -b my-new-branch
# Also, do this so you don't get errors from git about this
# not being set up before your first commit attempt
git config user.name github-actions
git config user.email github-actions@github.com

# To know what will fail the markdown lint, see src/content-linter/style/github-docs.js
# Add some NOT valid Markdown to it
# In this case an internal link with a hardcode /en/ prefix.
echo "This *is** not valid [Markdown](/en/foo)" >> content/get-started/start-your-journey/hello-world.md
git commit -a -m "this should fail"
exit_code=$?
if [ $exit_code != 0 ]; then
echo "That SHOULD have failed, but it DIDN'T"
exit 1
# Start server in background
npm start > /tmp/stdout.log 2> /tmp/stderr.log &
SERVER_PID=$!

# Wait for server to be ready and test homepage
if curl --fail --retry-connrefused --retry 10 --retry-delay 2 http://localhost:4000/; then
echo "✅ Local dev server started successfully and serves homepage"
kill $SERVER_PID 2>/dev/null || true
else
echo "As expected, it failed :)"
echo "❌ Local dev server failed to start or serve content"
echo "____STDOUT____"
cat /tmp/stdout.log
echo "____STDERR____"
cat /tmp/stderr.log
kill $SERVER_PID 2>/dev/null || true
exit 1
fi
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@ Having {% data variables.product.prodname_copilot_short %} as an additional codi

### Making {% data variables.copilot.copilot_coding_agent %} available

Before you can assign tasks to {% data variables.product.prodname_copilot_short %}, it must be enabled. See [AUTOTITLE](/copilot/concepts/coding-agent/about-enabling-coding-agent).
Before you can assign tasks to {% data variables.copilot.copilot_coding_agent %}, it must be enabled.

{% data variables.copilot.copilot_coding_agent %} is available with the {% data variables.copilot.copilot_pro %}, {% data variables.copilot.copilot_pro_plus %}, {% data variables.copilot.copilot_for_business %} and {% data variables.copilot.copilot_enterprise %} plans.

If you are a {% data variables.copilot.copilot_for_business %} or {% data variables.copilot.copilot_enterprise %} subscriber, an administrator must enable the relevant policy before you can use the agent.

Repository owners can choose to opt out some or all repositories from {% data variables.copilot.copilot_coding_agent %}.

For more information, see [AUTOTITLE](/copilot/concepts/agents/coding-agent/managing-access).

## {% data variables.copilot.copilot_coding_agent %} usage costs

Expand Down
2 changes: 1 addition & 1 deletion content/copilot/concepts/agents/coding-agent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ topics:
- Copilot
children:
- /about-coding-agent
- /coding-agent-for-business-and-enterprise
- /managing-access
- /mcp-and-coding-agent
contentType: concepts
redirect_from:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: About GitHub Copilot coding agent for business and enterprise
shortTitle: Business and enterprise
title: Managing access to GitHub Copilot coding agent
shortTitle: Managing access
allowTitleToDifferFromFilename: true
intro: Find out about {% data variables.copilot.copilot_coding_agent %} policies available for {% data variables.copilot.copilot_enterprise %} and {% data variables.copilot.copilot_for_business %}, and about disabling the agent for specific repositories.
product: '{% data reusables.gated-features.copilot-coding-agent %}<br><a href="https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=enabling+copilot+coding+agent&ref_page=docs" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Sign up for {% data variables.product.prodname_copilot_short %}</span> {% octicon "link-external" height:16 %}</a>'
Expand All @@ -17,6 +17,7 @@ redirect_from:
- /copilot/concepts/coding-agent/enable-coding-agent
- /copilot/concepts/agents/coding-agent/enable-coding-agent
- /copilot/how-tos/agents/copilot-coding-agent/enabling-copilot-coding-agent
- /copilot/concepts/agents/coding-agent/coding-agent-for-business-and-enterprise
contentType: concepts
---

Expand Down
4 changes: 2 additions & 2 deletions content/copilot/concepts/context/spaces.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: About organizing and sharing context with GitHub Copilot Spaces
title: About GitHub Copilot Spaces
shortTitle: Spaces
intro: Understand how gathering context with {% data variables.copilot.copilot_spaces %} can improve your results and help your teammates.
intro: Understand how organizing and sharing context with {% data variables.copilot.copilot_spaces %} can improve your {% data variables.copilot.copilot_chat_dotcom_short %} results and help your teammates.
permissions: Anyone with a {% data variables.product.prodname_copilot_short %} license can use {% data variables.copilot.copilot_spaces_short %}.
versions:
feature: copilot
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
"sync-secret-scanning": "tsx src/secret-scanning/scripts/sync.ts",
"sync-webhooks": "npx tsx src/rest/scripts/update-files.ts -o webhooks",
"test": "vitest",
"test-local-dev": "tsx src/workflows/test-local-dev.ts",
"test-moved-content": "tsx src/content-render/scripts/test-moved-content.ts",
"tsc": "tsc --noEmit",
"unallowed-contributions": "tsx src/workflows/unallowed-contributions.ts",
Expand Down
65 changes: 0 additions & 65 deletions src/fixtures/tests/playwright-local-dev.spec.ts

This file was deleted.

8 changes: 8 additions & 0 deletions src/fixtures/tests/playwright-rendering.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ test('search from enterprise-cloud and filter by top-level Fooing', async ({ pag
// for improvement!
})

test('404 page renders correctly', async ({ page }) => {
const response = await page.goto('/this-definitely-does-not-exist')
expect(response?.status()).toBe(404)

// Check that the 404 page content is rendered
await expect(page.getByText(/It looks like this page doesn't exist/)).toBeVisible()
})

test.describe('platform picker', () => {
test('switch operating systems', async ({ page }) => {
await page.goto('/get-started/liquid/platform-specific')
Expand Down
Loading
Loading