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
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ shortTitle: Merge multiple accounts
1. [Transfer any repositories](/repositories/creating-and-managing-repositories/transferring-a-repository) from the account you want to delete to the account you want to keep. Issues, pull requests, and wikis are transferred as well. Verify the repositories exist on the account you want to keep.
1. [Update the remote URLs](/get-started/git-basics/managing-remote-repositories) in any local clones of the repositories that were moved.
1. [Delete the account](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/deleting-your-personal-account) you no longer want to use.
1. To attribute past commits to the new account, add the email address you used to author the commits to the account you're keeping. For more information, see [AUTOTITLE](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account)
1. To attribute past commits to the new account, add the email address you used to author the commits to the account you're keeping.
> [!NOTE]
> There are additional requirements for commits to count as contributions that you will need to ensure are met. See [AUTOTITLE](/account-and-profile/reference/why-are-my-contributions-not-showing-up-on-my-profile#contribution-criteria-for-commits).

## Further reading

* [AUTOTITLE](/get-started/learning-about-github/types-of-github-accounts)
* [AUTOTITLE](/account-and-profile/reference/best-practices-for-leaving-your-company)
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ The maximum file size is:

## Supported file types

### Image and media files

The following image and media file types are supported in all contexts.

### Image and media files

* PNG (`.png`)
* GIF (`.gif`)
* JPEG (`.jpg`, `.jpeg`)
Expand All @@ -72,62 +72,73 @@ The following image and media file types are supported in all contexts.
> [!NOTE]
> Video codec compatibility is browser specific, and it's possible that a video you upload to one browser is not viewable on another browser. At the moment we recommend using H.264 for greatest compatibility.

### Additional file types
## Additional file types

The following file types are supported for uploads in issue comments, pull request comments, and discussion comments within repositories. This list of file types is also supported in organization discussions.

### Supported file types for uploads

#### Documents
### Documents

* PDFs (`.pdf`)
* Microsoft Office documents (`.docx`, `.pptx`, `.xlsx`, `.xls`, `.xlsm`)
* Microsoft Office documents (`.docx`, `.pptx`, `.xlsx`, `.xls`{% ifversion fpt or ghec or ghes > 3.18 %}` ,.xlsm`{% endif %})
{%- ifversion fpt or ghec or ghes > 3.18 %}
* OpenDocument formats (`.odt`, `.fodt`, `.ods`, `.fods`, `.odp`, `.fodp`, `.odg`, `.fodg`, `.odf`)
* Rich text and word processing files (`.rtf`, `.doc`)
{%- endif %}

#### Text and data files
### Text and data files

* Plain text and markup (`.txt`, `.md`, `.copilotmd`)
* Data and tabular files (`.csv`, `.tsv`, `.log`, `.json`, `.jsonc`)
* Plain text and markup (`.txt`{% ifversion fpt or ghec or ghes > 3.18 %}, `.md`, `.copilotmd`{% endif %})
* Data and tabular files (`.csv`,{% ifversion fpt or ghec or ghes > 3.18 %} `.tsv`,{% endif %} `.log`, `.json`, `.jsonc`)

#### Development and code files
### Development and code files

{%- ifversion fpt or ghec or ghes > 3.18 %}
* C files (`.c`)
* C# files (`.cs`)
* C++ files (`.cpp`)
* CSS files (`.css`)
* Diagrams (`.drawio`)
{%- endif %}
* Dump files (`.dmp`)
{%- ifversion fpt or ghec or ghes > 3.18 %}
* HTML files (`.html`, `.htm`)
* Java files (`.java`)
* JavaScript files (`.js`)
* Jupyter notebooks (`.ipynb`)
{%- endif %}
* Patch files (`.patch`)
{%- ifversion fpt or ghec or ghes > 3.18 %}
* PHP files (`.php`)
{%- endif %}
* Profiling files (`.cpuprofile`)
{%- ifversion fpt or ghec or ghes > 3.18 %}
* Program database files (`.pdb`)
* Python files (`.py`)
* Shell scripts (`.sh`)
* SQL files (`.sql`)
* TypeScript files (`.ts`, `.tsx`)
* XML files (`.xml`)
* YAML files (`.yaml`, `.yml`)
{%- endif %}

> [!NOTE]
> If you use Linux and try to upload a `.patch` file, you will receive an error message. This is a known issue.

#### Archive and compressed files
### Archive and compressed files

* Archives and packages (`.zip`, `.gz`, `.tgz`)

#### Communication and logs
{% ifversion fpt or ghec or ghes > 3.18 %}

### Communication and logs

* Text and email files (`.debug`, `.msg`, `.eml`)

#### Images
### Images

* Bitmap and TIFF images (`.bmp`, `.tif`, `.tiff`)

#### Audio
### Audio

* Audio files (`.mp3`, `.wav`)
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,7 @@ You can also view active ruselets:

{% ifversion repo-rules-management %}

## Using ruleset history

{% data reusables.repositories.ruleset-beta-note %}

{% data reusables.repositories.ruleset-history-conceptual %}

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.repositories.repo-rulesets-settings %}
{% data reusables.repositories.ruleset-history %}

