1
0
mirror of synced 2026-01-01 09:04:46 -05:00

Merge pull request #30654 from github/saritai/autolink-format-setting

Update to add back numeric formatting for autolinks
This commit is contained in:
Sarita Iyer
2022-09-13 14:04:06 -04:00
committed by GitHub
4 changed files with 14 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View File

@@ -21,11 +21,11 @@ shortTitle: Configure autolinks
Anyone with admin permissions to a repository can configure autolink references to link issues, pull requests, commit messages, and release descriptions to external third-party services.
{% ifversion autolink-reference-alphanumeric %}
Autolink references can now accept alphanumeric characters. When originally introduced, custom autolinks were limited to external resources that used numeric identifiers. Custom autolinks now work with alphanumeric identifiers. Legacy autolink references that recognize only numeric identifiers are deprecated and displayed with a "legacy" label.
Autolink references can now accept alphanumeric characters. When originally introduced, custom autolinks were limited to external resources that used numeric identifiers. Custom autolinks now work with alphanumeric and numeric identifiers.
You define custom autolinks by specifying a reference prefix and a target URL.
- Reference prefixes cannot have overlapping names. For example, a repository cannot have two custom autolinks with prefixes such as `TICKET` and `TICK`, since both prefixes would match the string `TICKET123a`.
- Target URLs include a `<num>` variable which supports the following characters: `a-z` (case-insensitive), `0-9`, and `-`.
- Target URLs include a `<num>` variable which represents the reference identifier of the linked resource.
{% endif %}
## Configuring autolinks to reference external resources
@@ -38,13 +38,17 @@ This procedure demonstrates how to configure autolinks to reference external res
1. In the "Integrations" section of the sidebar, click **{% octicon "cross-reference" aria-label="The cross-reference icon" %} Autolink references**.
{% else %}
1. In the left sidebar, click **Autolink references**.
![Autolink references tab in the left sidebar](/assets/images/help/repository/autolink-references-tab.png)
![Autolink references tab in the left sidebar.](/assets/images/help/repository/autolink-references-tab.png)
{% endif %}
1. Click **Add autolink reference**.
![Button to fill out autolink reference information](/assets/images/help/repository/add-autolink-reference-details.png)
5. Under "Reference prefix", type a short, meaningful prefix you want collaborators to use to generate autolinks for the external resource.
{% ifversion autolink-reference-alphanumeric %}![Field to type abbreviation for external system](/assets/images/help/repository/add-reference-prefix-field-alphanumeric.png){% else %}![Field to type abbreviation for external system](/assets/images/help/repository/add-reference-prefix-field.png){% endif %}
6. Under "Target URL", type the link to the external system you want to link to. Make sure to keep `<num>` as a variable for the reference number.
{% ifversion autolink-reference-alphanumeric %}![Field to type URL to external system](/assets/images/help/repository/add-target-url-field-alphanumeric.png){% else %}![Field to type URL to external system](/assets/images/help/repository/add-target-url-field.png){% endif %}
7. Click **Add autolink reference**.
{% ifversion autolink-reference-alphanumeric %}{% else %}![Button to add autolink reference](/assets/images/help/repository/add-autolink-reference.png){% endif %}
![Button to fill out autolink reference information.](/assets/images/help/repository/add-autolink-reference-details.png)
{% ifversion autolink-reference-alphanumeric %}
1. Select the format of the reference identifier used in the external resource, either alphanumeric or numeric.
![Autolink format setting, alphanumeric or numeric.](/assets/images/help/repository/autolink-format-setting.png)
{% endif %}
1. Under "Reference prefix", type a short, meaningful prefix you want collaborators to use to generate autolinks for the external resource.
{% ifversion autolink-reference-alphanumeric %}![Field to type abbreviation for external system.](/assets/images/help/repository/add-reference-prefix-field-alphanumeric.png){% else %}![Field to type abbreviation for external system.](/assets/images/help/repository/add-reference-prefix-field.png){% endif %}
1. Under "Target URL", type the link to the external system you want to link to. Use the `<num>` variable as a placeholder for the reference identifier.
{% ifversion autolink-reference-alphanumeric %}![Field to type URL to external system.](/assets/images/help/repository/add-target-url-field-alphanumeric.png){% else %}![Field to type URL to external system.](/assets/images/help/repository/add-target-url-field.png){% endif %}
1. Click **Add autolink reference**.
{% ifversion autolink-reference-alphanumeric %}{% else %}![Button to add autolink reference.](/assets/images/help/repository/add-autolink-reference.png){% endif %}