Skip to content

Commit e87b9aa

Browse files
authored
Support specifying repository names (google#2123)
1 parent 6b0f37f commit e87b9aa

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

github/apps.go

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ type InstallationTokenOptions struct {
4747
// Providing repository IDs restricts the access of an installation token to specific repositories.
4848
RepositoryIDs []int64 `json:"repository_ids,omitempty"`
4949

50+
// The names of the repositories that the installation token can access.
51+
// Providing repository names restricts the access of an installation token to specific repositories.
52+
Repositories []string `json:"repositories,omitempty"`
53+
5054
// The permissions granted to the access token.
5155
// The permissions object includes the permission names and their access type.
5256
Permissions *InstallationPermissions `json:"permissions,omitempty"`

github/apps_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ func TestAppsService_CreateInstallationTokenWithOptions(t *testing.T) {
387387

388388
installationTokenOptions := &InstallationTokenOptions{
389389
RepositoryIDs: []int64{1234},
390+
Repositories: []string{"foo"},
390391
Permissions: &InstallationPermissions{
391392
Contents: String("write"),
392393
Issues: String("read"),

0 commit comments

Comments
 (0)