이 버전의 GitHub Enterprise Server는 2023-09-25. 중요한 보안 문제에 대해서도 패치 릴리스가 이루어지지 않습니다. 성능 향상, 향상된 보안, 새로운 기능을 위해 최신 버전의 GitHub Enterprise로 업그레이드합니다. 업그레이드에 대한 도움말은 GitHub Enterprise 지원에 문의하세요.
리포지토리 자동 링크
REST API를 사용하여 외부 리소스에 자동 링크를 추가합니다.
About repository autolinks
To help streamline your workflow, you can use the REST API to add autolinks to external resources like JIRA issues and Zendesk tickets. For more information, see "Configuring autolinks to reference external resources."
GitHub Apps require repository administration permissions with read or write access to use these endpoints.
List all autolinks of a repository
This returns a list of autolinks configured for the given repository.
Information about autolinks are only available to repository administrators.
"List all autolinks of a repository"에 대한 매개 변수
이름, Type, 설명 |
---|
accept string Setting to |
이름, Type, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
이름, Type, 설명 |
---|
page integer Page number of the results to fetch. 기본값: |
"List all autolinks of a repository"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
"List all autolinks of a repository"에 대한 코드 샘플
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/autolinks
Response
Create an autolink reference for a repository
Users with admin access to the repository can create an autolink.
"Create an autolink reference for a repository"에 대한 매개 변수
이름, Type, 설명 |
---|
accept string Setting to |
이름, Type, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
이름, Type, 설명 |
---|
key_prefix string RequiredThe prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. |
url_template string RequiredThe URL must contain |
is_alphanumeric boolean Whether this autolink reference matches alphanumeric characters. If true, the 기본값: |
"Create an autolink reference for a repository"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
201 | Created |
422 | Validation failed, or the endpoint has been spammed. |
"Create an autolink reference for a repository"에 대한 코드 샘플
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/autolinks \
-d '{"key_prefix":"TICKET-","url_template":"https://example.com/TICKET?query=<num>","is_alphanumeric":true}'
response
Get an autolink reference of a repository
This returns a single autolink reference by ID that was configured for the given repository.
Information about autolinks are only available to repository administrators.
"Get an autolink reference of a repository"에 대한 매개 변수
이름, Type, 설명 |
---|
accept string Setting to |
이름, Type, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
autolink_id integer RequiredThe unique identifier of the autolink. |
"Get an autolink reference of a repository"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
404 | Resource not found |
"Get an autolink reference of a repository"에 대한 코드 샘플
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/autolinks/AUTOLINK_ID
Response
Delete an autolink reference from a repository
This deletes a single autolink reference by ID that was configured for the given repository.
Information about autolinks are only available to repository administrators.
"Delete an autolink reference from a repository"에 대한 매개 변수
이름, Type, 설명 |
---|
accept string Setting to |
이름, Type, 설명 |
---|
owner string RequiredThe account owner of the repository. The name is not case sensitive. |
repo string RequiredThe name of the repository without the |
autolink_id integer RequiredThe unique identifier of the autolink. |
"Delete an autolink reference from a repository"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
204 | No Content |
404 | Resource not found |
"Delete an autolink reference from a repository"에 대한 코드 샘플
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/autolinks/AUTOLINK_ID
Response
Status: 204