Skip to content

Clarify short title of "Using custom instructions to unlock the power of Copilot code review" #7826

Clarify short title of "Using custom instructions to unlock the power of Copilot code review"

Clarify short title of "Using custom instructions to unlock the power of Copilot code review" #7826

name: Test changed content
# **What it does**: Runs the vitest tests for changed and deleted content files.
# **Why we have it**: Use GitHub Actions to run tests on changed content files.
# **Who does it impact**: Docs engineering, open-source engineering contributors.
on:
pull_request:
branches:
# This is important! If you make a PR against a megabranch, you
# might actually want to delete a file without setting up a
# redirect in its place. But if it's going into `main` we'll
# want to make sure that doesn't happen.
- main
paths:
- 'content/**'
- .github/workflows/test-changed-content.yml
permissions:
contents: read
jobs:
test-changed-content:
runs-on: ubuntu-latest
if: ${{ github.repository == 'github/docs-internal' || github.repository == 'github/docs' }}
steps:
# Each of these ifs needs to be repeated at each step to make sure the required check still runs
# Even if if doesn't do anything
- name: Check out repo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
# Fetch 2 commits so tj-actions/changed-files can diff without extra API calls
fetch-depth: 2
- uses: ./.github/actions/node-npm-setup
- uses: ./.github/actions/get-docs-early-access
if: ${{ github.repository == 'github/docs-internal' }}
with:
token: ${{ secrets.DOCS_BOT_PAT_BASE }}
- uses: ./.github/actions/cache-nextjs
- name: Run build script
run: npm run build
- name: Get changed files
id: changed_files
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
with:
files: 'content/**'
- name: Run tests
env:
CHANGED_FILES: ${{ steps.changed_files.outputs.all_modified_files }}
DELETED_FILES: ${{ steps.changed_files.outputs.deleted_files }}
run: npm test -- src/content-render/tests/render-changed-and-deleted-files.ts