Dependabot 리포지토리 액세스에 대한 REST API 엔드포인트
REST API를 사용하여 조직 내에서 Dependabot가 액세스할 수 있는 리포지토리를 관리합니다.
Dependabot 리포지토리 액세스
Dependabot이 이미 액세스할 수 있는 리포지토리를 나열하고 Dependabot에 대한 기본 리포지토리 액세스 수준을 설정할 수 있습니다.
Lists repositories that organization admins have allowed Dependabot to access when updating dependencies.
Note
This operation supports both server-to-server and user-to-server access. Unauthorized users will not see the existence of this endpoint.
"Lists repositories that organization admins have allowed Dependabot to access when updating dependencies."에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "Administration" organization permissions (read)
"Lists repositories that organization admins have allowed Dependabot to access when updating dependencies."에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
속성, 형식, 설명 |
---|
page integer The page number of results to fetch. 기본값: |
per_page integer Number of results per page. 기본값: |
"Lists repositories that organization admins have allowed Dependabot to access when updating dependencies."에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
200 | OK |
403 | Forbidden |
404 | Resource not found |
"Lists repositories that organization admins have allowed Dependabot to access when updating dependencies."에 대한 코드 샘플
요청 예제
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/organizations/ORG/dependabot/repository-access
Response
Status: 200
{
"default_level": "public",
"accessible_repositories": [
{
"id": 123456,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjM0NTY=",
"name": "example-repo",
"full_name": "octocat/example-repo",
"owner": {
"name": "octocat",
"email": "octo@github.com",
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://avatars.githubusercontent.com/u/1?v=4",
"gravatar_id": 1,
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat/example-repo",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"user_view_type": "default"
},
"private": false,
"html_url": "https://github.com/octocat/example-repo",
"description": "This is an example repository.",
"fork": false,
"url": "https://api.github.com/repos/octocat/example-repo",
"archive_url": "https://api.github.com/repos/octocat/example-repo/{archive_format}{/ref}",
"assignees_url": "https://api.github.com/repos/octocat/example-repo/assignees{/user}",
"blobs_url": "https://api.github.com/repos/octocat/example-repo/git/blobs{/sha}",
"branches_url": "https://api.github.com/repos/octocat/example-repo/branches{/branch}",
"collaborators_url": "https://api.github.com/repos/octocat/example-repo/collaborators{/collaborator}",
"comments_url": "https://api.github.com/repos/octocat/example-repo/comments{/number}",
"commits_url": "https://api.github.com/repos/octocat/example-repo/commits{/sha}",
"compare_url": "https://api.github.com/repos/octocat/example-repo/compare/{base}...{head}",
"contents_url": "https://api.github.com/repos/octocat/example-repo/contents/{+path}",
"contributors_url": "https://api.github.com/repos/octocat/example-repo/contributors",
"deployments_url": "https://api.github.com/repos/octocat/example-repo/deployments",
"downloads_url": "https://api.github.com/repos/octocat/example-repo/downloads",
"events_url": "https://api.github.com/repos/octocat/example-repo/events",
"forks_url": "https://api.github.com/repos/octocat/example-repo/forks",
"git_commits_url": "https://api.github.com/repos/octocat/example-repo/git/commits{/sha}",
"git_refs_url": "https://api.github.com/repos/octocat/example-repo/git/refs{/sha}",
"git_tags_url": "https://api.github.com/repos/octocat/example-repo/git/tags{/sha}",
"issue_comment_url": "https://api.github.com/repos/octocat/example-repo/issues/comments{/number}",
"issue_events_url": "https://api.github.com/repos/octocat/example-repo/issues/events{/number}",
"issues_url": "https://api.github.com/repos/octocat/example-repo/issues{/number}",
"keys_url": "https://api.github.com/repos/octocat/example-repo/keys{/key_id}",
"labels_url": "https://api.github.com/repos/octocat/example-repo/labels{/name}",
"languages_url": "https://api.github.com/repos/octocat/example-repo/languages",
"merges_url": "https://api.github.com/repos/octocat/example-repo/merges",
"milestones_url": "https://api.github.com/repos/octocat/example-repo/milestones{/number}",
"notifications_url": "https://api.github.com/repos/octocat/example-repo/notifications{?since,all,participating}",
"pulls_url": "https://api.github.com/repos/octocat/example-repo/pulls{/number}",
"releases_url": "https://api.github.com/repos/octocat/example-repo/releases{/id}",
"stargazers_url": "https://api.github.com/repos/octocat/example-repo/stargazers",
"statuses_url": "https://api.github.com/repos/octocat/example-repo/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/octocat/example-repo/subscribers",
"subscription_url": "https://api.github.com/repos/octocat/example-repo/subscription",
"tags_url": "https://api.github.com/repos/octocat/example-repo/tags",
"teams_url": "https://api.github.com/repos/octocat/example-repo/teams",
"trees_url": "https://api.github.com/repos/octocat/example-repo/git/trees{/sha}",
"hooks_url": "https://api.github.com/repos/octocat/example-repo/hooks"
}
]
}
Updates repositories to the list of repositories that organization admins have allowed Dependabot to access when updating dependencies.
Note
This operation supports both server-to-server and user-to-server access. Unauthorized users will not see the existence of this endpoint.
Example request body:
{
"repository_ids_to_add": [123, 456],
"repository_ids_to_remove": [789]
}
"Updates repositories to the list of repositories that organization admins have allowed Dependabot to access when updating dependencies."에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "Administration" organization permissions (write)
"Updates repositories to the list of repositories that organization admins have allowed Dependabot to access when updating dependencies."에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
속성, 형식, 설명 |
---|
repository_ids_to_add array of integers List of repository IDs to add. |
repository_ids_to_remove array of integers List of repository IDs to remove. |
"Updates repositories to the list of repositories that organization admins have allowed Dependabot to access when updating dependencies."에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
204 | No Content |
403 | Forbidden |
404 | Resource not found |
"Updates repositories to the list of repositories that organization admins have allowed Dependabot to access when updating dependencies."에 대한 코드 샘플
요청 예제
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/organizations/ORG/dependabot/repository-access
Response
Status: 204
Set the default repository access level for Dependabot
Note
This operation supports both server-to-server and user-to-server access. Sets the default level of repository access Dependabot will have while performing an update. Available values are:
- 'public' - Dependabot will only have access to public repositories, unless access is explicitly granted to non-public repositories.
- 'internal' - Dependabot will only have access to public and internal repositories, unless access is explicitly granted to private repositories.
Unauthorized users will not see the existence of this endpoint.
"Set the default repository access level for Dependabot"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰에는 다음 권한 집합이 있어야 합니다.:
- "Administration" organization permissions (write)
"Set the default repository access level for Dependabot"에 대한 매개 변수
속성, 형식, 설명 |
---|
accept string Setting to |
속성, 형식, 설명 |
---|
org string RequiredThe organization name. The name is not case sensitive. |
속성, 형식, 설명 |
---|
default_level string RequiredThe default repository access level for Dependabot updates. 다음 중 하나일 수 있습니다.: |
"Set the default repository access level for Dependabot"에 대한 HTTP 응답 상태 코드
상태 코드 | 설명 |
---|---|
204 | No Content |
403 | Forbidden |
404 | Resource not found |
"Set the default repository access level for Dependabot"에 대한 코드 샘플
요청 예제
curl -L \
-X PUT \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/organizations/ORG/dependabot/repository-access/default-level \
-d '{"default_level":"public"}'
Response
Status: 204