Skip to content

Commit

Permalink
Merge pull request #36276 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Feb 13, 2025
2 parents d2d6c55 + 6d8c4c2 commit 12070ae
Show file tree
Hide file tree
Showing 43 changed files with 8,806 additions and 185 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ You can install additional software on {% data variables.product.prodname_dotcom

{% 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.

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.

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.

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.

## Workflow continuity

{% data reusables.actions.runner-workflow-continuity %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ versions:
ghec: '*'
---

>[!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.
>[!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 %}.
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.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Disabling authentication and provisioning for Enterprise Managed Users
shortTitle: Disable authentication and provisioning
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.'
title: Disabling authentication for Enterprise Managed Users
allowTitleToDifferFromFilename: true
shortTitle: Disable authentication
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.'
versions:
ghec: '*'
type: overview
Expand All @@ -10,7 +11,7 @@ topics:
- Authentication
- Enterprise
- SSO
permissions: 'The setup user can disable SAML or OIDC SSO and SCIM provisioning for {% data variables.product.prodname_emus %}.'
permissions: 'The setup user can disable SAML or OIDC authentication for {% data variables.product.prodname_emus %}.'
redirect_from:
- /admin/identity-and-access-management/using-enterprise-managed-users-for-iam/disabling-authentication-for-enterprise-managed-users
- /admin/identity-and-access-management/configuring-authentication-for-enterprise-managed-users/disabling-authentication-for-enterprise-managed-users
Expand All @@ -19,7 +20,7 @@ redirect_from:

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

After you disable SAML or OIDC SSO for your enterprise, the following effects apply:
After you disable SAML or OIDC authentication for your enterprise, the following effects apply:

* 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).
* 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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,23 @@ After we create your enterprise, you will receive an email inviting you to choos
Using an **incognito or private browsing window**:

1. Set the user's password.
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).
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).

> [!WARNING]
> 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.
> 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).
{% data reusables.enterprise-accounts.emu-password-reset-session %}

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

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

{% data reusables.enterprise-accounts.emu-create-a-pat %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ children:
- /handling-cross-cutting-concerns
- /simplifying-complex-inheritance-hierarchies
- /fixing-database-deadlocks-or-data-integrity-issues
- /translating-code-to-a-different-programming-language
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
---
title: Translating code to a different programming language
shortTitle: Translating code
intro: '{% data variables.product.prodname_copilot_chat_short %} can help you rewrite code to perform the same operations but in a different programming language.'
versions:
feature: copilot
category:
- 'Refactoring code'
complexity:
- Simple
octicon: rocket
topics:
- Copilot
---

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.

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.

{% 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.

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).

## Example scenario

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.

```perl copy
#!/usr/bin/perl
use strict;
use warnings;
use File::Spec;
use File::Basename;

print "Please enter the path to a local text file: ";
chomp(my $file_path = <STDIN>);

if ($file_path =~ /[`|;&<>(){}\[\]]/ || !File::Spec->file_name_is_absolute($file_path) && dirname($file_path) ne '.') {
die "Invalid file path. Please provide a valid path.\n";
}
if (!-e $file_path) {
die "File not found. Please provide an existing file path.\n";
}

open(my $fh, '<', $file_path) or die "Could not open file '$file_path': $!\n";

my $is_binary = 0;
while (read($fh, my $buffer, 1024)) {
if ($buffer =~ /[^\x09\x0A\x0D\x20-\x7E]/) {
$is_binary = 1;
last;
}
}
close($fh);

if ($is_binary) {
die "The file '$file_path' is a binary file. Please provide a text file.\n";
}

open($fh, '<', $file_path) or die "Could not open file '$file_path': $!\n";
my $content = do { local $/; <$fh> };
close($fh);

my $word_count = scalar(split /\s+/, $content);
my $char_count = length($content);

print "The file '$file_path' contains $word_count words and $char_count characters.\n";
```

## Example prompt

`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.`

## Example response

{% data variables.product.prodname_copilot_short %} generates the following Typescript code.

> [!NOTE] {% data variables.product.prodname_copilot_chat_short %} responses are non-deterministic, so you may get a different response from the one shown here.
```typescript copy
import * as fs from 'fs';
import * as path from 'path';
import * as readline from 'readline';

const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});

rl.question('Please enter the path to a local text file: ', (filePath) => {
rl.close();

if (/[`|;&<>(){}\[\]]/.test(filePath) || (!path.isAbsolute(filePath) && path.dirname(filePath) !== '.')) {
console.error('Invalid file path. Please provide a valid path.');
process.exit(1);
}

if (!fs.existsSync(filePath)) {
console.error('File not found. Please provide an existing file path.');
process.exit(1);
}

const fileBuffer = fs.readFileSync(filePath);
const isBinary = fileBuffer.some(byte => byte < 9 || (byte > 13 && byte < 32) || byte > 126);

if (isBinary) {
console.error(`The file '${filePath}' is a binary file. Please provide a text file.`);
process.exit(1);
}

const content = fileBuffer.toString('utf-8');
const wordCount = content.split(/\s+/).length;
const charCount = content.length;

console.log(`The file '${filePath}' contains ${wordCount} words and ${charCount} characters.`);
});
```

Save this file as `wordcount.ts`.

{% data variables.product.prodname_copilot_short %} goes on to explain how to run the new file using Node.

1. **Install Node.js:** If you don't have it already, download and install Node.js from the official website: https://nodejs.org/.
1. **Install TypeScript:**

```shell
npm install -g typescript
```

1. **Compile the TypeScript code:**

```shell
tsc wordcount.ts
```

This will create a `wordcount.js` file in the same directory.

1. **Run the JavaScript file with Node.js:**

```shell
node wordcount.js
```

## Further reading

{% data reusables.copilot.example-prompts.further-reading-items %}
4 changes: 2 additions & 2 deletions content/copilot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ featuredLinks:
- /copilot/quickstart
popular:
- /copilot/using-github-copilot/best-practices-for-using-github-copilot
- /copilot/using-github-copilot/prompt-engineering-for-github-copilot
- /copilot/using-github-copilot/copilot-chat/prompt-engineering-for-copilot-chat
- /copilot/copilot-chat-cookbook
- /copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot
- /copilot/using-github-copilot/asking-github-copilot-questions-in-your-ide
- /copilot/using-github-copilot/copilot-chat/asking-github-copilot-questions-in-your-ide
- /copilot/using-github-copilot/using-github-copilot-in-the-command-line
layout: product-landing
versions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ redirect_from:
- /copilot/github-copilot-chat/using-github-copilot-chat-in-github-mobile
- /copilot/github-copilot-chat/copilot-chat-in-github-mobile/using-github-copilot-chat-in-github-mobile
- /copilot/github-copilot-chat/copilot-chat-in-github-mobile
- /copilot/using-github-copilot/asking-github-copilot-questions-in-github-mobile
---

## Overview
Expand Down
Loading

0 comments on commit 12070ae

Please sign in to comment.