### Importing a ruleset
## Importing a ruleset

{% data reusables.repositories.import-a-ruleset-conceptual %}

Expand All @@ -99,6 +88,17 @@ You can also view active ruselets:

{% ifversion repo-rules-enterprise %}

## Using ruleset history

{% data reusables.repositories.ruleset-beta-note %}

{% data reusables.repositories.ruleset-history-conceptual %}

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.repositories.repo-rulesets-settings %}
{% data reusables.repositories.ruleset-history %}

## Viewing insights for rulesets

You can view insights for rulesets to see how rulesets are affecting a repository. {% data reusables.repositories.about-ruleset-insights %}
Expand Down
2 changes: 1 addition & 1 deletion data/reusables/user-settings/copilot-settings.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1. In the upper-right corner of any page on {% data variables.product.prodname_dotcom %}, click your profile picture, then click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} Your Copilot**.
1. In the upper-right corner of any page on {% data variables.product.prodname_dotcom %}, click your profile picture, then click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} Copilot settings**.
2 changes: 1 addition & 1 deletion data/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ search:
invalid_query: Sorry, I'm unable to answer that question. Please try asking a different question.
response:
copy_code: Copy code to clipboard
copy_code_lang: Copy {language} code to clipboard, block {block}
copy_code_lang: Copy {language} code to clipboard
copied_code: Copied!
failure:
general_title: There was an error loading search results.
Expand Down
2 changes: 1 addition & 1 deletion src/fixtures/fixtures/data/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ search:
invalid_query: Sorry, I'm unable to answer that question. Please try asking a different question.
response:
copy_code: Copy code to clipboard
copy_code_lang: Copy {language} code to clipboard, block {block}
copy_code_lang: Copy {language} code to clipboard
copied_code: Copied!
failure:
general_title: There was an error loading search results.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,6 @@ import useCopyClipboard from '@/rest/components/useClipboard'
import { EventType } from '@/events/types'
import { sendEvent } from '@/events/components/events'

// Create a unique identifier by sampling characters distributed across content
function getBlockId(text: string, targetLength: number = 8) {
const alphanumeric = text.replace(/[^a-zA-Z0-9]+/g, '').toLowerCase()
if (!alphanumeric || alphanumeric.length <= targetLength) {
return Math.random().toString(36).substring(2, 10)
}
const step = alphanumeric.length / targetLength
let result = ''
for (let i = 0; i < targetLength; i++) {
const index = Math.floor(i * step)
result += alphanumeric[index]
}
return result
}

export type MarkdownContentPropsT = {
children: string
className?: string
Expand All @@ -44,7 +29,7 @@ export const UnrenderedMarkdownContent = ({
className,
openLinksInNewTab = true,
includeQueryParams = true,
codeBlocksCopyable = true,
codeBlocksCopyable = false,
eventGroupKey = '',
eventGroupId = '',
...restProps
Expand Down Expand Up @@ -80,9 +65,10 @@ export const UnrenderedMarkdownContent = ({
if (isCopied) {
return t('search.ai.response.copied_code')
}
return t('search.ai.response.copy_code_lang')
.replace('{language}', language ? `${language} ` : '')
.replace('{block}', getBlockId(text))
return t('search.ai.response.copy_code_lang').replace(
'{language}',
language ? `${language} ` : '',
)
}

return (
Expand Down
Loading