diff --git a/.github/workflows/changelog-agent.yml b/.github/workflows/changelog-agent.yml index e3894303e0f3..71e73de5c3ae 100644 --- a/.github/workflows/changelog-agent.yml +++ b/.github/workflows/changelog-agent.yml @@ -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 }} diff --git a/.github/workflows/check-for-spammy-prs.yml b/.github/workflows/check-for-spammy-prs.yml index 94f411e917dd..20c60d2bd0e9 100644 --- a/.github/workflows/check-for-spammy-prs.yml +++ b/.github/workflows/check-for-spammy-prs.yml @@ -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 || '') @@ -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.', + ) + } } diff --git a/.github/workflows/sync-graphql.yml b/.github/workflows/sync-graphql.yml index 57c77018ade1..e94136afd1fb 100644 --- a/.github/workflows/sync-graphql.yml +++ b/.github/workflows/sync-graphql.yml @@ -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. diff --git a/content/copilot/get-started/enterprise-ai-governance.md b/content/copilot/get-started/enterprise-ai-governance.md index 831c60673078..0436c2cde676 100644 --- a/content/copilot/get-started/enterprise-ai-governance.md +++ b/content/copilot/get-started/enterprise-ai-governance.md @@ -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.' diff --git a/content/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/customize-the-agent-environment.md b/content/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/customize-the-agent-environment.md index 8ee0ce1cf4e6..d21e2c4a470a 100644 --- a/content/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/customize-the-agent-environment.md +++ b/content/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/customize-the-agent-environment.md @@ -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" diff --git a/content/rest/code-scanning/ai-scan.md b/content/rest/code-scanning/ai-scan.md new file mode 100644 index 000000000000..09b5ca9732ba --- /dev/null +++ b/content/rest/code-scanning/ai-scan.md @@ -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 +--- + + diff --git a/content/rest/code-scanning/index.md b/content/rest/code-scanning/index.md index e80ddeefbd22..f8c98f4522af 100644 --- a/content/rest/code-scanning/index.md +++ b/content/rest/code-scanning/index.md @@ -10,6 +10,7 @@ versions: ghec: '*' ghes: '*' children: + - /ai-scan - /alert-dismissal-requests - /code-scanning autogenerated: rest diff --git a/src/cli-docs-auto-maintenance/state/copilot-cli/automation-and-ci.json b/src/cli-docs-auto-maintenance/state/copilot-cli/automation-and-ci.json deleted file mode 100644 index 06b3c4850c81..000000000000 --- a/src/cli-docs-auto-maintenance/state/copilot-cli/automation-and-ci.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Automation and CI", - "sha": "7b8276b2bcaafc444a3dcf482a033352ebb3faa1", - "articles": [ - "content/copilot/concepts/agents/copilot-cli/copilot-cli-in-github-actions.md", - "content/copilot/how-tos/copilot-cli/automate-copilot-cli/automate-with-actions.md", - "content/copilot/how-tos/copilot-cli/automate-copilot-cli/index.md", - "content/copilot/how-tos/copilot-cli/automate-copilot-cli/quickstart.md", - "content/copilot/how-tos/copilot-cli/automate-copilot-cli/run-cli-programmatically.md", - "content/copilot/how-tos/copilot-cli/automate-copilot-cli/schedule-prompts.md", - "content/copilot/how-tos/copilot-cli/use-copilot-cli-in-actions.md" - ] -} diff --git a/src/cli-docs-auto-maintenance/state/copilot-cli/integrations-and-remote-control.json b/src/cli-docs-auto-maintenance/state/copilot-cli/integrations-and-remote-control.json deleted file mode 100644 index 4eceb5f493f7..000000000000 --- a/src/cli-docs-auto-maintenance/state/copilot-cli/integrations-and-remote-control.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "Integrations and remote control", - "sha": "7b8276b2bcaafc444a3dcf482a033352ebb3faa1", - "articles": [ - "content/copilot/concepts/agents/copilot-cli/about-remote-control.md", - "content/copilot/concepts/agents/copilot-cli/chronicle.md", - "content/copilot/concepts/agents/copilot-cli/lsp-servers.md", - "content/copilot/how-tos/copilot-cli/set-up-copilot-cli/add-lsp-servers.md", - "content/copilot/how-tos/copilot-cli/use-copilot-cli/browse-issues-prs-gists.md", - "content/copilot/how-tos/copilot-cli/use-copilot-cli/chronicle.md", - "content/copilot/how-tos/copilot-cli/use-copilot-cli/connecting-vs-code.md", - "content/copilot/how-tos/copilot-cli/use-copilot-cli/delegate-tasks-to-cca.md", - "content/copilot/how-tos/copilot-cli/use-copilot-cli/manage-pull-requests.md", - "content/copilot/how-tos/copilot-cli/use-copilot-cli/steer-remotely.md", - "content/copilot/how-tos/copilot-cli/use-copilot-cli/voice-input.md" - ], - "proposed": [ - { - "article": "content/copilot/how-tos/copilot-cli/use-copilot-cli/browse-issues-prs-gists.md", - "text": "* Press / (on the **Issues** and **Pull requests** tabs) to filter the list with your own search terms. Type your terms, press Enter to run the search, and Esc to cancel or clear it." - }, - { - "article": "content/copilot/how-tos/copilot-cli/use-copilot-cli/browse-issues-prs-gists.md", - "text": "To run your own search, press /. An inline search box opens where you can type your search terms, then press Enter to run the search." - }, - { - "article": "content/copilot/how-tos/copilot-cli/use-copilot-cli/browse-issues-prs-gists.md", - "text": "Your search terms are added to the qualifiers the tab already applies, so results are always limited to open items in the current repository—and, unless you have pressed a, to items that involve you. Enter plain search terms rath" - }, - { - "article": "content/copilot/how-tos/copilot-cli/use-copilot-cli/manage-pull-requests.md", - "text": "
/pr automerge/pr auto, then merge the pull request once it is green. Find out more