Skip to content

Commit de20b82

Browse files
authored
Merge pull request #45834 from github/repo-sync
Repo sync
2 parents ec1bf28 + e087335 commit de20b82

47 files changed

Lines changed: 2151 additions & 567 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/changelog-agent.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -420,14 +420,15 @@ jobs:
420420
uses: actions/ai-inference@2c43c91ae16266ca159d311430343c67a5ffa222 # v3
421421
with:
422422
provider: copilot
423-
# No model is pinned: actions/ai-inference forwards --model to the
424-
# Copilot CLI only when it differs from its GitHub Models default, so
425-
# omitting it lets the CLI pick its own current default (latest Sonnet)
426-
# and avoids breaking when a pinned slug (e.g. gpt-4.1) is retired.
423+
# Must be an explicit empty string, not omitted. This action defaults
424+
# `model` to "gpt-4.1" and always forwards it as --model, and that slug
425+
# is retired, so omitting the input fails with:
426+
# Error: Model "gpt-4.1" from --model flag is not available.
427+
# An empty string makes the action skip --model entirely and lets the
428+
# Copilot CLI pick its own current default. See actions/ai-inference#271.
429+
model: ''
427430
prompt-file: prompt.txt
428431
system-prompt-file: system-prompt.txt
429-
max-completion-tokens: 1000
430-
temperature: 0.3
431432
env:
432433
COPILOT_GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_COPILOT }}
433434

.github/workflows/check-for-spammy-prs.yml

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,18 @@ jobs:
2828
const repo = 'docs'
2929
const pull_number = context.payload.pull_request.number
3030
31-
const { data: files } = await github.rest.pulls.listFiles({
32-
owner: owner,
33-
repo: repo,
34-
pull_number: pull_number,
35-
});
31+
const files = await github.paginate(github.rest.pulls.listFiles, {
32+
owner,
33+
repo,
34+
pull_number,
35+
per_page: 100,
36+
})
3637
3738
const onlyDeletes = files.length > 0 && files.every(f => f.status === 'removed')
38-
const isEmptyCommit = !files.length
39+
const onlyDeletesLines =
40+
files.some(file => file.deletions > 0) &&
41+
files.every(file => file.additions === 0)
42+
const isEmptyCommit = !files.length
3943
const touchesTooMany = files.length > 10
4044
const isBlankLineEdit = files.length > 0 && files.every(file => {
4145
const changedLines = (file.patch || '')
@@ -47,19 +51,34 @@ jobs:
4751
const onlyRenames = files.length > 0 && files.every(f => f.status === 'renamed')
4852
4953
// Close the PR and add the invalid label
50-
if (onlyDeletes || isEmptyCommit || touchesTooMany || isBlankLineEdit || onlyRenames) {
51-
await github.rest.issues.update({
52-
owner: owner,
53-
repo: repo,
54+
if (
55+
onlyDeletesLines ||
56+
onlyDeletes ||
57+
isEmptyCommit ||
58+
touchesTooMany ||
59+
isBlankLineEdit ||
60+
onlyRenames
61+
) {
62+
await github.rest.issues.addLabels({
63+
owner,
64+
repo,
5465
issue_number: pull_number,
5566
labels: ['invalid'],
56-
});
67+
})
5768
5869
// Comment on the PR
5970
await github.rest.issues.createComment({
60-
owner: owner,
61-
repo: repo,
71+
owner,
72+
repo,
6273
issue_number: pull_number,
63-
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.`,
64-
});
74+
body: onlyDeletesLines
75+
? `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.`
76+
: `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.`,
77+
})
78+
79+
if (onlyDeletesLines) {
80+
core.setFailed(
81+
'This pull request only deletes lines. An approved issue is required first.',
82+
)
83+
}
6584
}

.github/workflows/sync-graphql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
with:
9696
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}
9797
message: |
98-
⚠️ GraphQL Sync found ${{ needs.update_graphql_files.outputs.ignored-count }} ignored change types: ${{ needs.update_graphql_files.outputs.ignored-types }}
98+
:graphql: GraphQL Sync found ${{ needs.update_graphql_files.outputs.ignored-count }} ignored change types: ${{ needs.update_graphql_files.outputs.ignored-types }}
9999
100100
These change types are not in CHANGES_TO_REPORT and were silently ignored. Consider reviewing if they should be added to the changelog.
101101

content/copilot/get-started/enterprise-ai-governance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ journeyTracks:
2525
- href: '/copilot/concepts/enterprise/policies'
2626
- href: '/copilot/tutorials/roll-out-at-scale/govern-at-scale/maintain-codebase-standards'
2727
- href: '/copilot/how-tos/administer-copilot/manage-for-enterprise/review-audit-logs'
28+
- href: '/copilot/how-tos/administer-copilot/manage-for-enterprise/use-managed-settings/get-started'
2829
- id: 'adopting_agents'
2930
title: 'Preparing for agents'
3031
description: 'Learn what agents can do for your enterprise, and prepare to roll them out.'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: REST API endpoints for AI Scan
3+
shortTitle: AI Scan
4+
intro: Use the REST API to get and update AI Scan settings for an organization.
5+
versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖
6+
fpt: '*'
7+
ghec: '*'
8+
autogenerated: rest
9+
category:
10+
- Secure code and manage vulnerabilities
11+
allowTitleToDifferFromFilename: true
12+
---
13+
14+
<!-- Content after this section is automatically generated -->

content/rest/code-scanning/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ versions:
1010
ghec: '*'
1111
ghes: '*'
1212
children:
13+
- /ai-scan
1314
- /alert-dismissal-requests
1415
- /code-scanning
1516
autogenerated: rest

src/cli-docs-auto-maintenance/state/copilot-cli/automation-and-ci.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/cli-docs-auto-maintenance/state/copilot-cli/integrations-and-remote-control.json

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)