diff --git a/github/apps.go b/github/apps.go index 8b850d9e5d..3823a12196 100644 --- a/github/apps.go +++ b/github/apps.go @@ -47,6 +47,10 @@ type InstallationTokenOptions struct { // Providing repository IDs restricts the access of an installation token to specific repositories. RepositoryIDs []int64 `json:"repository_ids,omitempty"` + // The names of the repositories that the installation token can access. + // Providing repository names restricts the access of an installation token to specific repositories. + Repositories []string `json:"repositories,omitempty"` + // The permissions granted to the access token. // The permissions object includes the permission names and their access type. Permissions *InstallationPermissions `json:"permissions,omitempty"` diff --git a/github/apps_test.go b/github/apps_test.go index 5079d41614..e003e27886 100644 --- a/github/apps_test.go +++ b/github/apps_test.go @@ -387,6 +387,7 @@ func TestAppsService_CreateInstallationTokenWithOptions(t *testing.T) { installationTokenOptions := &InstallationTokenOptions{ RepositoryIDs: []int64{1234}, + Repositories: []string{"foo"}, Permissions: &InstallationPermissions{ Contents: String("write"), Issues: String("read"),