Skip to content

Commit 12070ae

Browse files
authored
Merge pull request #36276 from github/repo-sync
Repo sync
2 parents d2d6c55 + 6d8c4c2 commit 12070ae

File tree

43 files changed

+8806
-185
lines changed

Some content is hidden

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

43 files changed

+8806
-185
lines changed
Loading
Loading

content/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,6 @@ You can install additional software on {% data variables.product.prodname_dotcom
184184

185185
{% data variables.product.prodname_dotcom %} hosts Linux and Windows runners on virtual machines in Microsoft Azure with the {% data variables.product.prodname_actions %} runner application installed. The {% data variables.product.prodname_dotcom %}-hosted runner application is a fork of the Azure Pipelines Agent. Inbound ICMP packets are blocked for all Azure virtual machines, so ping or traceroute commands might not work. {% data variables.product.prodname_dotcom %} hosts macOS runners in Azure data centers.
186186

187-
For Linux and Windows x64 runners, {% data variables.product.company_short %} uses `Dadsv5-series` virtual machines. For more information, see [Dasv5 and Dadsv5-series](https://learn.microsoft.com/en-us/azure/virtual-machines/dasv5-dadsv5-series#dadsv5-series) in the Microsoft Azure documentation.
188-
189-
For linux arm64 runners, {% data variables.product.company_short %} uses `Dpdsv6-series` virtual machines. For more information, see [Dpdsv6 series](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/dpdsv6-series?tabs=sizebasic) in the Microsoft Azure documentation.
190-
191-
GPU runners use `NCasT4_v3-series` virtual machines. For more information, see [NCasT4_v3-series](https://learn.microsoft.com/en-us/azure/virtual-machines/nct4-v3-series) in the Microsoft Azure documentation.
192-
193187
## Workflow continuity
194188

195189
{% data reusables.actions.runner-workflow-continuity %}

content/admin/configuring-settings/hardening-security-for-your-enterprise/restricting-access-to-githubcom-using-a-corporate-proxy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ versions:
77
ghec: '*'
88
---
99

10-
>[!NOTE] The header for restricting access to {% data variables.product.prodname_dotcom_the_website %} is currently in {% data variables.release-phases.public_preview %} and subject to change.
10+
>[!NOTE] The header for restricting access to {% data variables.product.prodname_dotcom_the_website %} is currently in {% data variables.release-phases.public_preview %} and subject to change. Although preview releases are not typically supported by {% data variables.product.company_short %} Support (see [AUTOTITLE](/get-started/using-github/exploring-early-access-releases-with-feature-preview#githubs-release-cycle)), this feature is supported by {% data variables.product.company_short %} Support while in {% data variables.release-phases.public_preview %}.
1111
1212
If you use {% data variables.product.prodname_emus %}, you can block users on your network from authenticating to {% data variables.product.prodname_dotcom_the_website %} with accounts that are not members of your enterprise. This helps reduce the risk of your company's data being exposed to the public.
1313

content/admin/managing-iam/configuring-authentication-for-enterprise-managed-users/disabling-authentication-and-provisioning-for-enterprise-managed-users.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
title: Disabling authentication and provisioning for Enterprise Managed Users
3-
shortTitle: Disable authentication and provisioning
4-
intro: 'You can disable SAML or OIDC single sign-on (SSO) and SCIM provisioning for {% data variables.product.prodname_emus %} by using a recovery code to sign in as the setup user.'
2+
title: Disabling authentication for Enterprise Managed Users
3+
allowTitleToDifferFromFilename: true
4+
shortTitle: Disable authentication
5+
intro: 'You can disable SAML or OIDC single sign-on (SSO) authentication for {% data variables.product.prodname_emus %} by using a recovery code to sign in as the setup user.'
56
versions:
67
ghec: '*'
78
type: overview
@@ -10,7 +11,7 @@ topics:
1011
- Authentication
1112
- Enterprise
1213
- SSO
13-
permissions: 'The setup user can disable SAML or OIDC SSO and SCIM provisioning for {% data variables.product.prodname_emus %}.'
14+
permissions: 'The setup user can disable SAML or OIDC authentication for {% data variables.product.prodname_emus %}.'
1415
redirect_from:
1516
- /admin/identity-and-access-management/using-enterprise-managed-users-for-iam/disabling-authentication-for-enterprise-managed-users
1617
- /admin/identity-and-access-management/configuring-authentication-for-enterprise-managed-users/disabling-authentication-for-enterprise-managed-users
@@ -19,7 +20,7 @@ redirect_from:
1920

2021
## About disabled authentication for {% data variables.product.prodname_emus %}
2122

22-
After you disable SAML or OIDC SSO for your enterprise, the following effects apply:
23+
After you disable SAML or OIDC authentication for your enterprise, the following effects apply:
2324

2425
* All external identities for the enterprise, and associated email addresses for {% data variables.enterprise.prodname_managed_users %}, will be removed. For more information, see [AUTOTITLE](/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise).
2526
* All {% data variables.enterprise.prodname_managed_users %} will be suspended. The suspended accounts will not be renamed. For more information, see [AUTOTITLE](/admin/user-management/managing-users-in-your-enterprise/viewing-people-in-your-enterprise#viewing-suspended-members).

content/admin/managing-iam/understanding-iam-for-enterprises/getting-started-with-enterprise-managed-users.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,23 @@ After we create your enterprise, you will receive an email inviting you to choos
3737
Using an **incognito or private browsing window**:
3838

3939
1. Set the user's password.
40-
1. Enable two-factor authentication (2FA), and save the enterprise recovery codes. See [AUTOTITLE](/admin/managing-iam/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes#downloading-codes-for-an-enterprise-with-enterprise-managed-users).
40+
1. Enable two-factor authentication (2FA), and save the recovery codes. See [AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication).
4141

4242
> [!WARNING]
43-
> All subsequent login attempts for the setup user account will require a successful 2FA challenge response or the use of an enterprise recovery code to complete authentication. To avoid being locked out of your account, save your enterprise recovery codes.
43+
> All subsequent login attempts for the setup user account will require a successful 2FA challenge response or the use of an enterprise recovery code to complete authentication. To avoid being locked out of your account, after enabling single sign-on, save your enterprise recovery codes. See [AUTOTITLE](/admin/managing-iam/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes#downloading-codes-for-an-enterprise-with-enterprise-managed-users).
4444
4545
{% data reusables.enterprise-accounts.emu-password-reset-session %}
4646

4747
{% data reusables.enterprise-accounts.emu-recommend-password-manager %}
4848

49+
> [!NOTE]
50+
> Once single sign-on has been configured on the enterprise, the setup user is only intended to be used going forwards for:
51+
>
52+
> * SCIM provisioning via its {% data variables.product.pat_generic %}.
53+
> * To regain access to your enterprise in the event of an issue with your identity provider by utilizing the enterprise's SAML recovery codes.
54+
>
55+
> For other enterprise administration tasks, you should use a provisioned managed user account with the enterprise owner role.
56+
4957
## Create a {% data variables.product.pat_generic %}
5058

5159
{% data reusables.enterprise-accounts.emu-create-a-pat %}

content/copilot/copilot-chat-cookbook/refactoring-code/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ children:
1717
- /handling-cross-cutting-concerns
1818
- /simplifying-complex-inheritance-hierarchies
1919
- /fixing-database-deadlocks-or-data-integrity-issues
20+
- /translating-code-to-a-different-programming-language
2021
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
title: Translating code to a different programming language
3+
shortTitle: Translating code
4+
intro: '{% data variables.product.prodname_copilot_chat_short %} can help you rewrite code to perform the same operations but in a different programming language.'
5+
versions:
6+
feature: copilot
7+
category:
8+
- 'Refactoring code'
9+
complexity:
10+
- Simple
11+
octicon: rocket
12+
topics:
13+
- Copilot
14+
---
15+
16+
There are many reasons why you might want to move code from one programming language to another. Each programming language has its own strengths and weaknesses, and you might want to take advantage of features that are available in another language. For example, you might want to move code to a language that has better performance, or which uses strong typing to help prevent bugs.
17+
18+
For ease of maintaining code, you might want to move code to a language that is more widely used in your organization. For example, if few people in your organization know an older language such as Perl, you might want to move any Perl code that's still in use to a more commonly used language such as Python or JavaScript.
19+
20+
{% data variables.product.prodname_copilot_short %} can help you translate code from one language to another. Translating a standalone file, such as a script, is straightforward. This process is described in this article.
21+
22+
Translating a project containing multiple files is a more complex process, and is described in [AUTOTITLE](/copilot/using-github-copilot/guides-on-using-github-copilot/using-copilot-to-migrate-a-project).
23+
24+
## Example scenario
25+
26+
The following Perl script prompts the user to enter the path to a text file. It checks what the user enters and if a text file is found at that path, it outputs a word count and character count for the contents of the file.
27+
28+
```perl copy
29+
#!/usr/bin/perl
30+
use strict;
31+
use warnings;
32+
use File::Spec;
33+
use File::Basename;
34+
35+
print "Please enter the path to a local text file: ";
36+
chomp(my $file_path = <STDIN>);
37+
38+
if ($file_path =~ /[`|;&<>(){}\[\]]/ || !File::Spec->file_name_is_absolute($file_path) && dirname($file_path) ne '.') {
39+
die "Invalid file path. Please provide a valid path.\n";
40+
}
41+
if (!-e $file_path) {
42+
die "File not found. Please provide an existing file path.\n";
43+
}
44+
45+
open(my $fh, '<', $file_path) or die "Could not open file '$file_path': $!\n";
46+
47+
my $is_binary = 0;
48+
while (read($fh, my $buffer, 1024)) {
49+
if ($buffer =~ /[^\x09\x0A\x0D\x20-\x7E]/) {
50+
$is_binary = 1;
51+
last;
52+
}
53+
}
54+
close($fh);
55+
56+
if ($is_binary) {
57+
die "The file '$file_path' is a binary file. Please provide a text file.\n";
58+
}
59+
60+
open($fh, '<', $file_path) or die "Could not open file '$file_path': $!\n";
61+
my $content = do { local $/; <$fh> };
62+
close($fh);
63+
64+
my $word_count = scalar(split /\s+/, $content);
65+
my $char_count = length($content);
66+
67+
print "The file '$file_path' contains $word_count words and $char_count characters.\n";
68+
```
69+
70+
## Example prompt
71+
72+
`Tell me how I can convert this Perl script to Typescript. The functionality and output of the new script should be exactly the same as the existing one. Also tell me how to run the new file using Node.`
73+
74+
## Example response
75+
76+
{% data variables.product.prodname_copilot_short %} generates the following Typescript code.
77+
78+
> [!NOTE] {% data variables.product.prodname_copilot_chat_short %} responses are non-deterministic, so you may get a different response from the one shown here.
79+
80+
```typescript copy
81+
import * as fs from 'fs';
82+
import * as path from 'path';
83+
import * as readline from 'readline';
84+
85+
const rl = readline.createInterface({
86+
input: process.stdin,
87+
output: process.stdout
88+
});
89+
90+
rl.question('Please enter the path to a local text file: ', (filePath) => {
91+
rl.close();
92+
93+
if (/[`|;&<>(){}\[\]]/.test(filePath) || (!path.isAbsolute(filePath) && path.dirname(filePath) !== '.')) {
94+
console.error('Invalid file path. Please provide a valid path.');
95+
process.exit(1);
96+
}
97+
98+
if (!fs.existsSync(filePath)) {
99+
console.error('File not found. Please provide an existing file path.');
100+
process.exit(1);
101+
}
102+
103+
const fileBuffer = fs.readFileSync(filePath);
104+
const isBinary = fileBuffer.some(byte => byte < 9 || (byte > 13 && byte < 32) || byte > 126);
105+
106+
if (isBinary) {
107+
console.error(`The file '${filePath}' is a binary file. Please provide a text file.`);
108+
process.exit(1);
109+
}
110+
111+
const content = fileBuffer.toString('utf-8');
112+
const wordCount = content.split(/\s+/).length;
113+
const charCount = content.length;
114+
115+
console.log(`The file '${filePath}' contains ${wordCount} words and ${charCount} characters.`);
116+
});
117+
```
118+
119+
Save this file as `wordcount.ts`.
120+
121+
{% data variables.product.prodname_copilot_short %} goes on to explain how to run the new file using Node.
122+
123+
1. **Install Node.js:** If you don't have it already, download and install Node.js from the official website: https://nodejs.org/.
124+
1. **Install TypeScript:**
125+
126+
```shell
127+
npm install -g typescript
128+
```
129+
130+
1. **Compile the TypeScript code:**
131+
132+
```shell
133+
tsc wordcount.ts
134+
```
135+
136+
This will create a `wordcount.js` file in the same directory.
137+
138+
1. **Run the JavaScript file with Node.js:**
139+
140+
```shell
141+
node wordcount.js
142+
```
143+
144+
## Further reading
145+
146+
{% data reusables.copilot.example-prompts.further-reading-items %}

content/copilot/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ featuredLinks:
1515
- /copilot/quickstart
1616
popular:
1717
- /copilot/using-github-copilot/best-practices-for-using-github-copilot
18-
- /copilot/using-github-copilot/prompt-engineering-for-github-copilot
18+
- /copilot/using-github-copilot/copilot-chat/prompt-engineering-for-copilot-chat
1919
- /copilot/copilot-chat-cookbook
2020
- /copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot
21-
- /copilot/using-github-copilot/asking-github-copilot-questions-in-your-ide
21+
- /copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-your-ide
2222
- /copilot/using-github-copilot/using-github-copilot-in-the-command-line
2323
layout: product-landing
2424
versions:

content/copilot/using-github-copilot/asking-github-copilot-questions-in-github-mobile.md renamed to content/copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-github-mobile.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ redirect_from:
1111
- /copilot/github-copilot-chat/using-github-copilot-chat-in-github-mobile
1212
- /copilot/github-copilot-chat/copilot-chat-in-github-mobile/using-github-copilot-chat-in-github-mobile
1313
- /copilot/github-copilot-chat/copilot-chat-in-github-mobile
14+
- /copilot/using-github-copilot/asking-github-copilot-questions-in-github-mobile
1415
---
1516

1617
## Overview

0 commit comments

Comments
 (0)