Skip to content

Commit 12eaf76

Browse files
Update go-github to v61 + gen endpoints
1 parent 35555fd commit 12eaf76

File tree

9 files changed

+90
-58
lines changed

9 files changed

+90
-58
lines changed

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Main",
6+
"type": "go",
7+
"request": "launch",
8+
"mode": "auto",
9+
"program": "main.go"
10+
}
11+
]
12+
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.21
55
require (
66
github.com/buger/jsonparser v1.1.1
77
github.com/go-kit/log v0.2.1
8-
github.com/google/go-github/v59 v59.0.0
8+
github.com/google/go-github/v61 v61.0.0
99
github.com/gorilla/mux v1.8.0
1010
golang.org/x/time v0.3.0
1111
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE
77
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
88
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
99
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
10-
github.com/google/go-github/v59 v59.0.0 h1:7h6bgpF5as0YQLLkEiVqpgtJqjimMYhBkD4jT5aN3VA=
11-
github.com/google/go-github/v59 v59.0.0/go.mod h1:rJU4R0rQHFVFDOkqGWxfLNo6vEk4dv40oDjhV/gH6wM=
10+
github.com/google/go-github/v61 v61.0.0 h1:VwQCBwhyE9JclCI+22/7mLB1PuU9eowCXKY5pNlu1go=
11+
github.com/google/go-github/v61 v61.0.0/go.mod h1:0WR+KmsWX75G2EbpyGsGmradjo3IiciuI4BmdVCobQY=
1212
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
1313
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
1414
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=

src/mock/endpointpattern.go

Lines changed: 70 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ var GetEmojis EndpointPattern = EndpointPattern{
162162
Method: "GET",
163163
}
164164

165+
var GetEnterprisesCopilotUsageByEnterprise EndpointPattern = EndpointPattern{
166+
Pattern: "/enterprises/{enterprise}/copilot/usage",
167+
Method: "GET",
168+
}
169+
165170
var GetEnterprisesDependabotAlertsByEnterprise EndpointPattern = EndpointPattern{
166171
Pattern: "/enterprises/{enterprise}/dependabot/alerts",
167172
Method: "GET",
@@ -767,6 +772,11 @@ var DeleteOrgsCopilotBillingSelectedUsersByOrg EndpointPattern = EndpointPattern
767772
Method: "DELETE",
768773
}
769774

775+
var GetOrgsCopilotUsageByOrg EndpointPattern = EndpointPattern{
776+
Pattern: "/orgs/{org}/copilot/usage",
777+
Method: "GET",
778+
}
779+
770780
var GetOrgsDependabotAlertsByOrg EndpointPattern = EndpointPattern{
771781
Pattern: "/orgs/{org}/dependabot/alerts",
772782
Method: "GET",
@@ -1337,6 +1347,11 @@ var GetOrgsSettingsBillingSharedStorageByOrg EndpointPattern = EndpointPattern{
13371347
Method: "GET",
13381348
}
13391349

1350+
var GetOrgsTeamCopilotUsageByOrgByTeamSlug EndpointPattern = EndpointPattern{
1351+
Pattern: "/orgs/{org}/team/{team_slug}/copilot/usage",
1352+
Method: "GET",
1353+
}
1354+
13401355
var GetOrgsTeamsByOrg EndpointPattern = EndpointPattern{
13411356
Pattern: "/orgs/{org}/teams",
13421357
Method: "GET",
@@ -2702,6 +2717,56 @@ var DeleteReposEnvironmentsDeploymentProtectionRulesByOwnerByRepoByEnvironmentNa
27022717
Method: "DELETE",
27032718
}
27042719

2720+
var GetReposEnvironmentsSecretsByOwnerByRepoByEnvironmentName EndpointPattern = EndpointPattern{
2721+
Pattern: "/repos/{owner}/{repo}/environments/{environment_name}/secrets",
2722+
Method: "GET",
2723+
}
2724+
2725+
var GetReposEnvironmentsSecretsPublicKeyByOwnerByRepoByEnvironmentName EndpointPattern = EndpointPattern{
2726+
Pattern: "/repos/{owner}/{repo}/environments/{environment_name}/secrets/public-key",
2727+
Method: "GET",
2728+
}
2729+
2730+
var GetReposEnvironmentsSecretsByOwnerByRepoByEnvironmentNameBySecretName EndpointPattern = EndpointPattern{
2731+
Pattern: "/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}",
2732+
Method: "GET",
2733+
}
2734+
2735+
var PutReposEnvironmentsSecretsByOwnerByRepoByEnvironmentNameBySecretName EndpointPattern = EndpointPattern{
2736+
Pattern: "/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}",
2737+
Method: "PUT",
2738+
}
2739+
2740+
var DeleteReposEnvironmentsSecretsByOwnerByRepoByEnvironmentNameBySecretName EndpointPattern = EndpointPattern{
2741+
Pattern: "/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}",
2742+
Method: "DELETE",
2743+
}
2744+
2745+
var GetReposEnvironmentsVariablesByOwnerByRepoByEnvironmentName EndpointPattern = EndpointPattern{
2746+
Pattern: "/repos/{owner}/{repo}/environments/{environment_name}/variables",
2747+
Method: "GET",
2748+
}
2749+
2750+
var PostReposEnvironmentsVariablesByOwnerByRepoByEnvironmentName EndpointPattern = EndpointPattern{
2751+
Pattern: "/repos/{owner}/{repo}/environments/{environment_name}/variables",
2752+
Method: "POST",
2753+
}
2754+
2755+
var GetReposEnvironmentsVariablesByOwnerByRepoByEnvironmentNameByName EndpointPattern = EndpointPattern{
2756+
Pattern: "/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}",
2757+
Method: "GET",
2758+
}
2759+
2760+
var PatchReposEnvironmentsVariablesByOwnerByRepoByEnvironmentNameByName EndpointPattern = EndpointPattern{
2761+
Pattern: "/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}",
2762+
Method: "PATCH",
2763+
}
2764+
2765+
var DeleteReposEnvironmentsVariablesByOwnerByRepoByEnvironmentNameByName EndpointPattern = EndpointPattern{
2766+
Pattern: "/repos/{owner}/{repo}/environments/{environment_name}/variables/{name}",
2767+
Method: "DELETE",
2768+
}
2769+
27052770
var GetReposEventsByOwnerByRepo EndpointPattern = EndpointPattern{
27062771
Pattern: "/repos/{owner}/{repo}/events",
27072772
Method: "GET",
@@ -3232,6 +3297,11 @@ var GetReposPagesHealthByOwnerByRepo EndpointPattern = EndpointPattern{
32323297
Method: "GET",
32333298
}
32343299

3300+
var GetReposPrivateVulnerabilityReportingByOwnerByRepo EndpointPattern = EndpointPattern{
3301+
Pattern: "/repos/{owner}/{repo}/private-vulnerability-reporting",
3302+
Method: "GET",
3303+
}
3304+
32353305
var PutReposPrivateVulnerabilityReportingByOwnerByRepo EndpointPattern = EndpointPattern{
32363306
Pattern: "/repos/{owner}/{repo}/private-vulnerability-reporting",
32373307
Method: "PUT",
@@ -3752,56 +3822,6 @@ var GetRepositories EndpointPattern = EndpointPattern{
37523822
Method: "GET",
37533823
}
37543824

3755-
var GetRepositoriesEnvironmentsSecretsByRepositoryIdByEnvironmentName EndpointPattern = EndpointPattern{
3756-
Pattern: "/repositories/{repository_id}/environments/{environment_name}/secrets",
3757-
Method: "GET",
3758-
}
3759-
3760-
var GetRepositoriesEnvironmentsSecretsPublicKeyByRepositoryIdByEnvironmentName EndpointPattern = EndpointPattern{
3761-
Pattern: "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key",
3762-
Method: "GET",
3763-
}
3764-
3765-
var GetRepositoriesEnvironmentsSecretsByRepositoryIdByEnvironmentNameBySecretName EndpointPattern = EndpointPattern{
3766-
Pattern: "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}",
3767-
Method: "GET",
3768-
}
3769-
3770-
var PutRepositoriesEnvironmentsSecretsByRepositoryIdByEnvironmentNameBySecretName EndpointPattern = EndpointPattern{
3771-
Pattern: "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}",
3772-
Method: "PUT",
3773-
}
3774-
3775-
var DeleteRepositoriesEnvironmentsSecretsByRepositoryIdByEnvironmentNameBySecretName EndpointPattern = EndpointPattern{
3776-
Pattern: "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}",
3777-
Method: "DELETE",
3778-
}
3779-
3780-
var GetRepositoriesEnvironmentsVariablesByRepositoryIdByEnvironmentName EndpointPattern = EndpointPattern{
3781-
Pattern: "/repositories/{repository_id}/environments/{environment_name}/variables",
3782-
Method: "GET",
3783-
}
3784-
3785-
var PostRepositoriesEnvironmentsVariablesByRepositoryIdByEnvironmentName EndpointPattern = EndpointPattern{
3786-
Pattern: "/repositories/{repository_id}/environments/{environment_name}/variables",
3787-
Method: "POST",
3788-
}
3789-
3790-
var GetRepositoriesEnvironmentsVariablesByRepositoryIdByEnvironmentNameByName EndpointPattern = EndpointPattern{
3791-
Pattern: "/repositories/{repository_id}/environments/{environment_name}/variables/{name}",
3792-
Method: "GET",
3793-
}
3794-
3795-
var PatchRepositoriesEnvironmentsVariablesByRepositoryIdByEnvironmentNameByName EndpointPattern = EndpointPattern{
3796-
Pattern: "/repositories/{repository_id}/environments/{environment_name}/variables/{name}",
3797-
Method: "PATCH",
3798-
}
3799-
3800-
var DeleteRepositoriesEnvironmentsVariablesByRepositoryIdByEnvironmentNameByName EndpointPattern = EndpointPattern{
3801-
Pattern: "/repositories/{repository_id}/environments/{environment_name}/variables/{name}",
3802-
Method: "DELETE",
3803-
}
3804-
38053825
var GetSearchCode EndpointPattern = EndpointPattern{
38063826
Pattern: "/search/code",
38073827
Method: "GET",

src/mock/endpointpattern_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"testing"
66

7-
"github.com/google/go-github/v59/github"
7+
"github.com/google/go-github/v61/github"
88
)
99

1010
func TestRepoGetContents(t *testing.T) {

src/mock/server_options_external_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77
"time"
88

9-
"github.com/google/go-github/v59/github"
9+
"github.com/google/go-github/v61/github"
1010
"github.com/migueleliasweb/go-github-mock/src/mock"
1111
)
1212

src/mock/server_options_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package mock
33
import (
44
"testing"
55

6-
"github.com/google/go-github/v59/github"
6+
"github.com/google/go-github/v61/github"
77
"github.com/gorilla/mux"
88
)
99

src/mock/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strings"
88
"testing"
99

10-
"github.com/google/go-github/v59/github"
10+
"github.com/google/go-github/v61/github"
1111
)
1212

1313
func TestNewMockedHTTPClient(t *testing.T) {

src/mock/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"encoding/json"
55
"net/http"
66

7-
"github.com/google/go-github/v59/github"
7+
"github.com/google/go-github/v61/github"
88
)
99

1010
// MustMarshal helper function that wraps json.Marshal

0 commit comments

Comments
 (0)