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
13 changes: 7 additions & 6 deletions .github/workflows/changelog-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,14 +420,15 @@ jobs:
uses: actions/ai-inference@2c43c91ae16266ca159d311430343c67a5ffa222 # v3
with:
provider: copilot
# No model is pinned: actions/ai-inference forwards --model to the
# Copilot CLI only when it differs from its GitHub Models default, so
# omitting it lets the CLI pick its own current default (latest Sonnet)
# and avoids breaking when a pinned slug (e.g. gpt-4.1) is retired.
# Must be an explicit empty string, not omitted. This action defaults
# `model` to "gpt-4.1" and always forwards it as --model, and that slug
# is retired, so omitting the input fails with:
# Error: Model "gpt-4.1" from --model flag is not available.
# An empty string makes the action skip --model entirely and lets the
# Copilot CLI pick its own current default. See actions/ai-inference#271.
model: ''
prompt-file: prompt.txt
system-prompt-file: system-prompt.txt
max-completion-tokens: 1000
temperature: 0.3
env:
COPILOT_GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_COPILOT }}

Expand Down
49 changes: 34 additions & 15 deletions .github/workflows/check-for-spammy-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ jobs:
const repo = 'docs'
const pull_number = context.payload.pull_request.number

const { data: files } = await github.rest.pulls.listFiles({
owner: owner,
repo: repo,
pull_number: pull_number,
});
const files = await github.paginate(github.rest.pulls.listFiles, {
owner,
repo,
pull_number,
per_page: 100,
})

const onlyDeletes = files.length > 0 && files.every(f => f.status === 'removed')
const isEmptyCommit = !files.length
const onlyDeletesLines =
files.some(file => file.deletions > 0) &&
files.every(file => file.additions === 0)
const isEmptyCommit = !files.length
const touchesTooMany = files.length > 10
const isBlankLineEdit = files.length > 0 && files.every(file => {
const changedLines = (file.patch || '')
Expand All @@ -47,19 +51,34 @@ jobs:
const onlyRenames = files.length > 0 && files.every(f => f.status === 'renamed')

// Close the PR and add the invalid label
if (onlyDeletes || isEmptyCommit || touchesTooMany || isBlankLineEdit || onlyRenames) {
await github.rest.issues.update({
owner: owner,
repo: repo,
if (
onlyDeletesLines ||
onlyDeletes ||
isEmptyCommit ||
touchesTooMany ||
isBlankLineEdit ||
onlyRenames
) {
await github.rest.issues.addLabels({
owner,
repo,
issue_number: pull_number,
labels: ['invalid'],
});
})

// Comment on the PR
await github.rest.issues.createComment({
owner: owner,
repo: repo,
owner,
repo,
issue_number: pull_number,
body: `This pull request may have been opened accidentally. I'm going to close it now, but feel free to check out our [contribution guidelines](https://docs.github.com/en/contributing), or raise an issue.`,
});
body: onlyDeletesLines
? `This pull request only removes existing content. Before submitting a content-removal pull request, please [open an issue](https://github.com/github/docs/issues/new/choose) explaining the proposed removal and wait for approval from the GitHub Docs team. Once the change has been approved, you can open a new pull request and link it to the issue.`
: `This pull request may have been opened accidentally. I'm going to close it now, but feel free to check out our [contribution guidelines](https://docs.github.com/en/contributing), or raise an issue.`,
})

if (onlyDeletesLines) {
core.setFailed(
'This pull request only deletes lines. An approved issue is required first.',
)
}
}
2 changes: 1 addition & 1 deletion .github/workflows/sync-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
with:
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
message: |
⚠️ GraphQL Sync found ${{ needs.update_graphql_files.outputs.ignored-count }} ignored change types: ${{ needs.update_graphql_files.outputs.ignored-types }}
:graphql: GraphQL Sync found ${{ needs.update_graphql_files.outputs.ignored-count }} ignored change types: ${{ needs.update_graphql_files.outputs.ignored-types }}

These change types are not in CHANGES_TO_REPORT and were silently ignored. Consider reviewing if they should be added to the changelog.

Expand Down
1 change: 1 addition & 0 deletions content/copilot/get-started/enterprise-ai-governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ journeyTracks:
- href: '/copilot/concepts/enterprise/policies'
- href: '/copilot/tutorials/roll-out-at-scale/govern-at-scale/maintain-codebase-standards'
- href: '/copilot/how-tos/administer-copilot/manage-for-enterprise/review-audit-logs'
- href: '/copilot/how-tos/administer-copilot/manage-for-enterprise/use-managed-settings/get-started'
- id: 'adopting_agents'
title: 'Preparing for agents'
description: 'Learn what agents can do for your enterprise, and prepare to roll them out.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ A `copilot-setup-steps.yml` file looks like a normal {% data variables.product.p
> [!NOTE]
> The `copilot-setup-steps.yml` workflow won't trigger unless it's present on your default branch.

Here is a simple example of a `copilot-setup-steps.yml` file for a TypeScript project that clones the project, installs Node.js and downloads and caches the project's dependencies. You should customize this to fit your own project's language(s) and dependencies:
Here is a simple example of a `copilot-setup-steps.yml` file for a TypeScript project that clones the project, installs Node.js and downloads and caches the project's dependencies. You should customize this to fit your own project, including its language(s), its dependencies, and the workflow triggers you need. For example, you wouldn't typically run on both `push` and `pull_request`.

```yaml copy
name: "Copilot Setup Steps"
Expand Down
14 changes: 14 additions & 0 deletions content/rest/code-scanning/ai-scan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: REST API endpoints for AI Scan
shortTitle: AI Scan
intro: Use the REST API to get and update AI Scan settings for an organization.
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
fpt: '*'
ghec: '*'
autogenerated: rest
category:
- Secure code and manage vulnerabilities
allowTitleToDifferFromFilename: true
---

<!-- Content after this section is automatically generated -->
1 change: 1 addition & 0 deletions content/rest/code-scanning/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ versions:
ghec: '*'
ghes: '*'
children:
- /ai-scan
- /alert-dismissal-requests
- /code-scanning
autogenerated: rest
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading