diff --git a/github/config.go b/github/config.go index ebce148fd4..b1637fef32 100644 --- a/github/config.go +++ b/github/config.go @@ -7,7 +7,7 @@ import ( "net/http" "net/url" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/logging" "golang.org/x/oauth2" ) diff --git a/github/data_source_github_collaborators.go b/github/data_source_github_collaborators.go index 5ab57c3331..782b5d10e3 100644 --- a/github/data_source_github_collaborators.go +++ b/github/data_source_github_collaborators.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" ) diff --git a/github/data_source_github_repositories.go b/github/data_source_github_repositories.go index ad8d914879..1123667064 100644 --- a/github/data_source_github_repositories.go +++ b/github/data_source_github_repositories.go @@ -4,7 +4,7 @@ import ( "context" "log" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" ) diff --git a/github/data_source_github_team.go b/github/data_source_github_team.go index e9504b47ec..3e0568a30a 100644 --- a/github/data_source_github_team.go +++ b/github/data_source_github_team.go @@ -6,7 +6,7 @@ import ( "log" "strconv" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_branch_protection.go b/github/resource_github_branch_protection.go index 0d18419f9f..28f6cf54b3 100644 --- a/github/resource_github_branch_protection.go +++ b/github/resource_github_branch_protection.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" ) diff --git a/github/resource_github_branch_protection_test.go b/github/resource_github_branch_protection_test.go index 0706f62973..69767fa0ff 100644 --- a/github/resource_github_branch_protection_test.go +++ b/github/resource_github_branch_protection_test.go @@ -7,7 +7,7 @@ import ( "sort" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" diff --git a/github/resource_github_issue_label.go b/github/resource_github_issue_label.go index f510ce2524..a1d55ec480 100644 --- a/github/resource_github_issue_label.go +++ b/github/resource_github_issue_label.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_issue_label_test.go b/github/resource_github_issue_label_test.go index fc7a206460..f0056a14f7 100644 --- a/github/resource_github_issue_label_test.go +++ b/github/resource_github_issue_label_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" diff --git a/github/resource_github_membership.go b/github/resource_github_membership.go index e52884de9e..317b85a7b7 100644 --- a/github/resource_github_membership.go +++ b/github/resource_github_membership.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_membership_test.go b/github/resource_github_membership_test.go index f12339e41d..6edbe13e08 100644 --- a/github/resource_github_membership_test.go +++ b/github/resource_github_membership_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) diff --git a/github/resource_github_organization_project.go b/github/resource_github_organization_project.go index 6da40a0436..2be831b728 100644 --- a/github/resource_github_organization_project.go +++ b/github/resource_github_organization_project.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_organization_project_test.go b/github/resource_github_organization_project_test.go index 1fbb4b2f12..4c2ae3ef88 100644 --- a/github/resource_github_organization_project_test.go +++ b/github/resource_github_organization_project_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) diff --git a/github/resource_github_organization_webhook.go b/github/resource_github_organization_webhook.go index 802fb09676..98baa3e4c4 100644 --- a/github/resource_github_organization_webhook.go +++ b/github/resource_github_organization_webhook.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_organization_webhook_test.go b/github/resource_github_organization_webhook_test.go index 7114a8d5f7..291753b93e 100644 --- a/github/resource_github_organization_webhook_test.go +++ b/github/resource_github_organization_webhook_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) diff --git a/github/resource_github_project_column.go b/github/resource_github_project_column.go index 2383f62b02..7c6242f35d 100644 --- a/github/resource_github_project_column.go +++ b/github/resource_github_project_column.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_project_column_test.go b/github/resource_github_project_column_test.go index f0d39d0daa..417155a5d2 100644 --- a/github/resource_github_project_column_test.go +++ b/github/resource_github_project_column_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) diff --git a/github/resource_github_repository.go b/github/resource_github_repository.go index 5e4d9948e5..3d13d6e97f 100644 --- a/github/resource_github_repository.go +++ b/github/resource_github_repository.go @@ -7,7 +7,7 @@ import ( "net/http" "regexp" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" ) diff --git a/github/resource_github_repository_collaborator.go b/github/resource_github_repository_collaborator.go index 3f2013c2d2..1af74c0091 100644 --- a/github/resource_github_repository_collaborator.go +++ b/github/resource_github_repository_collaborator.go @@ -6,7 +6,7 @@ import ( "log" "strings" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_repository_collaborator_test.go b/github/resource_github_repository_collaborator_test.go index 3c1fb7882c..dbeba95d3b 100644 --- a/github/resource_github_repository_collaborator_test.go +++ b/github/resource_github_repository_collaborator_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" diff --git a/github/resource_github_repository_deploy_key.go b/github/resource_github_repository_deploy_key.go index 8f30f04bb6..3ee2f3efc9 100644 --- a/github/resource_github_repository_deploy_key.go +++ b/github/resource_github_repository_deploy_key.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_repository_project.go b/github/resource_github_repository_project.go index ec6af9801d..7e4fa4868b 100644 --- a/github/resource_github_repository_project.go +++ b/github/resource_github_repository_project.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_repository_project_test.go b/github/resource_github_repository_project_test.go index 524b4eedb0..4b9b25f0e2 100644 --- a/github/resource_github_repository_project_test.go +++ b/github/resource_github_repository_project_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" diff --git a/github/resource_github_repository_test.go b/github/resource_github_repository_test.go index 4f1c93d048..b18e8926cd 100644 --- a/github/resource_github_repository_test.go +++ b/github/resource_github_repository_test.go @@ -10,7 +10,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" diff --git a/github/resource_github_repository_webhook.go b/github/resource_github_repository_webhook.go index cbdfe298ca..2442f3a5cb 100644 --- a/github/resource_github_repository_webhook.go +++ b/github/resource_github_repository_webhook.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_repository_webhook_test.go b/github/resource_github_repository_webhook_test.go index 7b2ecda618..11f711dcac 100644 --- a/github/resource_github_repository_webhook_test.go +++ b/github/resource_github_repository_webhook_test.go @@ -8,7 +8,7 @@ import ( "strings" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" diff --git a/github/resource_github_team.go b/github/resource_github_team.go index 05b26aa4cc..0a7fcc020d 100644 --- a/github/resource_github_team.go +++ b/github/resource_github_team.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_team_membership.go b/github/resource_github_team_membership.go index 351a701a51..5ba6e4e8a7 100644 --- a/github/resource_github_team_membership.go +++ b/github/resource_github_team_membership.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_team_membership_test.go b/github/resource_github_team_membership_test.go index f2f1ae2cd4..a5d14dbd44 100644 --- a/github/resource_github_team_membership_test.go +++ b/github/resource_github_team_membership_test.go @@ -7,7 +7,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" diff --git a/github/resource_github_team_repository.go b/github/resource_github_team_repository.go index 2aff5ddf2e..bd735bd26f 100644 --- a/github/resource_github_team_repository.go +++ b/github/resource_github_team_repository.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_team_repository_test.go b/github/resource_github_team_repository_test.go index b507644933..6eb381c63e 100644 --- a/github/resource_github_team_repository_test.go +++ b/github/resource_github_team_repository_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" diff --git a/github/resource_github_team_test.go b/github/resource_github_team_test.go index 29d965ac61..d740a97ddb 100644 --- a/github/resource_github_team_test.go +++ b/github/resource_github_team_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" diff --git a/github/resource_github_user_gpg_key.go b/github/resource_github_user_gpg_key.go index 4bc9d8c953..964fed71c5 100644 --- a/github/resource_github_user_gpg_key.go +++ b/github/resource_github_user_gpg_key.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_user_gpg_key_test.go b/github/resource_github_user_gpg_key_test.go index ab81a6762f..a90ff99161 100644 --- a/github/resource_github_user_gpg_key_test.go +++ b/github/resource_github_user_gpg_key_test.go @@ -8,7 +8,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) diff --git a/github/resource_github_user_ssh_key.go b/github/resource_github_user_ssh_key.go index 1c64e80637..2aefa88e6b 100644 --- a/github/resource_github_user_ssh_key.go +++ b/github/resource_github_user_ssh_key.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/resource_github_user_ssh_key_test.go b/github/resource_github_user_ssh_key_test.go index 654ddabc1e..6dee167a80 100644 --- a/github/resource_github_user_ssh_key_test.go +++ b/github/resource_github_user_ssh_key_test.go @@ -7,7 +7,7 @@ import ( "strconv" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" diff --git a/github/resource_organization_block.go b/github/resource_organization_block.go index 10db28f9af..4878856fb3 100644 --- a/github/resource_organization_block.go +++ b/github/resource_organization_block.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" "github.com/hashicorp/terraform/helper/schema" ) diff --git a/github/transport.go b/github/transport.go index b436af47e5..d290dbd02a 100644 --- a/github/transport.go +++ b/github/transport.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" ) const ( diff --git a/github/transport_test.go b/github/transport_test.go index e4ba10173c..f7c9382831 100644 --- a/github/transport_test.go +++ b/github/transport_test.go @@ -10,7 +10,7 @@ import ( "net/url" "testing" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" ) func TestEtagTransport(t *testing.T) { diff --git a/github/util_permissions.go b/github/util_permissions.go index f4116b911e..2c177bbc98 100644 --- a/github/util_permissions.go +++ b/github/util_permissions.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/google/go-github/v25/github" + "github.com/google/go-github/v28/github" ) const ( diff --git a/go.mod b/go.mod index 92ddb4a7f6..10eb37901d 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/terraform-providers/terraform-provider-github require ( - github.com/google/go-github/v25 v25.1.3 + github.com/google/go-github/v28 v28.1.1 github.com/hashicorp/terraform v0.12.7 github.com/kylelemons/godebug v1.1.0 github.com/terraform-providers/terraform-provider-tls v1.2.0 diff --git a/go.sum b/go.sum index 9ef4467d7c..db7f141e23 100644 --- a/go.sum +++ b/go.sum @@ -131,8 +131,8 @@ github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-github/v25 v25.1.3 h1:Ht4YIQgUh4l4lc80fvGnw60khXysXvlgPxPP8uJG3EA= -github.com/google/go-github/v25 v25.1.3/go.mod h1:6z5pC69qHtrPJ0sXPsj4BLnd82b+r6sLB7qcBoRZqpw= +github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo= +github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= diff --git a/vendor/github.com/google/go-github/v25/AUTHORS b/vendor/github.com/google/go-github/v28/AUTHORS similarity index 94% rename from vendor/github.com/google/go-github/v25/AUTHORS rename to vendor/github.com/google/go-github/v28/AUTHORS index 5789fed146..fa0f1abc93 100644 --- a/vendor/github.com/google/go-github/v25/AUTHORS +++ b/vendor/github.com/google/go-github/v28/AUTHORS @@ -10,7 +10,9 @@ 178inaba Abhinav Gupta +adrienzieba Ahmed Hagy +Aidan Steele Ainsley Chong Akeda Bagus Akhil Mohan @@ -25,6 +27,7 @@ Andrew Ryabchun Andy Grunwald Andy Hume Andy Lindeman +anjanashenoy Anshuman Bhartiya Antoine Antoine Pelisse @@ -56,6 +59,7 @@ Chris King Chris Roche Chris Schaefer chrisforrette +Christian Muehlhaeuser Christoph Sassenberg Colin Misare Craig Peterson @@ -67,6 +71,7 @@ Dave Du Cros Dave Henderson David Deng David Jannotta +David Ji Davide Zipeto Dennis Webb Dhi Aurrahman @@ -82,6 +87,7 @@ Emerson Wood eperm Erick Fejta erwinvaneyk +Evan Elias Fabrice Felix Geisendörfer Filippo Valsorda @@ -127,6 +133,7 @@ jpbelanger-mtl Juan Basso Julien Garcia Gonzalez Julien Rostand +Junya Kono Justin Abrahms Jusung Lee jzhoucliqr @@ -149,8 +156,10 @@ Luke Kysow Luke Roberts Luke Young Maksim Zhylinski +Mark Tareshawty Martin-Louis Bright Marwan Sulaiman +Masayuki Izumi Mat Geist Matt Matt Brender @@ -181,6 +190,7 @@ Pete Wagner Petr Shevtsov Pierre Carrier Piotr Zurek +Quentin Leffray Quinn Slack Rackspace US, Inc. Radek Simko @@ -190,6 +200,7 @@ Ranbir Singh RaviTeja Pothana rc1140 Red Hat, Inc. +Ricco Førgaard Rob Figueiredo Rohit Upadhyay Ronak Jain @@ -212,10 +223,13 @@ Shagun Khemka shakeelrao Shawn Catanzarite Shawn Smith +Shrikrishna Singh sona-tar SoundCloud, Ltd. Sridhar Mocherla +SriVignessh Pss Stian Eikeland +Szymon Kodrebski Tasya Aditya Rukmana Thomas Bruyelle Timothée Peignier @@ -229,6 +243,7 @@ Vlad Ungureanu Wasim Thabraze Will Maier William Bailey +William Cooke xibz Yann Malet Yannick Utard diff --git a/vendor/github.com/google/go-github/v25/LICENSE b/vendor/github.com/google/go-github/v28/LICENSE similarity index 100% rename from vendor/github.com/google/go-github/v25/LICENSE rename to vendor/github.com/google/go-github/v28/LICENSE diff --git a/vendor/github.com/google/go-github/v25/github/activity.go b/vendor/github.com/google/go-github/v28/github/activity.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/activity.go rename to vendor/github.com/google/go-github/v28/github/activity.go diff --git a/vendor/github.com/google/go-github/v25/github/activity_events.go b/vendor/github.com/google/go-github/v28/github/activity_events.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/activity_events.go rename to vendor/github.com/google/go-github/v28/github/activity_events.go diff --git a/vendor/github.com/google/go-github/v25/github/activity_notifications.go b/vendor/github.com/google/go-github/v28/github/activity_notifications.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/activity_notifications.go rename to vendor/github.com/google/go-github/v28/github/activity_notifications.go diff --git a/vendor/github.com/google/go-github/v25/github/activity_star.go b/vendor/github.com/google/go-github/v28/github/activity_star.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/activity_star.go rename to vendor/github.com/google/go-github/v28/github/activity_star.go diff --git a/vendor/github.com/google/go-github/v25/github/activity_watching.go b/vendor/github.com/google/go-github/v28/github/activity_watching.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/activity_watching.go rename to vendor/github.com/google/go-github/v28/github/activity_watching.go diff --git a/vendor/github.com/google/go-github/v25/github/admin.go b/vendor/github.com/google/go-github/v28/github/admin.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/admin.go rename to vendor/github.com/google/go-github/v28/github/admin.go diff --git a/vendor/github.com/google/go-github/v28/github/admin_orgs.go b/vendor/github.com/google/go-github/v28/github/admin_orgs.go new file mode 100644 index 0000000000..f063831085 --- /dev/null +++ b/vendor/github.com/google/go-github/v28/github/admin_orgs.go @@ -0,0 +1,43 @@ +// Copyright 2019 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import "context" + +// createOrgRequest is a subset of Organization and is used internally +// by CreateOrg to pass only the known fields for the endpoint. +type createOrgRequest struct { + Login *string `json:"login,omitempty"` + Admin *string `json:"admin,omitempty"` +} + +// CreateOrg creates a new organization in GitHub Enterprise. +// +// Note that only a subset of the org fields are used and org must +// not be nil. +// +// GitHub Enterprise API docs: https://developer.github.com/enterprise/v3/enterprise-admin/orgs/#create-an-organization +func (s *AdminService) CreateOrg(ctx context.Context, org *Organization, admin string) (*Organization, *Response, error) { + u := "admin/organizations" + + orgReq := &createOrgRequest{ + Login: org.Login, + Admin: &admin, + } + + req, err := s.client.NewRequest("POST", u, orgReq) + if err != nil { + return nil, nil, err + } + + o := new(Organization) + resp, err := s.client.Do(ctx, req, o) + if err != nil { + return nil, resp, err + } + + return o, resp, nil +} diff --git a/vendor/github.com/google/go-github/v25/github/admin_stats.go b/vendor/github.com/google/go-github/v28/github/admin_stats.go similarity index 97% rename from vendor/github.com/google/go-github/v25/github/admin_stats.go rename to vendor/github.com/google/go-github/v28/github/admin_stats.go index b5645f8c17..dabefde3e7 100644 --- a/vendor/github.com/google/go-github/v25/github/admin_stats.go +++ b/vendor/github.com/google/go-github/v28/github/admin_stats.go @@ -10,7 +10,7 @@ import ( "fmt" ) -// AdminStats represents a variety of stats of a Github Enterprise +// AdminStats represents a variety of stats of a GitHub Enterprise // installation. type AdminStats struct { Issues *IssueStats `json:"issues,omitempty"` @@ -147,7 +147,7 @@ func (s RepoStats) String() string { return Stringify(s) } -// GetAdminStats returns a variety of metrics about a Github Enterprise +// GetAdminStats returns a variety of metrics about a GitHub Enterprise // installation. // // Please note that this is only available to site administrators, diff --git a/vendor/github.com/google/go-github/v28/github/admin_users.go b/vendor/github.com/google/go-github/v28/github/admin_users.go new file mode 100644 index 0000000000..ea7a47d31c --- /dev/null +++ b/vendor/github.com/google/go-github/v28/github/admin_users.go @@ -0,0 +1,61 @@ +// Copyright 2019 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" +) + +// createUserRequest is a subset of User and is used internally +// by CreateUser to pass only the known fields for the endpoint. +type createUserRequest struct { + Login *string `json:"login,omitempty"` + Email *string `json:"email,omitempty"` +} + +// CreateUser creates a new user in GitHub Enterprise. +// +// GitHub Enterprise API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#create-a-new-user +func (s *AdminService) CreateUser(ctx context.Context, login, email string) (*User, *Response, error) { + u := "admin/users" + + userReq := &createUserRequest{ + Login: &login, + Email: &email, + } + + req, err := s.client.NewRequest("POST", u, userReq) + if err != nil { + return nil, nil, err + } + + var user User + resp, err := s.client.Do(ctx, req, &user) + if err != nil { + return nil, resp, err + } + + return &user, resp, nil +} + +// DeleteUser deletes a user in GitHub Enterprise. +// +// GitHub Enterprise API docs: https://developer.github.com/enterprise/v3/enterprise-admin/users/#delete-a-user +func (s *AdminService) DeleteUser(ctx context.Context, username string) (*Response, error) { + u := "admin/users/" + username + + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + resp, err := s.client.Do(ctx, req, nil) + if err != nil { + return resp, err + } + + return resp, nil +} diff --git a/vendor/github.com/google/go-github/v25/github/apps.go b/vendor/github.com/google/go-github/v28/github/apps.go similarity index 73% rename from vendor/github.com/google/go-github/v25/github/apps.go rename to vendor/github.com/google/go-github/v28/github/apps.go index 1ad9a9818f..5041e80128 100644 --- a/vendor/github.com/google/go-github/v25/github/apps.go +++ b/vendor/github.com/google/go-github/v28/github/apps.go @@ -26,22 +26,59 @@ type App struct { Description *string `json:"description,omitempty"` ExternalURL *string `json:"external_url,omitempty"` HTMLURL *string `json:"html_url,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` } // InstallationToken represents an installation token. type InstallationToken struct { - Token *string `json:"token,omitempty"` - ExpiresAt *time.Time `json:"expires_at,omitempty"` + Token *string `json:"token,omitempty"` + ExpiresAt *time.Time `json:"expires_at,omitempty"` + Permissions *InstallationPermissions `json:"permissions,omitempty"` + Repositories []*Repository `json:"repositories,omitempty"` } -// InstallationPermissions lists the permissions for metadata, contents, issues and single file for an installation. +// InstallationTokenOptions allow restricting a token's access to specific repositories. +type InstallationTokenOptions struct { + // The IDs of the repositories that the installation token can access. + // Providing repository IDs restricts the access of an installation token to specific repositories. + RepositoryIDs []int64 `json:"repository_ids,omitempty"` + + // The permissions granted to the access token. + // The permissions object includes the permission names and their access type. + Permissions *InstallationPermissions `json:"permissions,omitempty"` +} + +// InstallationPermissions lists the repository and organization permissions for an installation. +// +// Permission names taken from: +// https://developer.github.com/v3/apps/permissions/ +// https://developer.github.com/enterprise/v3/apps/permissions/ type InstallationPermissions struct { - Metadata *string `json:"metadata,omitempty"` - Contents *string `json:"contents,omitempty"` - Issues *string `json:"issues,omitempty"` - SingleFile *string `json:"single_file,omitempty"` + Administration *string `json:"administration,omitempty"` + Checks *string `json:"checks,omitempty"` + Contents *string `json:"contents,omitempty"` + ContentReferences *string `json:"content_references,omitempty"` + Deployments *string `json:"deployments,omitempty"` + Issues *string `json:"issues,omitempty"` + Metadata *string `json:"metadata,omitempty"` + Members *string `json:"members,omitempty"` + OrganizationAdministration *string `json:"organization_administration,omitempty"` + OrganizationHooks *string `json:"organization_hooks,omitempty"` + OrganizationPlan *string `json:"organization_plan,omitempty"` + OrganizationPreReceiveHooks *string `json:"organization_pre_receive_hooks,omitempty"` + OrganizationProjects *string `json:"organization_projects,omitempty"` + OrganizationUserBlocking *string `json:"organization_user_blocking,omitempty"` + Packages *string `json:"packages,omitempty"` + Pages *string `json:"pages,omitempty"` + PullRequests *string `json:"pull_requests,omitempty"` + RepositoryHooks *string `json:"repository_hooks,omitempty"` + RepositoryProjects *string `json:"repository_projects,omitempty"` + RepositoryPreReceiveHooks *string `json:"repository_pre_receive_hooks,omitempty"` + SingleFile *string `json:"single_file,omitempty"` + Statuses *string `json:"statuses,omitempty"` + TeamDiscussions *string `json:"team_discussions,omitempty"` + VulnerabilityAlerts *string `json:"vulnerability_alerts,omitempty"` } // Installation represents a GitHub Apps installation. @@ -170,10 +207,10 @@ func (s *AppsService) ListUserInstallations(ctx context.Context, opt *ListOption // CreateInstallationToken creates a new installation token. // // GitHub API docs: https://developer.github.com/v3/apps/#create-a-new-installation-token -func (s *AppsService) CreateInstallationToken(ctx context.Context, id int64) (*InstallationToken, *Response, error) { +func (s *AppsService) CreateInstallationToken(ctx context.Context, id int64, opt *InstallationTokenOptions) (*InstallationToken, *Response, error) { u := fmt.Sprintf("app/installations/%v/access_tokens", id) - req, err := s.client.NewRequest("POST", u, nil) + req, err := s.client.NewRequest("POST", u, opt) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/google/go-github/v25/github/apps_installation.go b/vendor/github.com/google/go-github/v28/github/apps_installation.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/apps_installation.go rename to vendor/github.com/google/go-github/v28/github/apps_installation.go diff --git a/vendor/github.com/google/go-github/v25/github/apps_marketplace.go b/vendor/github.com/google/go-github/v28/github/apps_marketplace.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/apps_marketplace.go rename to vendor/github.com/google/go-github/v28/github/apps_marketplace.go diff --git a/vendor/github.com/google/go-github/v25/github/authorizations.go b/vendor/github.com/google/go-github/v28/github/authorizations.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/authorizations.go rename to vendor/github.com/google/go-github/v28/github/authorizations.go diff --git a/vendor/github.com/google/go-github/v25/github/checks.go b/vendor/github.com/google/go-github/v28/github/checks.go similarity index 99% rename from vendor/github.com/google/go-github/v25/github/checks.go rename to vendor/github.com/google/go-github/v28/github/checks.go index 342915085e..0c88cbb58a 100644 --- a/vendor/github.com/google/go-github/v25/github/checks.go +++ b/vendor/github.com/google/go-github/v28/github/checks.go @@ -54,6 +54,8 @@ type CheckRunAnnotation struct { BlobHRef *string `json:"blob_href,omitempty"` StartLine *int `json:"start_line,omitempty"` EndLine *int `json:"end_line,omitempty"` + StartColumn *int `json:"start_column,omitempty"` + EndColumn *int `json:"end_column,omitempty"` AnnotationLevel *string `json:"annotation_level,omitempty"` Message *string `json:"message,omitempty"` Title *string `json:"title,omitempty"` diff --git a/vendor/github.com/google/go-github/v25/github/doc.go b/vendor/github.com/google/go-github/v28/github/doc.go similarity index 99% rename from vendor/github.com/google/go-github/v25/github/doc.go rename to vendor/github.com/google/go-github/v28/github/doc.go index b82440c341..8adfdc1d49 100644 --- a/vendor/github.com/google/go-github/v25/github/doc.go +++ b/vendor/github.com/google/go-github/v28/github/doc.go @@ -8,7 +8,7 @@ Package github provides a client for using the GitHub API. Usage: - import "github.com/google/go-github/v25/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) + import "github.com/google/go-github/v28/github" // with go modules enabled (GO111MODULE=on or outside GOPATH) import "github.com/google/go-github/github" // with go modules disabled Construct a new GitHub client, then use the various services on the client to diff --git a/vendor/github.com/google/go-github/v25/github/event.go b/vendor/github.com/google/go-github/v28/github/event.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/event.go rename to vendor/github.com/google/go-github/v28/github/event.go diff --git a/vendor/github.com/google/go-github/v25/github/event_types.go b/vendor/github.com/google/go-github/v28/github/event_types.go similarity index 99% rename from vendor/github.com/google/go-github/v25/github/event_types.go rename to vendor/github.com/google/go-github/v28/github/event_types.go index 8ba922a2b7..d3e2123547 100644 --- a/vendor/github.com/google/go-github/v25/github/event_types.go +++ b/vendor/github.com/google/go-github/v28/github/event_types.go @@ -707,6 +707,7 @@ type PushEventRepository struct { PushedAt *Timestamp `json:"pushed_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` Homepage *string `json:"homepage,omitempty"` + PullsURL *string `json:"pulls_url,omitempty"` Size *int `json:"size,omitempty"` StargazersCount *int `json:"stargazers_count,omitempty"` WatchersCount *int `json:"watchers_count,omitempty"` diff --git a/vendor/github.com/google/go-github/v25/github/gen-accessors.go b/vendor/github.com/google/go-github/v28/github/gen-accessors.go similarity index 97% rename from vendor/github.com/google/go-github/v25/github/gen-accessors.go rename to vendor/github.com/google/go-github/v28/github/gen-accessors.go index fe92206fcf..4c5e8eec7e 100644 --- a/vendor/github.com/google/go-github/v25/github/gen-accessors.go +++ b/vendor/github.com/google/go-github/v28/github/gen-accessors.go @@ -7,8 +7,9 @@ // gen-accessors generates accessor methods for structs with pointer fields. // -// It is meant to be used by the go-github authors in conjunction with the -// go generate tool before sending a commit to GitHub. +// It is meant to be used by go-github contributors in conjunction with the +// go generate tool before sending a PR to GitHub. +// Please see the CONTRIBUTING.md file for more information. package main import ( diff --git a/vendor/github.com/google/go-github/v28/github/gen-stringify-test.go b/vendor/github.com/google/go-github/v28/github/gen-stringify-test.go new file mode 100644 index 0000000000..7803801e63 --- /dev/null +++ b/vendor/github.com/google/go-github/v28/github/gen-stringify-test.go @@ -0,0 +1,358 @@ +// Copyright 2019 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// gen-stringify-test generates test methods to test the String methods. +// +// These tests eliminate most of the code coverage problems so that real +// code coverage issues can be more readily identified. +// +// It is meant to be used by go-github contributors in conjunction with the +// go generate tool before sending a PR to GitHub. +// Please see the CONTRIBUTING.md file for more information. +package main + +import ( + "bytes" + "flag" + "fmt" + "go/ast" + "go/format" + "go/parser" + "go/token" + "io/ioutil" + "log" + "os" + "strings" + "text/template" +) + +const ( + ignoreFilePrefix1 = "gen-" + ignoreFilePrefix2 = "github-" + outputFileSuffix = "-stringify_test.go" +) + +var ( + verbose = flag.Bool("v", false, "Print verbose log messages") + + // blacklistStructMethod lists "struct.method" combos to skip. + blacklistStructMethod = map[string]bool{} + // blacklistStruct lists structs to skip. + blacklistStruct = map[string]bool{ + "RateLimits": true, + } + + funcMap = template.FuncMap{ + "isNotLast": func(index int, slice []*structField) string { + if index+1 < len(slice) { + return ", " + } + return "" + }, + "processZeroValue": func(v string) string { + switch v { + case "Bool(false)": + return "false" + case "Float64(0.0)": + return "0" + case "0", "Int(0)", "Int64(0)": + return "0" + case `""`, `String("")`: + return `""` + case "Timestamp{}", "&Timestamp{}": + return "github.Timestamp{0001-01-01 00:00:00 +0000 UTC}" + case "nil": + return "map[]" + } + log.Fatalf("Unhandled zero value: %q", v) + return "" + }, + } + + sourceTmpl = template.Must(template.New("source").Funcs(funcMap).Parse(source)) +) + +func main() { + flag.Parse() + fset := token.NewFileSet() + + pkgs, err := parser.ParseDir(fset, ".", sourceFilter, 0) + if err != nil { + log.Fatal(err) + return + } + + for pkgName, pkg := range pkgs { + t := &templateData{ + filename: pkgName + outputFileSuffix, + Year: 2019, // No need to change this once set (even in following years). + Package: pkgName, + Imports: map[string]string{"testing": "testing"}, + StringFuncs: map[string]bool{}, + StructFields: map[string][]*structField{}, + } + for filename, f := range pkg.Files { + logf("Processing %v...", filename) + if err := t.processAST(f); err != nil { + log.Fatal(err) + } + } + if err := t.dump(); err != nil { + log.Fatal(err) + } + } + logf("Done.") +} + +func sourceFilter(fi os.FileInfo) bool { + return !strings.HasSuffix(fi.Name(), "_test.go") && + !strings.HasPrefix(fi.Name(), ignoreFilePrefix1) && + !strings.HasPrefix(fi.Name(), ignoreFilePrefix2) +} + +type templateData struct { + filename string + Year int + Package string + Imports map[string]string + StringFuncs map[string]bool + StructFields map[string][]*structField +} + +type structField struct { + sortVal string // Lower-case version of "ReceiverType.FieldName". + ReceiverVar string // The one-letter variable name to match the ReceiverType. + ReceiverType string + FieldName string + FieldType string + ZeroValue string + NamedStruct bool // Getter for named struct. +} + +func (t *templateData) processAST(f *ast.File) error { + for _, decl := range f.Decls { + fn, ok := decl.(*ast.FuncDecl) + if ok { + if fn.Recv != nil && len(fn.Recv.List) > 0 { + id, ok := fn.Recv.List[0].Type.(*ast.Ident) + if ok && fn.Name.Name == "String" { + logf("Got FuncDecl: Name=%q, id.Name=%#v", fn.Name.Name, id.Name) + t.StringFuncs[id.Name] = true + } else { + logf("Ignoring FuncDecl: Name=%q, Type=%T", fn.Name.Name, fn.Recv.List[0].Type) + } + } else { + logf("Ignoring FuncDecl: Name=%q, fn=%#v", fn.Name.Name, fn) + } + continue + } + + gd, ok := decl.(*ast.GenDecl) + if !ok { + logf("Ignoring AST decl type %T", decl) + continue + } + for _, spec := range gd.Specs { + ts, ok := spec.(*ast.TypeSpec) + if !ok { + continue + } + // Skip unexported identifiers. + if !ts.Name.IsExported() { + logf("Struct %v is unexported; skipping.", ts.Name) + continue + } + // Check if the struct is blacklisted. + if blacklistStruct[ts.Name.Name] { + logf("Struct %v is blacklisted; skipping.", ts.Name) + continue + } + st, ok := ts.Type.(*ast.StructType) + if !ok { + logf("Ignoring AST type %T, Name=%q", ts.Type, ts.Name.String()) + continue + } + for _, field := range st.Fields.List { + if len(field.Names) == 0 { + continue + } + + fieldName := field.Names[0] + if id, ok := field.Type.(*ast.Ident); ok { + t.addIdent(id, ts.Name.String(), fieldName.String()) + continue + } + + if _, ok := field.Type.(*ast.MapType); ok { + t.addMapType(ts.Name.String(), fieldName.String()) + continue + } + + se, ok := field.Type.(*ast.StarExpr) + if !ok { + logf("Ignoring type %T for Name=%q, FieldName=%q", field.Type, ts.Name.String(), fieldName.String()) + continue + } + + // Skip unexported identifiers. + if !fieldName.IsExported() { + logf("Field %v is unexported; skipping.", fieldName) + continue + } + // Check if "struct.method" is blacklisted. + if key := fmt.Sprintf("%v.Get%v", ts.Name, fieldName); blacklistStructMethod[key] { + logf("Method %v is blacklisted; skipping.", key) + continue + } + + switch x := se.X.(type) { + case *ast.ArrayType: + case *ast.Ident: + t.addIdentPtr(x, ts.Name.String(), fieldName.String()) + case *ast.MapType: + case *ast.SelectorExpr: + default: + logf("processAST: type %q, field %q, unknown %T: %+v", ts.Name, fieldName, x, x) + } + } + } + } + return nil +} + +func (t *templateData) addMapType(receiverType, fieldName string) { + t.StructFields[receiverType] = append(t.StructFields[receiverType], newStructField(receiverType, fieldName, "map[]", "nil", false)) +} + +func (t *templateData) addIdent(x *ast.Ident, receiverType, fieldName string) { + var zeroValue string + var namedStruct = false + switch x.String() { + case "int": + zeroValue = "0" + case "int64": + zeroValue = "0" + case "float64": + zeroValue = "0.0" + case "string": + zeroValue = `""` + case "bool": + zeroValue = "false" + case "Timestamp": + zeroValue = "Timestamp{}" + default: + zeroValue = "nil" + namedStruct = true + } + + t.StructFields[receiverType] = append(t.StructFields[receiverType], newStructField(receiverType, fieldName, x.String(), zeroValue, namedStruct)) +} + +func (t *templateData) addIdentPtr(x *ast.Ident, receiverType, fieldName string) { + var zeroValue string + var namedStruct = false + switch x.String() { + case "int": + zeroValue = "Int(0)" + case "int64": + zeroValue = "Int64(0)" + case "float64": + zeroValue = "Float64(0.0)" + case "string": + zeroValue = `String("")` + case "bool": + zeroValue = "Bool(false)" + case "Timestamp": + zeroValue = "&Timestamp{}" + default: + zeroValue = "nil" + namedStruct = true + } + + t.StructFields[receiverType] = append(t.StructFields[receiverType], newStructField(receiverType, fieldName, x.String(), zeroValue, namedStruct)) +} + +func (t *templateData) dump() error { + if len(t.StructFields) == 0 { + logf("No StructFields for %v; skipping.", t.filename) + return nil + } + + // Remove unused structs. + var toDelete []string + for k := range t.StructFields { + if !t.StringFuncs[k] { + toDelete = append(toDelete, k) + continue + } + } + for _, k := range toDelete { + delete(t.StructFields, k) + } + + var buf bytes.Buffer + if err := sourceTmpl.Execute(&buf, t); err != nil { + return err + } + clean, err := format.Source(buf.Bytes()) + if err != nil { + log.Printf("failed-to-format source:\n%v", buf.String()) + return err + } + + logf("Writing %v...", t.filename) + return ioutil.WriteFile(t.filename, clean, 0644) +} + +func newStructField(receiverType, fieldName, fieldType, zeroValue string, namedStruct bool) *structField { + return &structField{ + sortVal: strings.ToLower(receiverType) + "." + strings.ToLower(fieldName), + ReceiverVar: strings.ToLower(receiverType[:1]), + ReceiverType: receiverType, + FieldName: fieldName, + FieldType: fieldType, + ZeroValue: zeroValue, + NamedStruct: namedStruct, + } +} + +func logf(fmt string, args ...interface{}) { + if *verbose { + log.Printf(fmt, args...) + } +} + +const source = `// Copyright {{.Year}} The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated by gen-stringify-tests; DO NOT EDIT. + +package {{ $package := .Package}}{{$package}} +{{with .Imports}} +import ( + {{- range . -}} + "{{.}}" + {{end -}} +) +{{end}} +func Float64(v float64) *float64 { return &v } +{{range $key, $value := .StructFields}} +func Test{{ $key }}_String(t *testing.T) { + v := {{ $key }}{ {{range .}}{{if .NamedStruct}} + {{ .FieldName }}: &{{ .FieldType }}{},{{else}} + {{ .FieldName }}: {{.ZeroValue}},{{end}}{{end}} + } + want := ` + "`" + `{{ $package }}.{{ $key }}{{ $slice := . }}{ +{{- range $ind, $val := .}}{{if .NamedStruct}}{{ .FieldName }}:{{ $package }}.{{ .FieldType }}{}{{else}}{{ .FieldName }}:{{ processZeroValue .ZeroValue }}{{end}}{{ isNotLast $ind $slice }}{{end}}}` + "`" + ` + if got := v.String(); got != want { + t.Errorf("{{ $key }}.String = %v, want %v", got, want) + } +} +{{end}} +` diff --git a/vendor/github.com/google/go-github/v25/github/gists.go b/vendor/github.com/google/go-github/v28/github/gists.go similarity index 98% rename from vendor/github.com/google/go-github/v25/github/gists.go rename to vendor/github.com/google/go-github/v28/github/gists.go index 15e0bc2cd9..36d9361967 100644 --- a/vendor/github.com/google/go-github/v25/github/gists.go +++ b/vendor/github.com/google/go-github/v28/github/gists.go @@ -341,8 +341,13 @@ func (s *GistsService) Fork(ctx context.Context, id string) (*Gist, *Response, e // ListForks lists forks of a gist. // // GitHub API docs: https://developer.github.com/v3/gists/#list-gist-forks -func (s *GistsService) ListForks(ctx context.Context, id string) ([]*GistFork, *Response, error) { +func (s *GistsService) ListForks(ctx context.Context, id string, opt *ListOptions) ([]*GistFork, *Response, error) { u := fmt.Sprintf("gists/%v/forks", id) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + req, err := s.client.NewRequest("GET", u, nil) if err != nil { return nil, nil, err diff --git a/vendor/github.com/google/go-github/v25/github/gists_comments.go b/vendor/github.com/google/go-github/v28/github/gists_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/gists_comments.go rename to vendor/github.com/google/go-github/v28/github/gists_comments.go diff --git a/vendor/github.com/google/go-github/v25/github/git.go b/vendor/github.com/google/go-github/v28/github/git.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/git.go rename to vendor/github.com/google/go-github/v28/github/git.go diff --git a/vendor/github.com/google/go-github/v25/github/git_blobs.go b/vendor/github.com/google/go-github/v28/github/git_blobs.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/git_blobs.go rename to vendor/github.com/google/go-github/v28/github/git_blobs.go diff --git a/vendor/github.com/google/go-github/v25/github/git_commits.go b/vendor/github.com/google/go-github/v28/github/git_commits.go similarity index 67% rename from vendor/github.com/google/go-github/v25/github/git_commits.go rename to vendor/github.com/google/go-github/v28/github/git_commits.go index 9dfd3afb3b..741961980a 100644 --- a/vendor/github.com/google/go-github/v25/github/git_commits.go +++ b/vendor/github.com/google/go-github/v28/github/git_commits.go @@ -6,9 +6,14 @@ package github import ( + "bytes" "context" + "errors" "fmt" + "strings" "time" + + "golang.org/x/crypto/openpgp" ) // SignatureVerification represents GPG signature verification. @@ -37,6 +42,11 @@ type Commit struct { // is only populated for requests that fetch GitHub data like // Pulls.ListCommits, Repositories.ListCommits, etc. CommentCount *int `json:"comment_count,omitempty"` + + // SigningKey denotes a key to sign the commit with. If not nil this key will + // be used to sign the commit. The private key must be present and already + // decrypted. Ignored if Verification.Signature is defined. + SigningKey *openpgp.Entity `json:"-"` } func (c Commit) String() string { @@ -116,6 +126,13 @@ func (s *GitService) CreateCommit(ctx context.Context, owner string, repo string if commit.Tree != nil { body.Tree = commit.Tree.SHA } + if commit.SigningKey != nil { + signature, err := createSignature(commit.SigningKey, body) + if err != nil { + return nil, nil, err + } + body.Signature = &signature + } if commit.Verification != nil { body.Signature = commit.Verification.Signature } @@ -133,3 +150,51 @@ func (s *GitService) CreateCommit(ctx context.Context, owner string, repo string return c, resp, nil } + +func createSignature(signingKey *openpgp.Entity, commit *createCommit) (string, error) { + if signingKey == nil || commit == nil { + return "", errors.New("createSignature: invalid parameters") + } + + message, err := createSignatureMessage(commit) + if err != nil { + return "", err + } + + writer := new(bytes.Buffer) + reader := bytes.NewReader([]byte(message)) + if err := openpgp.ArmoredDetachSign(writer, signingKey, reader, nil); err != nil { + return "", err + } + + return writer.String(), nil +} + +func createSignatureMessage(commit *createCommit) (string, error) { + if commit == nil || commit.Message == nil || *commit.Message == "" || commit.Author == nil { + return "", errors.New("createSignatureMessage: invalid parameters") + } + + var message []string + + if commit.Tree != nil { + message = append(message, fmt.Sprintf("tree %s", *commit.Tree)) + } + + for _, parent := range commit.Parents { + message = append(message, fmt.Sprintf("parent %s", parent)) + } + + message = append(message, fmt.Sprintf("author %s <%s> %d %s", commit.Author.GetName(), commit.Author.GetEmail(), commit.Author.GetDate().Unix(), commit.Author.GetDate().Format("-0700"))) + + committer := commit.Committer + if committer == nil { + committer = commit.Author + } + + // There needs to be a double newline after committer + message = append(message, fmt.Sprintf("committer %s <%s> %d %s\n", committer.GetName(), committer.GetEmail(), committer.GetDate().Unix(), committer.GetDate().Format("-0700"))) + message = append(message, *commit.Message) + + return strings.Join(message, "\n"), nil +} diff --git a/vendor/github.com/google/go-github/v25/github/git_refs.go b/vendor/github.com/google/go-github/v28/github/git_refs.go similarity index 96% rename from vendor/github.com/google/go-github/v25/github/git_refs.go rename to vendor/github.com/google/go-github/v28/github/git_refs.go index 3f381d5f2b..b51bcbf1de 100644 --- a/vendor/github.com/google/go-github/v25/github/git_refs.go +++ b/vendor/github.com/google/go-github/v28/github/git_refs.go @@ -68,7 +68,10 @@ func (s *GitService) GetRef(ctx context.Context, owner string, repo string, ref resp, err := s.client.Do(ctx, req, r) if _, ok := err.(*json.UnmarshalTypeError); ok { // Multiple refs, means there wasn't an exact match. - return nil, resp, errors.New("no exact match found for this ref") + return nil, resp, errors.New("multiple matches found for this ref") + } else if _, ok := err.(*ErrorResponse); ok && resp.StatusCode == 404 { + // No ref, there was no match for the ref + return nil, resp, errors.New("no match found for this ref") } else if err != nil { return nil, resp, err } diff --git a/vendor/github.com/google/go-github/v25/github/git_tags.go b/vendor/github.com/google/go-github/v28/github/git_tags.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/git_tags.go rename to vendor/github.com/google/go-github/v28/github/git_tags.go diff --git a/vendor/github.com/google/go-github/v25/github/git_trees.go b/vendor/github.com/google/go-github/v28/github/git_trees.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/git_trees.go rename to vendor/github.com/google/go-github/v28/github/git_trees.go diff --git a/vendor/github.com/google/go-github/v25/github/github-accessors.go b/vendor/github.com/google/go-github/v28/github/github-accessors.go similarity index 96% rename from vendor/github.com/google/go-github/v25/github/github-accessors.go rename to vendor/github.com/google/go-github/v28/github/github-accessors.go index ba872be39c..4873d98472 100644 --- a/vendor/github.com/google/go-github/v25/github/github-accessors.go +++ b/vendor/github.com/google/go-github/v28/github/github-accessors.go @@ -117,9 +117,9 @@ func (a *APIMeta) GetVerifiablePasswordAuthentication() bool { } // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (a *App) GetCreatedAt() time.Time { +func (a *App) GetCreatedAt() Timestamp { if a == nil || a.CreatedAt == nil { - return time.Time{} + return Timestamp{} } return *a.CreatedAt } @@ -181,9 +181,9 @@ func (a *App) GetOwner() *User { } // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (a *App) GetUpdatedAt() time.Time { +func (a *App) GetUpdatedAt() Timestamp { if a == nil || a.UpdatedAt == nil { - return time.Time{} + return Timestamp{} } return *a.UpdatedAt } @@ -644,6 +644,14 @@ func (c *CheckRunAnnotation) GetBlobHRef() string { return *c.BlobHRef } +// GetEndColumn returns the EndColumn field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetEndColumn() int { + if c == nil || c.EndColumn == nil { + return 0 + } + return *c.EndColumn +} + // GetEndLine returns the EndLine field if it's non-nil, zero value otherwise. func (c *CheckRunAnnotation) GetEndLine() int { if c == nil || c.EndLine == nil { @@ -676,6 +684,14 @@ func (c *CheckRunAnnotation) GetRawDetails() string { return *c.RawDetails } +// GetStartColumn returns the StartColumn field if it's non-nil, zero value otherwise. +func (c *CheckRunAnnotation) GetStartColumn() int { + if c == nil || c.StartColumn == nil { + return 0 + } + return *c.StartColumn +} + // GetStartLine returns the StartLine field if it's non-nil, zero value otherwise. func (c *CheckRunAnnotation) GetStartLine() int { if c == nil || c.StartLine == nil { @@ -3324,6 +3340,30 @@ func (h *HookStats) GetTotalHooks() int { return *h.TotalHooks } +// GetGroupDescription returns the GroupDescription field if it's non-nil, zero value otherwise. +func (i *IDPGroup) GetGroupDescription() string { + if i == nil || i.GroupDescription == nil { + return "" + } + return *i.GroupDescription +} + +// GetGroupID returns the GroupID field if it's non-nil, zero value otherwise. +func (i *IDPGroup) GetGroupID() string { + if i == nil || i.GroupID == nil { + return "" + } + return *i.GroupID +} + +// GetGroupName returns the GroupName field if it's non-nil, zero value otherwise. +func (i *IDPGroup) GetGroupName() string { + if i == nil || i.GroupName == nil { + return "" + } + return *i.GroupName +} + // GetAuthorsCount returns the AuthorsCount field if it's non-nil, zero value otherwise. func (i *Import) GetAuthorsCount() int { if i == nil || i.AuthorsCount == nil { @@ -3628,6 +3668,30 @@ func (i *InstallationEvent) GetSender() *User { return i.Sender } +// GetAdministration returns the Administration field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetAdministration() string { + if i == nil || i.Administration == nil { + return "" + } + return *i.Administration +} + +// GetChecks returns the Checks field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetChecks() string { + if i == nil || i.Checks == nil { + return "" + } + return *i.Checks +} + +// GetContentReferences returns the ContentReferences field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetContentReferences() string { + if i == nil || i.ContentReferences == nil { + return "" + } + return *i.ContentReferences +} + // GetContents returns the Contents field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetContents() string { if i == nil || i.Contents == nil { @@ -3636,6 +3700,14 @@ func (i *InstallationPermissions) GetContents() string { return *i.Contents } +// GetDeployments returns the Deployments field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetDeployments() string { + if i == nil || i.Deployments == nil { + return "" + } + return *i.Deployments +} + // GetIssues returns the Issues field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetIssues() string { if i == nil || i.Issues == nil { @@ -3644,6 +3716,14 @@ func (i *InstallationPermissions) GetIssues() string { return *i.Issues } +// GetMembers returns the Members field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetMembers() string { + if i == nil || i.Members == nil { + return "" + } + return *i.Members +} + // GetMetadata returns the Metadata field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetMetadata() string { if i == nil || i.Metadata == nil { @@ -3652,6 +3732,102 @@ func (i *InstallationPermissions) GetMetadata() string { return *i.Metadata } +// GetOrganizationAdministration returns the OrganizationAdministration field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationAdministration() string { + if i == nil || i.OrganizationAdministration == nil { + return "" + } + return *i.OrganizationAdministration +} + +// GetOrganizationHooks returns the OrganizationHooks field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationHooks() string { + if i == nil || i.OrganizationHooks == nil { + return "" + } + return *i.OrganizationHooks +} + +// GetOrganizationPlan returns the OrganizationPlan field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationPlan() string { + if i == nil || i.OrganizationPlan == nil { + return "" + } + return *i.OrganizationPlan +} + +// GetOrganizationPreReceiveHooks returns the OrganizationPreReceiveHooks field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationPreReceiveHooks() string { + if i == nil || i.OrganizationPreReceiveHooks == nil { + return "" + } + return *i.OrganizationPreReceiveHooks +} + +// GetOrganizationProjects returns the OrganizationProjects field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationProjects() string { + if i == nil || i.OrganizationProjects == nil { + return "" + } + return *i.OrganizationProjects +} + +// GetOrganizationUserBlocking returns the OrganizationUserBlocking field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetOrganizationUserBlocking() string { + if i == nil || i.OrganizationUserBlocking == nil { + return "" + } + return *i.OrganizationUserBlocking +} + +// GetPackages returns the Packages field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetPackages() string { + if i == nil || i.Packages == nil { + return "" + } + return *i.Packages +} + +// GetPages returns the Pages field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetPages() string { + if i == nil || i.Pages == nil { + return "" + } + return *i.Pages +} + +// GetPullRequests returns the PullRequests field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetPullRequests() string { + if i == nil || i.PullRequests == nil { + return "" + } + return *i.PullRequests +} + +// GetRepositoryHooks returns the RepositoryHooks field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetRepositoryHooks() string { + if i == nil || i.RepositoryHooks == nil { + return "" + } + return *i.RepositoryHooks +} + +// GetRepositoryPreReceiveHooks returns the RepositoryPreReceiveHooks field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetRepositoryPreReceiveHooks() string { + if i == nil || i.RepositoryPreReceiveHooks == nil { + return "" + } + return *i.RepositoryPreReceiveHooks +} + +// GetRepositoryProjects returns the RepositoryProjects field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetRepositoryProjects() string { + if i == nil || i.RepositoryProjects == nil { + return "" + } + return *i.RepositoryProjects +} + // GetSingleFile returns the SingleFile field if it's non-nil, zero value otherwise. func (i *InstallationPermissions) GetSingleFile() string { if i == nil || i.SingleFile == nil { @@ -3660,6 +3836,30 @@ func (i *InstallationPermissions) GetSingleFile() string { return *i.SingleFile } +// GetStatuses returns the Statuses field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetStatuses() string { + if i == nil || i.Statuses == nil { + return "" + } + return *i.Statuses +} + +// GetTeamDiscussions returns the TeamDiscussions field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetTeamDiscussions() string { + if i == nil || i.TeamDiscussions == nil { + return "" + } + return *i.TeamDiscussions +} + +// GetVulnerabilityAlerts returns the VulnerabilityAlerts field if it's non-nil, zero value otherwise. +func (i *InstallationPermissions) GetVulnerabilityAlerts() string { + if i == nil || i.VulnerabilityAlerts == nil { + return "" + } + return *i.VulnerabilityAlerts +} + // GetAction returns the Action field if it's non-nil, zero value otherwise. func (i *InstallationRepositoriesEvent) GetAction() string { if i == nil || i.Action == nil { @@ -3700,6 +3900,14 @@ func (i *InstallationToken) GetExpiresAt() time.Time { return *i.ExpiresAt } +// GetPermissions returns the Permissions field. +func (i *InstallationToken) GetPermissions() *InstallationPermissions { + if i == nil { + return nil + } + return i.Permissions +} + // GetToken returns the Token field if it's non-nil, zero value otherwise. func (i *InstallationToken) GetToken() string { if i == nil || i.Token == nil { @@ -3708,6 +3916,14 @@ func (i *InstallationToken) GetToken() string { return *i.Token } +// GetPermissions returns the Permissions field. +func (i *InstallationTokenOptions) GetPermissions() *InstallationPermissions { + if i == nil { + return nil + } + return i.Permissions +} + // GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. func (i *InteractionRestriction) GetExpiresAt() Timestamp { if i == nil || i.ExpiresAt == nil { @@ -4428,6 +4644,14 @@ func (i *IssueStats) GetTotalIssues() int { return *i.TotalIssues } +// GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. +func (k *Key) GetCreatedAt() Timestamp { + if k == nil || k.CreatedAt == nil { + return Timestamp{} + } + return *k.CreatedAt +} + // GetID returns the ID field if it's non-nil, zero value otherwise. func (k *Key) GetID() int64 { if k == nil || k.ID == nil { @@ -5972,6 +6196,14 @@ func (o *Organization) GetLogin() string { return *o.Login } +// GetMembersAllowedRepositoryCreationType returns the MembersAllowedRepositoryCreationType field if it's non-nil, zero value otherwise. +func (o *Organization) GetMembersAllowedRepositoryCreationType() string { + if o == nil || o.MembersAllowedRepositoryCreationType == nil { + return "" + } + return *o.MembersAllowedRepositoryCreationType +} + // GetMembersCanCreateRepos returns the MembersCanCreateRepos field if it's non-nil, zero value otherwise. func (o *Organization) GetMembersCanCreateRepos() bool { if o == nil || o.MembersCanCreateRepos == nil { @@ -7428,6 +7660,14 @@ func (p *PullRequest) GetLinks() *PRLinks { return p.Links } +// GetLocked returns the Locked field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetLocked() bool { + if p == nil || p.Locked == nil { + return false + } + return *p.Locked +} + // GetMaintainerCanModify returns the MaintainerCanModify field if it's non-nil, zero value otherwise. func (p *PullRequest) GetMaintainerCanModify() bool { if p == nil || p.MaintainerCanModify == nil { @@ -7516,6 +7756,14 @@ func (p *PullRequest) GetPatchURL() string { return *p.PatchURL } +// GetRebaseable returns the Rebaseable field if it's non-nil, zero value otherwise. +func (p *PullRequest) GetRebaseable() bool { + if p == nil || p.Rebaseable == nil { + return false + } + return *p.Rebaseable +} + // GetReviewComments returns the ReviewComments field if it's non-nil, zero value otherwise. func (p *PullRequest) GetReviewComments() int { if p == nil || p.ReviewComments == nil { @@ -8668,6 +8916,14 @@ func (p *PushEventRepository) GetPrivate() bool { return *p.Private } +// GetPullsURL returns the PullsURL field if it's non-nil, zero value otherwise. +func (p *PushEventRepository) GetPullsURL() string { + if p == nil || p.PullsURL == nil { + return "" + } + return *p.PullsURL +} + // GetPushedAt returns the PushedAt field if it's non-nil, zero value otherwise. func (p *PushEventRepository) GetPushedAt() Timestamp { if p == nil || p.PushedAt == nil { @@ -9420,6 +9676,14 @@ func (r *Repository) GetIssuesURL() string { return *r.IssuesURL } +// GetIsTemplate returns the IsTemplate field if it's non-nil, zero value otherwise. +func (r *Repository) GetIsTemplate() bool { + if r == nil || r.IsTemplate == nil { + return false + } + return *r.IsTemplate +} + // GetKeysURL returns the KeysURL field if it's non-nil, zero value otherwise. func (r *Repository) GetKeysURL() string { if r == nil || r.KeysURL == nil { @@ -9708,6 +9972,14 @@ func (r *Repository) GetTeamsURL() string { return *r.TeamsURL } +// GetTemplateRepository returns the TemplateRepository field. +func (r *Repository) GetTemplateRepository() *Repository { + if r == nil { + return nil + } + return r.TemplateRepository +} + // GetTreesURL returns the TreesURL field if it's non-nil, zero value otherwise. func (r *Repository) GetTreesURL() string { if r == nil || r.TreesURL == nil { @@ -9780,6 +10052,14 @@ func (r *RepositoryComment) GetID() int64 { return *r.ID } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *RepositoryComment) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + // GetPath returns the Path field if it's non-nil, zero value otherwise. func (r *RepositoryComment) GetPath() string { if r == nil || r.Path == nil { @@ -11468,6 +11748,38 @@ func (t *TeamProjectOptions) GetPermission() string { return *t.Permission } +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (t *TemplateRepoRequest) GetDescription() string { + if t == nil || t.Description == nil { + return "" + } + return *t.Description +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (t *TemplateRepoRequest) GetName() string { + if t == nil || t.Name == nil { + return "" + } + return *t.Name +} + +// GetOwner returns the Owner field if it's non-nil, zero value otherwise. +func (t *TemplateRepoRequest) GetOwner() string { + if t == nil || t.Owner == nil { + return "" + } + return *t.Owner +} + +// GetPrivate returns the Private field if it's non-nil, zero value otherwise. +func (t *TemplateRepoRequest) GetPrivate() bool { + if t == nil || t.Private == nil { + return false + } + return *t.Private +} + // GetFragment returns the Fragment field if it's non-nil, zero value otherwise. func (t *TextMatch) GetFragment() string { if t == nil || t.Fragment == nil { @@ -11996,6 +12308,14 @@ func (u *User) GetID() int64 { return *u.ID } +// GetLdapDn returns the LdapDn field if it's non-nil, zero value otherwise. +func (u *User) GetLdapDn() string { + if u == nil || u.LdapDn == nil { + return "" + } + return *u.LdapDn +} + // GetLocation returns the Location field if it's non-nil, zero value otherwise. func (u *User) GetLocation() string { if u == nil || u.Location == nil { @@ -12212,6 +12532,14 @@ func (u *UserEmail) GetVerified() bool { return *u.Verified } +// GetVisibility returns the Visibility field if it's non-nil, zero value otherwise. +func (u *UserEmail) GetVisibility() string { + if u == nil || u.Visibility == nil { + return "" + } + return *u.Visibility +} + // GetAvatarURL returns the AvatarURL field if it's non-nil, zero value otherwise. func (u *UserLDAPMapping) GetAvatarURL() string { if u == nil || u.AvatarURL == nil { diff --git a/vendor/github.com/google/go-github/v25/github/github.go b/vendor/github.com/google/go-github/v28/github/github.go similarity index 97% rename from vendor/github.com/google/go-github/v25/github/github.go rename to vendor/github.com/google/go-github/v28/github/github.go index 63f8a96643..6ab801f228 100644 --- a/vendor/github.com/google/go-github/v25/github/github.go +++ b/vendor/github.com/google/go-github/v28/github/github.go @@ -4,6 +4,7 @@ // license that can be found in the LICENSE file. //go:generate go run gen-accessors.go +//go:generate go run gen-stringify-test.go package github @@ -138,11 +139,23 @@ const ( // https://developer.github.com/changes/2019-04-24-vulnerability-alerts/ mediaTypeRequiredVulnerabilityAlertsPreview = "application/vnd.github.dorian-preview+json" + // https://developer.github.com/changes/2019-06-04-automated-security-fixes/ + mediaTypeRequiredAutomatedSecurityFixesPreview = "application/vnd.github.london-preview+json" + // https://developer.github.com/changes/2019-05-29-update-branch-api/ mediaTypeUpdatePullRequestBranchPreview = "application/vnd.github.lydian-preview+json" // https://developer.github.com/changes/2019-04-11-pulls-branches-for-commit/ mediaTypeListPullsOrBranchesForCommitPreview = "application/vnd.github.groot-preview+json" + + // https://developer.github.com/changes/2019-06-12-team-sync/ + mediaTypeTeamSyncPreview = "application/vnd.github.team-sync-preview+json" + + // https://developer.github.com/v3/previews/#repository-creation-permissions + mediaTypeMemberAllowedRepoCreationTypePreview = "application/vnd.github.surtur-preview+json" + + // https://developer.github.com/v3/previews/#create-and-use-repository-templates + mediaTypeRepositoryTemplatePreview = "application/vnd.github.baptiste-preview+json" ) // A Client manages communication with the GitHub API. @@ -636,7 +649,7 @@ type RateLimitError struct { func (r *RateLimitError) Error() string { return fmt.Sprintf("%v %v: %d %v %v", r.Response.Request.Method, sanitizeURL(r.Response.Request.URL), - r.Response.StatusCode, r.Message, formatRateReset(r.Rate.Reset.Time.Sub(time.Now()))) + r.Response.StatusCode, r.Message, formatRateReset(time.Until(r.Rate.Reset.Time))) } // AcceptedError occurs when GitHub returns 202 Accepted response with an diff --git a/vendor/github.com/google/go-github/v25/github/gitignore.go b/vendor/github.com/google/go-github/v28/github/gitignore.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/gitignore.go rename to vendor/github.com/google/go-github/v28/github/gitignore.go diff --git a/vendor/github.com/google/go-github/v25/github/interactions.go b/vendor/github.com/google/go-github/v28/github/interactions.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/interactions.go rename to vendor/github.com/google/go-github/v28/github/interactions.go diff --git a/vendor/github.com/google/go-github/v25/github/interactions_orgs.go b/vendor/github.com/google/go-github/v28/github/interactions_orgs.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/interactions_orgs.go rename to vendor/github.com/google/go-github/v28/github/interactions_orgs.go diff --git a/vendor/github.com/google/go-github/v25/github/interactions_repos.go b/vendor/github.com/google/go-github/v28/github/interactions_repos.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/interactions_repos.go rename to vendor/github.com/google/go-github/v28/github/interactions_repos.go diff --git a/vendor/github.com/google/go-github/v25/github/issues.go b/vendor/github.com/google/go-github/v28/github/issues.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/issues.go rename to vendor/github.com/google/go-github/v28/github/issues.go diff --git a/vendor/github.com/google/go-github/v25/github/issues_assignees.go b/vendor/github.com/google/go-github/v28/github/issues_assignees.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/issues_assignees.go rename to vendor/github.com/google/go-github/v28/github/issues_assignees.go diff --git a/vendor/github.com/google/go-github/v25/github/issues_comments.go b/vendor/github.com/google/go-github/v28/github/issues_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/issues_comments.go rename to vendor/github.com/google/go-github/v28/github/issues_comments.go diff --git a/vendor/github.com/google/go-github/v25/github/issues_events.go b/vendor/github.com/google/go-github/v28/github/issues_events.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/issues_events.go rename to vendor/github.com/google/go-github/v28/github/issues_events.go diff --git a/vendor/github.com/google/go-github/v25/github/issues_labels.go b/vendor/github.com/google/go-github/v28/github/issues_labels.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/issues_labels.go rename to vendor/github.com/google/go-github/v28/github/issues_labels.go diff --git a/vendor/github.com/google/go-github/v25/github/issues_milestones.go b/vendor/github.com/google/go-github/v28/github/issues_milestones.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/issues_milestones.go rename to vendor/github.com/google/go-github/v28/github/issues_milestones.go diff --git a/vendor/github.com/google/go-github/v25/github/issues_timeline.go b/vendor/github.com/google/go-github/v28/github/issues_timeline.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/issues_timeline.go rename to vendor/github.com/google/go-github/v28/github/issues_timeline.go diff --git a/vendor/github.com/google/go-github/v25/github/licenses.go b/vendor/github.com/google/go-github/v28/github/licenses.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/licenses.go rename to vendor/github.com/google/go-github/v28/github/licenses.go diff --git a/vendor/github.com/google/go-github/v25/github/messages.go b/vendor/github.com/google/go-github/v28/github/messages.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/messages.go rename to vendor/github.com/google/go-github/v28/github/messages.go diff --git a/vendor/github.com/google/go-github/v25/github/migrations.go b/vendor/github.com/google/go-github/v28/github/migrations.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/migrations.go rename to vendor/github.com/google/go-github/v28/github/migrations.go diff --git a/vendor/github.com/google/go-github/v25/github/migrations_source_import.go b/vendor/github.com/google/go-github/v28/github/migrations_source_import.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/migrations_source_import.go rename to vendor/github.com/google/go-github/v28/github/migrations_source_import.go diff --git a/vendor/github.com/google/go-github/v25/github/migrations_user.go b/vendor/github.com/google/go-github/v28/github/migrations_user.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/migrations_user.go rename to vendor/github.com/google/go-github/v28/github/migrations_user.go diff --git a/vendor/github.com/google/go-github/v25/github/misc.go b/vendor/github.com/google/go-github/v28/github/misc.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/misc.go rename to vendor/github.com/google/go-github/v28/github/misc.go diff --git a/vendor/github.com/google/go-github/v25/github/orgs.go b/vendor/github.com/google/go-github/v28/github/orgs.go similarity index 94% rename from vendor/github.com/google/go-github/v25/github/orgs.go rename to vendor/github.com/google/go-github/v28/github/orgs.go index c70039ba08..e1aa20db0b 100644 --- a/vendor/github.com/google/go-github/v25/github/orgs.go +++ b/vendor/github.com/google/go-github/v28/github/orgs.go @@ -56,6 +56,10 @@ type Organization struct { // MembersCanCreateRepos default value is true and is only used in Organizations.Edit. MembersCanCreateRepos *bool `json:"members_can_create_repositories,omitempty"` + // MembersAllowedRepositoryCreationType denotes if organization members can create repositories + // and the type of repositories they can create. Possible values are: "all", "private", or "none". + MembersAllowedRepositoryCreationType *string `json:"members_allowed_repository_creation_type,omitempty"` + // API URLs URL *string `json:"url,omitempty"` EventsURL *string `json:"events_url,omitempty"` @@ -160,6 +164,9 @@ func (s *OrganizationsService) Get(ctx context.Context, org string) (*Organizati return nil, nil, err } + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeMemberAllowedRepoCreationTypePreview) + organization := new(Organization) resp, err := s.client.Do(ctx, req, organization) if err != nil { diff --git a/vendor/github.com/google/go-github/v25/github/orgs_hooks.go b/vendor/github.com/google/go-github/v28/github/orgs_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/orgs_hooks.go rename to vendor/github.com/google/go-github/v28/github/orgs_hooks.go diff --git a/vendor/github.com/google/go-github/v25/github/orgs_members.go b/vendor/github.com/google/go-github/v28/github/orgs_members.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/orgs_members.go rename to vendor/github.com/google/go-github/v28/github/orgs_members.go diff --git a/vendor/github.com/google/go-github/v25/github/orgs_outside_collaborators.go b/vendor/github.com/google/go-github/v28/github/orgs_outside_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/orgs_outside_collaborators.go rename to vendor/github.com/google/go-github/v28/github/orgs_outside_collaborators.go diff --git a/vendor/github.com/google/go-github/v25/github/orgs_projects.go b/vendor/github.com/google/go-github/v28/github/orgs_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/orgs_projects.go rename to vendor/github.com/google/go-github/v28/github/orgs_projects.go diff --git a/vendor/github.com/google/go-github/v25/github/orgs_users_blocking.go b/vendor/github.com/google/go-github/v28/github/orgs_users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/orgs_users_blocking.go rename to vendor/github.com/google/go-github/v28/github/orgs_users_blocking.go diff --git a/vendor/github.com/google/go-github/v25/github/projects.go b/vendor/github.com/google/go-github/v28/github/projects.go similarity index 99% rename from vendor/github.com/google/go-github/v25/github/projects.go rename to vendor/github.com/google/go-github/v28/github/projects.go index c7a68f53d9..1e9620dfd9 100644 --- a/vendor/github.com/google/go-github/v25/github/projects.go +++ b/vendor/github.com/google/go-github/v28/github/projects.go @@ -344,8 +344,8 @@ func (s *ProjectsService) ListProjectCards(ctx context.Context, columnID int64, // GetProjectCard gets a card in a column of a GitHub Project. // // GitHub API docs: https://developer.github.com/v3/projects/cards/#get-a-project-card -func (s *ProjectsService) GetProjectCard(ctx context.Context, columnID int64) (*ProjectCard, *Response, error) { - u := fmt.Sprintf("projects/columns/cards/%v", columnID) +func (s *ProjectsService) GetProjectCard(ctx context.Context, cardID int64) (*ProjectCard, *Response, error) { + u := fmt.Sprintf("projects/columns/cards/%v", cardID) req, err := s.client.NewRequest("GET", u, nil) if err != nil { return nil, nil, err diff --git a/vendor/github.com/google/go-github/v25/github/pulls.go b/vendor/github.com/google/go-github/v28/github/pulls.go similarity index 99% rename from vendor/github.com/google/go-github/v25/github/pulls.go rename to vendor/github.com/google/go-github/v28/github/pulls.go index a06f97bcfd..e022692d42 100644 --- a/vendor/github.com/google/go-github/v25/github/pulls.go +++ b/vendor/github.com/google/go-github/v28/github/pulls.go @@ -24,6 +24,7 @@ type PullRequest struct { ID *int64 `json:"id,omitempty"` Number *int `json:"number,omitempty"` State *string `json:"state,omitempty"` + Locked *bool `json:"locked,omitempty"` Title *string `json:"title,omitempty"` Body *string `json:"body,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` @@ -38,6 +39,7 @@ type PullRequest struct { MergeableState *string `json:"mergeable_state,omitempty"` MergedBy *User `json:"merged_by,omitempty"` MergeCommitSHA *string `json:"merge_commit_sha,omitempty"` + Rebaseable *bool `json:"rebaseable,omitempty"` Comments *int `json:"comments,omitempty"` Commits *int `json:"commits,omitempty"` Additions *int `json:"additions,omitempty"` diff --git a/vendor/github.com/google/go-github/v25/github/pulls_comments.go b/vendor/github.com/google/go-github/v28/github/pulls_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/pulls_comments.go rename to vendor/github.com/google/go-github/v28/github/pulls_comments.go diff --git a/vendor/github.com/google/go-github/v25/github/pulls_reviewers.go b/vendor/github.com/google/go-github/v28/github/pulls_reviewers.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/pulls_reviewers.go rename to vendor/github.com/google/go-github/v28/github/pulls_reviewers.go diff --git a/vendor/github.com/google/go-github/v25/github/pulls_reviews.go b/vendor/github.com/google/go-github/v28/github/pulls_reviews.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/pulls_reviews.go rename to vendor/github.com/google/go-github/v28/github/pulls_reviews.go diff --git a/vendor/github.com/google/go-github/v25/github/reactions.go b/vendor/github.com/google/go-github/v28/github/reactions.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/reactions.go rename to vendor/github.com/google/go-github/v28/github/reactions.go diff --git a/vendor/github.com/google/go-github/v25/github/repos.go b/vendor/github.com/google/go-github/v28/github/repos.go similarity index 89% rename from vendor/github.com/google/go-github/v25/github/repos.go rename to vendor/github.com/google/go-github/v28/github/repos.go index 154d28bb56..a380f3028c 100644 --- a/vendor/github.com/google/go-github/v25/github/repos.go +++ b/vendor/github.com/google/go-github/v28/github/repos.go @@ -19,45 +19,46 @@ type RepositoriesService service // Repository represents a GitHub repository. type Repository struct { - ID *int64 `json:"id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Owner *User `json:"owner,omitempty"` - Name *string `json:"name,omitempty"` - FullName *string `json:"full_name,omitempty"` - Description *string `json:"description,omitempty"` - Homepage *string `json:"homepage,omitempty"` - CodeOfConduct *CodeOfConduct `json:"code_of_conduct,omitempty"` - DefaultBranch *string `json:"default_branch,omitempty"` - MasterBranch *string `json:"master_branch,omitempty"` - CreatedAt *Timestamp `json:"created_at,omitempty"` - PushedAt *Timestamp `json:"pushed_at,omitempty"` - UpdatedAt *Timestamp `json:"updated_at,omitempty"` - HTMLURL *string `json:"html_url,omitempty"` - CloneURL *string `json:"clone_url,omitempty"` - GitURL *string `json:"git_url,omitempty"` - MirrorURL *string `json:"mirror_url,omitempty"` - SSHURL *string `json:"ssh_url,omitempty"` - SVNURL *string `json:"svn_url,omitempty"` - Language *string `json:"language,omitempty"` - Fork *bool `json:"fork,omitempty"` - ForksCount *int `json:"forks_count,omitempty"` - NetworkCount *int `json:"network_count,omitempty"` - OpenIssuesCount *int `json:"open_issues_count,omitempty"` - StargazersCount *int `json:"stargazers_count,omitempty"` - SubscribersCount *int `json:"subscribers_count,omitempty"` - WatchersCount *int `json:"watchers_count,omitempty"` - Size *int `json:"size,omitempty"` - AutoInit *bool `json:"auto_init,omitempty"` - Parent *Repository `json:"parent,omitempty"` - Source *Repository `json:"source,omitempty"` - Organization *Organization `json:"organization,omitempty"` - Permissions *map[string]bool `json:"permissions,omitempty"` - AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` - AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` - AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` - Topics []string `json:"topics,omitempty"` - Archived *bool `json:"archived,omitempty"` - Disabled *bool `json:"disabled,omitempty"` + ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Owner *User `json:"owner,omitempty"` + Name *string `json:"name,omitempty"` + FullName *string `json:"full_name,omitempty"` + Description *string `json:"description,omitempty"` + Homepage *string `json:"homepage,omitempty"` + CodeOfConduct *CodeOfConduct `json:"code_of_conduct,omitempty"` + DefaultBranch *string `json:"default_branch,omitempty"` + MasterBranch *string `json:"master_branch,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` + PushedAt *Timestamp `json:"pushed_at,omitempty"` + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + HTMLURL *string `json:"html_url,omitempty"` + CloneURL *string `json:"clone_url,omitempty"` + GitURL *string `json:"git_url,omitempty"` + MirrorURL *string `json:"mirror_url,omitempty"` + SSHURL *string `json:"ssh_url,omitempty"` + SVNURL *string `json:"svn_url,omitempty"` + Language *string `json:"language,omitempty"` + Fork *bool `json:"fork,omitempty"` + ForksCount *int `json:"forks_count,omitempty"` + NetworkCount *int `json:"network_count,omitempty"` + OpenIssuesCount *int `json:"open_issues_count,omitempty"` + StargazersCount *int `json:"stargazers_count,omitempty"` + SubscribersCount *int `json:"subscribers_count,omitempty"` + WatchersCount *int `json:"watchers_count,omitempty"` + Size *int `json:"size,omitempty"` + AutoInit *bool `json:"auto_init,omitempty"` + Parent *Repository `json:"parent,omitempty"` + Source *Repository `json:"source,omitempty"` + TemplateRepository *Repository `json:"template_repository,omitempty"` + Organization *Organization `json:"organization,omitempty"` + Permissions *map[string]bool `json:"permissions,omitempty"` + AllowRebaseMerge *bool `json:"allow_rebase_merge,omitempty"` + AllowSquashMerge *bool `json:"allow_squash_merge,omitempty"` + AllowMergeCommit *bool `json:"allow_merge_commit,omitempty"` + Topics []string `json:"topics,omitempty"` + Archived *bool `json:"archived,omitempty"` + Disabled *bool `json:"disabled,omitempty"` // Only provided when using RepositoriesService.Get while in preview License *License `json:"license,omitempty"` @@ -69,6 +70,7 @@ type Repository struct { HasPages *bool `json:"has_pages,omitempty"` HasProjects *bool `json:"has_projects,omitempty"` HasDownloads *bool `json:"has_downloads,omitempty"` + IsTemplate *bool `json:"is_template,omitempty"` LicenseTemplate *string `json:"license_template,omitempty"` GitignoreTemplate *string `json:"gitignore_template,omitempty"` @@ -275,6 +277,7 @@ type createRepoRequest struct { HasIssues *bool `json:"has_issues,omitempty"` HasProjects *bool `json:"has_projects,omitempty"` HasWiki *bool `json:"has_wiki,omitempty"` + IsTemplate *bool `json:"is_template,omitempty"` // Creating an organization repository. Required for non-owners. TeamID *int64 `json:"team_id,omitempty"` @@ -311,6 +314,7 @@ func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repo HasIssues: repo.HasIssues, HasProjects: repo.HasProjects, HasWiki: repo.HasWiki, + IsTemplate: repo.IsTemplate, TeamID: repo.TeamID, AutoInit: repo.AutoInit, GitignoreTemplate: repo.GitignoreTemplate, @@ -325,6 +329,38 @@ func (s *RepositoriesService) Create(ctx context.Context, org string, repo *Repo return nil, nil, err } + req.Header.Set("Accept", mediaTypeRepositoryTemplatePreview) + r := new(Repository) + resp, err := s.client.Do(ctx, req, r) + if err != nil { + return nil, resp, err + } + + return r, resp, nil +} + +// TemplateRepoRequest represents a request to create a repository from a template. +type TemplateRepoRequest struct { + // Name is required when creating a repo. + Name *string `json:"name,omitempty"` + Owner *string `json:"owner,omitempty"` + Description *string `json:"description,omitempty"` + + Private *bool `json:"private,omitempty"` +} + +// CreateFromTemplate generates a repository from a template. +// +// GitHub API docs: https://developer.github.com/v3/repos/#create-repository-using-a-repository-template +func (s *RepositoriesService) CreateFromTemplate(ctx context.Context, templateOwner, templateRepo string, templateRepoReq *TemplateRepoRequest) (*Repository, *Response, error) { + u := fmt.Sprintf("repos/%v/%v/generate", templateOwner, templateRepo) + + req, err := s.client.NewRequest("POST", u, templateRepoReq) + if err != nil { + return nil, nil, err + } + + req.Header.Set("Accept", mediaTypeRepositoryTemplatePreview) r := new(Repository) resp, err := s.client.Do(ctx, req, r) if err != nil { @@ -346,7 +382,7 @@ func (s *RepositoriesService) Get(ctx context.Context, owner, repo string) (*Rep // TODO: remove custom Accept header when the license support fully launches // https://developer.github.com/v3/licenses/#get-a-repositorys-license - acceptHeaders := []string{mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview} + acceptHeaders := []string{mediaTypeCodesOfConductPreview, mediaTypeTopicsPreview, mediaTypeRepositoryTemplatePreview} req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) repository := new(Repository) @@ -409,6 +445,7 @@ func (s *RepositoriesService) Edit(ctx context.Context, owner, repo string, repo return nil, nil, err } + req.Header.Set("Accept", mediaTypeRepositoryTemplatePreview) r := new(Repository) resp, err := s.client.Do(ctx, req, r) if err != nil { @@ -496,6 +533,40 @@ func (s *RepositoriesService) DisableVulnerabilityAlerts(ctx context.Context, ow return s.client.Do(ctx, req, nil) } +// EnableAutomatedSecurityFixes enables the automated security fixes for a repository. +// +// GitHub API docs: https://developer.github.com/v3/repos/#enable-automated-security-fixes +func (s *RepositoriesService) EnableAutomatedSecurityFixes(ctx context.Context, owner, repository string) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/automated-security-fixes", owner, repository) + + req, err := s.client.NewRequest("PUT", u, nil) + if err != nil { + return nil, err + } + + // TODO: remove custom Accept header when this API fully launches + req.Header.Set("Accept", mediaTypeRequiredAutomatedSecurityFixesPreview) + + return s.client.Do(ctx, req, nil) +} + +// DisableAutomatedSecurityFixes disables vulnerability alerts and the dependency graph for a repository. +// +// GitHub API docs: https://developer.github.com/v3/repos/#disable-automated-security-fixes +func (s *RepositoriesService) DisableAutomatedSecurityFixes(ctx context.Context, owner, repository string) (*Response, error) { + u := fmt.Sprintf("repos/%v/%v/automated-security-fixes", owner, repository) + + req, err := s.client.NewRequest("DELETE", u, nil) + if err != nil { + return nil, err + } + + // TODO: remove custom Accept header when this API fully launches + req.Header.Set("Accept", mediaTypeRequiredAutomatedSecurityFixesPreview) + + return s.client.Do(ctx, req, nil) +} + // ListContributors lists contributors for a repository. // // GitHub API docs: https://developer.github.com/v3/repos/#list-contributors diff --git a/vendor/github.com/google/go-github/v25/github/repos_collaborators.go b/vendor/github.com/google/go-github/v28/github/repos_collaborators.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_collaborators.go rename to vendor/github.com/google/go-github/v28/github/repos_collaborators.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_comments.go b/vendor/github.com/google/go-github/v28/github/repos_comments.go similarity index 99% rename from vendor/github.com/google/go-github/v25/github/repos_comments.go rename to vendor/github.com/google/go-github/v28/github/repos_comments.go index fa2377d403..380ca3d3b4 100644 --- a/vendor/github.com/google/go-github/v25/github/repos_comments.go +++ b/vendor/github.com/google/go-github/v28/github/repos_comments.go @@ -16,6 +16,7 @@ type RepositoryComment struct { HTMLURL *string `json:"html_url,omitempty"` URL *string `json:"url,omitempty"` ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` CommitID *string `json:"commit_id,omitempty"` User *User `json:"user,omitempty"` Reactions *Reactions `json:"reactions,omitempty"` diff --git a/vendor/github.com/google/go-github/v25/github/repos_commits.go b/vendor/github.com/google/go-github/v28/github/repos_commits.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_commits.go rename to vendor/github.com/google/go-github/v28/github/repos_commits.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_community_health.go b/vendor/github.com/google/go-github/v28/github/repos_community_health.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_community_health.go rename to vendor/github.com/google/go-github/v28/github/repos_community_health.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_contents.go b/vendor/github.com/google/go-github/v28/github/repos_contents.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_contents.go rename to vendor/github.com/google/go-github/v28/github/repos_contents.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_deployments.go b/vendor/github.com/google/go-github/v28/github/repos_deployments.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_deployments.go rename to vendor/github.com/google/go-github/v28/github/repos_deployments.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_forks.go b/vendor/github.com/google/go-github/v28/github/repos_forks.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_forks.go rename to vendor/github.com/google/go-github/v28/github/repos_forks.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_hooks.go b/vendor/github.com/google/go-github/v28/github/repos_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_hooks.go rename to vendor/github.com/google/go-github/v28/github/repos_hooks.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_invitations.go b/vendor/github.com/google/go-github/v28/github/repos_invitations.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_invitations.go rename to vendor/github.com/google/go-github/v28/github/repos_invitations.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_keys.go b/vendor/github.com/google/go-github/v28/github/repos_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_keys.go rename to vendor/github.com/google/go-github/v28/github/repos_keys.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_merging.go b/vendor/github.com/google/go-github/v28/github/repos_merging.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_merging.go rename to vendor/github.com/google/go-github/v28/github/repos_merging.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_pages.go b/vendor/github.com/google/go-github/v28/github/repos_pages.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_pages.go rename to vendor/github.com/google/go-github/v28/github/repos_pages.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_prereceive_hooks.go b/vendor/github.com/google/go-github/v28/github/repos_prereceive_hooks.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_prereceive_hooks.go rename to vendor/github.com/google/go-github/v28/github/repos_prereceive_hooks.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_projects.go b/vendor/github.com/google/go-github/v28/github/repos_projects.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_projects.go rename to vendor/github.com/google/go-github/v28/github/repos_projects.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_releases.go b/vendor/github.com/google/go-github/v28/github/repos_releases.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_releases.go rename to vendor/github.com/google/go-github/v28/github/repos_releases.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_stats.go b/vendor/github.com/google/go-github/v28/github/repos_stats.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_stats.go rename to vendor/github.com/google/go-github/v28/github/repos_stats.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_statuses.go b/vendor/github.com/google/go-github/v28/github/repos_statuses.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_statuses.go rename to vendor/github.com/google/go-github/v28/github/repos_statuses.go diff --git a/vendor/github.com/google/go-github/v25/github/repos_traffic.go b/vendor/github.com/google/go-github/v28/github/repos_traffic.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/repos_traffic.go rename to vendor/github.com/google/go-github/v28/github/repos_traffic.go diff --git a/vendor/github.com/google/go-github/v25/github/search.go b/vendor/github.com/google/go-github/v28/github/search.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/search.go rename to vendor/github.com/google/go-github/v28/github/search.go diff --git a/vendor/github.com/google/go-github/v25/github/strings.go b/vendor/github.com/google/go-github/v28/github/strings.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/strings.go rename to vendor/github.com/google/go-github/v28/github/strings.go diff --git a/vendor/github.com/google/go-github/v25/github/teams.go b/vendor/github.com/google/go-github/v28/github/teams.go similarity index 85% rename from vendor/github.com/google/go-github/v25/github/teams.go rename to vendor/github.com/google/go-github/v28/github/teams.go index a8247a3b7c..b4953e6387 100644 --- a/vendor/github.com/google/go-github/v25/github/teams.go +++ b/vendor/github.com/google/go-github/v28/github/teams.go @@ -476,3 +476,87 @@ func (s *TeamsService) RemoveTeamProject(ctx context.Context, teamID int64, proj return s.client.Do(ctx, req, nil) } + +// IDPGroupList represents a list of external identity provider (IDP) groups. +type IDPGroupList struct { + Groups []*IDPGroup `json:"groups,omitempty"` +} + +// IDPGroup represents an external identity provider (IDP) group. +type IDPGroup struct { + GroupID *string `json:"group_id,omitempty"` + GroupName *string `json:"group_name,omitempty"` + GroupDescription *string `json:"group_description,omitempty"` +} + +// ListIDPGroupsInOrganization lists IDP groups available in an organization. +// +// GitHub API docs: https://developer.github.com/v3/teams/team_sync/#list-idp-groups-in-an-organization +func (s *TeamsService) ListIDPGroupsInOrganization(ctx context.Context, org string, opt *ListOptions) (*IDPGroupList, *Response, error) { + u := fmt.Sprintf("orgs/%v/team-sync/groups", org) + u, err := addOptions(u, opt) + if err != nil { + return nil, nil, err + } + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamSyncPreview) + + groups := new(IDPGroupList) + resp, err := s.client.Do(ctx, req, groups) + if err != nil { + return nil, resp, err + } + return groups, resp, nil +} + +// ListIDPGroupsForTeam lists IDP groups connected to a team on GitHub. +// +// GitHub API docs: https://developer.github.com/v3/teams/team_sync/#list-idp-groups-for-a-team +func (s *TeamsService) ListIDPGroupsForTeam(ctx context.Context, teamID string) (*IDPGroupList, *Response, error) { + u := fmt.Sprintf("teams/%v/team-sync/group-mappings", teamID) + + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamSyncPreview) + + groups := new(IDPGroupList) + resp, err := s.client.Do(ctx, req, groups) + if err != nil { + return nil, resp, err + } + return groups, resp, err +} + +// CreateOrUpdateIDPGroupConnections creates, updates, or removes a connection between a team +// and an IDP group. +// +// GitHub API docs: https://developer.github.com/v3/teams/team_sync/#create-or-update-idp-group-connections +func (s *TeamsService) CreateOrUpdateIDPGroupConnections(ctx context.Context, teamID string, opt IDPGroupList) (*IDPGroupList, *Response, error) { + u := fmt.Sprintf("teams/%v/team-sync/group-mappings", teamID) + + req, err := s.client.NewRequest("PATCH", u, opt) + if err != nil { + return nil, nil, err + } + + // TODO: remove custom Accept header when this API fully launches. + req.Header.Set("Accept", mediaTypeTeamSyncPreview) + + groups := new(IDPGroupList) + resp, err := s.client.Do(ctx, req, groups) + if err != nil { + return nil, resp, err + } + + return groups, resp, nil +} diff --git a/vendor/github.com/google/go-github/v25/github/teams_discussion_comments.go b/vendor/github.com/google/go-github/v28/github/teams_discussion_comments.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/teams_discussion_comments.go rename to vendor/github.com/google/go-github/v28/github/teams_discussion_comments.go diff --git a/vendor/github.com/google/go-github/v25/github/teams_discussions.go b/vendor/github.com/google/go-github/v28/github/teams_discussions.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/teams_discussions.go rename to vendor/github.com/google/go-github/v28/github/teams_discussions.go diff --git a/vendor/github.com/google/go-github/v25/github/teams_members.go b/vendor/github.com/google/go-github/v28/github/teams_members.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/teams_members.go rename to vendor/github.com/google/go-github/v28/github/teams_members.go diff --git a/vendor/github.com/google/go-github/v25/github/timestamp.go b/vendor/github.com/google/go-github/v28/github/timestamp.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/timestamp.go rename to vendor/github.com/google/go-github/v28/github/timestamp.go diff --git a/vendor/github.com/google/go-github/v25/github/users.go b/vendor/github.com/google/go-github/v28/github/users.go similarity index 99% rename from vendor/github.com/google/go-github/v25/github/users.go rename to vendor/github.com/google/go-github/v28/github/users.go index 87cfa7f84b..2592aea0f4 100644 --- a/vendor/github.com/google/go-github/v25/github/users.go +++ b/vendor/github.com/google/go-github/v28/github/users.go @@ -47,6 +47,7 @@ type User struct { Collaborators *int `json:"collaborators,omitempty"` TwoFactorAuthentication *bool `json:"two_factor_authentication,omitempty"` Plan *Plan `json:"plan,omitempty"` + LdapDn *string `json:"ldap_dn,omitempty"` // API URLs URL *string `json:"url,omitempty"` diff --git a/vendor/github.com/google/go-github/v25/github/users_administration.go b/vendor/github.com/google/go-github/v28/github/users_administration.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/users_administration.go rename to vendor/github.com/google/go-github/v28/github/users_administration.go diff --git a/vendor/github.com/google/go-github/v25/github/users_blocking.go b/vendor/github.com/google/go-github/v28/github/users_blocking.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/users_blocking.go rename to vendor/github.com/google/go-github/v28/github/users_blocking.go diff --git a/vendor/github.com/google/go-github/v25/github/users_emails.go b/vendor/github.com/google/go-github/v28/github/users_emails.go similarity index 90% rename from vendor/github.com/google/go-github/v25/github/users_emails.go rename to vendor/github.com/google/go-github/v28/github/users_emails.go index 0bbd4627e3..78d2149119 100644 --- a/vendor/github.com/google/go-github/v25/github/users_emails.go +++ b/vendor/github.com/google/go-github/v28/github/users_emails.go @@ -9,9 +9,10 @@ import "context" // UserEmail represents user's email address type UserEmail struct { - Email *string `json:"email,omitempty"` - Primary *bool `json:"primary,omitempty"` - Verified *bool `json:"verified,omitempty"` + Email *string `json:"email,omitempty"` + Primary *bool `json:"primary,omitempty"` + Verified *bool `json:"verified,omitempty"` + Visibility *string `json:"visibility,omitempty"` } // ListEmails lists all email addresses for the authenticated user. diff --git a/vendor/github.com/google/go-github/v25/github/users_followers.go b/vendor/github.com/google/go-github/v28/github/users_followers.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/users_followers.go rename to vendor/github.com/google/go-github/v28/github/users_followers.go diff --git a/vendor/github.com/google/go-github/v25/github/users_gpg_keys.go b/vendor/github.com/google/go-github/v28/github/users_gpg_keys.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/users_gpg_keys.go rename to vendor/github.com/google/go-github/v28/github/users_gpg_keys.go diff --git a/vendor/github.com/google/go-github/v25/github/users_keys.go b/vendor/github.com/google/go-github/v28/github/users_keys.go similarity index 89% rename from vendor/github.com/google/go-github/v25/github/users_keys.go rename to vendor/github.com/google/go-github/v28/github/users_keys.go index ddc832a1ec..39a4f54d6c 100644 --- a/vendor/github.com/google/go-github/v25/github/users_keys.go +++ b/vendor/github.com/google/go-github/v28/github/users_keys.go @@ -12,11 +12,12 @@ import ( // Key represents a public SSH key used to authenticate a user or deploy script. type Key struct { - ID *int64 `json:"id,omitempty"` - Key *string `json:"key,omitempty"` - URL *string `json:"url,omitempty"` - Title *string `json:"title,omitempty"` - ReadOnly *bool `json:"read_only,omitempty"` + ID *int64 `json:"id,omitempty"` + Key *string `json:"key,omitempty"` + URL *string `json:"url,omitempty"` + Title *string `json:"title,omitempty"` + ReadOnly *bool `json:"read_only,omitempty"` + CreatedAt *Timestamp `json:"created_at,omitempty"` } func (k Key) String() string { diff --git a/vendor/github.com/google/go-github/v25/github/with_appengine.go b/vendor/github.com/google/go-github/v28/github/with_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/with_appengine.go rename to vendor/github.com/google/go-github/v28/github/with_appengine.go diff --git a/vendor/github.com/google/go-github/v25/github/without_appengine.go b/vendor/github.com/google/go-github/v28/github/without_appengine.go similarity index 100% rename from vendor/github.com/google/go-github/v25/github/without_appengine.go rename to vendor/github.com/google/go-github/v28/github/without_appengine.go diff --git a/vendor/modules.txt b/vendor/modules.txt index b958c8d892..36138ab85d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -74,8 +74,8 @@ github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value -# github.com/google/go-github/v25 v25.1.3 -github.com/google/go-github/v25/github +# github.com/google/go-github/v28 v28.1.1 +github.com/google/go-github/v28/github # github.com/google/go-querystring v1.0.0 github.com/google/go-querystring/query # github.com/google/uuid v1.1.1 @@ -261,19 +261,19 @@ go.opencensus.io/metric/metricproducer go.opencensus.io/resource # golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 golang.org/x/crypto/openpgp -golang.org/x/crypto/bcrypt -golang.org/x/crypto/ssh golang.org/x/crypto/openpgp/armor golang.org/x/crypto/openpgp/errors golang.org/x/crypto/openpgp/packet golang.org/x/crypto/openpgp/s2k +golang.org/x/crypto/bcrypt +golang.org/x/crypto/ssh +golang.org/x/crypto/cast5 +golang.org/x/crypto/openpgp/elgamal golang.org/x/crypto/blowfish golang.org/x/crypto/curve25519 golang.org/x/crypto/ed25519 golang.org/x/crypto/internal/chacha20 golang.org/x/crypto/poly1305 -golang.org/x/crypto/cast5 -golang.org/x/crypto/openpgp/elgamal golang.org/x/crypto/ed25519/internal/edwards25519 golang.org/x/crypto/internal/subtle # golang.org/x/net v0.0.0-20190502183928-7f726cade0ab