You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- simplified and wrapped `gh repo autolink create` and `gh repo autolink` long help usage docs
- simplified success message, brought into alignment with other commands
Use %[1]sgh repo autolink list --web%[1]s to open this page for the current repository.
21
-
22
-
For more information about GitHub autolinks, see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources
23
-
`, "`"),
16
+
Autolinks link issues, pull requests, commit messages, and release descriptions to external third-party services.
17
+
18
+
Autolinks require %[1]sadmin%[1]s role to view or manage.
19
+
20
+
For more information, see <https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources>
Autolinks automatically generate links to external resources when they appear in an issue, pull request, or commit.
43
+
The %[1]skeyPrefix%[1]s argument specifies the prefix that will generate a link when it is appended by certain characters.
44
44
45
-
The %[1]skeyPrefix%[1]s specifies the prefix that will generate a link when it is appended by certain characters.
45
+
The %[1]surlTemplate%[1]s argument specifies the target URL that will be generated when the keyPrefix is found, which
46
+
must contain %[1]s<num>%[1]s variable for the reference number.
46
47
47
-
The %[1]surlTemplate%[1]s specifies the target URL that will be generated when the keyPrefix is found. The %[1]surlTemplate%[1]s must contain %[1]s<num>%[1]s for the reference number. %[1]s<num>%[1]s matches different characters depending on the whether the autolink is specified as numeric or alphanumeric.
48
+
By default, autolinks are alphanumeric with %[1]s--numeric%[1]s flag used to create a numeric autolink.
48
49
49
-
By default, the command will create an alphanumeric autolink. This means that the %[1]s<num>%[1]s in the %[1]surlTemplate%[1]s will match alphanumeric characters %[1]sA-Z%[1]s (case insensitive), %[1]s0-9%[1]s, and %[1]s-%[1]s. To create a numeric autolink, use the %[1]s--numeric%[1]s flag. Numeric autolinks only match against numeric characters. If the template contains multiple instances of %[1]s<num>%[1]s, only the first will be replaced.
50
+
The %[1]s<num>%[1]s variable behavior differs depending on whether the autolink is alphanumeric or numeric:
50
51
51
-
If you are using a shell that applies special meaning to angle brackets, you will need to escape these characters in the %[1]surlTemplate%[1]s or place quotation marks around the whole argument.
52
-
53
-
Only repository administrators can create autolinks.
52
+
- alphanumeric: matches %[1]sA-Z%[1]s (case insensitive), %[1]s0-9%[1]s, and %[1]s-%[1]s
53
+
- numeric: matches %[1]s0-9%[1]s
54
+
55
+
If the template contains multiple instances of %[1]s<num>%[1]s, only the first will be replaced.
54
56
`, "`"),
55
57
Example: heredoc.Doc(`
56
-
# Create an alphanumeric autolink to example.com for the key prefix "TICKET-". This will generate a link to https://example.com/TICKET?query=123abc when "TICKET-123abc" appears.
# Create a numeric autolink to example.com for the key prefix "STORY-". This will generate a link to https://example.com/STORY?id=123 when "STORY-123" appears.
0 commit comments