diff --git a/github/admin_users_test.go b/github/admin_users_test.go index 21ea5156a85..6c736e87baf 100644 --- a/github/admin_users_test.go +++ b/github/admin_users_test.go @@ -24,7 +24,7 @@ func TestAdminUsers_Create(t *testing.T) { assertNilError(t, json.NewDecoder(r.Body).Decode(v)) testMethod(t, r, "POST") - want := &CreateUserRequest{Login: "github", Email: Ptr("email@domain.com"), Suspended: Ptr(false)} + want := &CreateUserRequest{Login: "github", Email: Ptr("email@example.com"), Suspended: Ptr(false)} if !cmp.Equal(v, want) { t.Errorf("Request body = %+v, want %+v", v, want) } @@ -35,7 +35,7 @@ func TestAdminUsers_Create(t *testing.T) { ctx := t.Context() org, _, err := client.Admin.CreateUser(ctx, CreateUserRequest{ Login: "github", - Email: Ptr("email@domain.com"), + Email: Ptr("email@example.com"), Suspended: Ptr(false), }) if err != nil { @@ -51,7 +51,7 @@ func TestAdminUsers_Create(t *testing.T) { testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { got, resp, err := client.Admin.CreateUser(ctx, CreateUserRequest{ Login: "github", - Email: Ptr("email@domain.com"), + Email: Ptr("email@example.com"), Suspended: Ptr(false), }) if got != nil { @@ -94,7 +94,7 @@ func TestUserImpersonation_Create(t *testing.T) { testMethod(t, r, "POST") testBody(t, r, `{"scopes":["repo"]}`+"\n") fmt.Fprint(w, `{"id": 1234, - "url": "https://git.company.com/api/v3/authorizations/1234", + "url": "https://example.com/authorizations", "app": { "name": "GitHub Site Administrator", "url": "https://docs.github.com/en/rest/enterprise/users/", @@ -123,7 +123,7 @@ func TestUserImpersonation_Create(t *testing.T) { date := Timestamp{Time: time.Date(2018, time.January, 1, 0, 0, 0, 0, time.UTC)} want := &UserAuthorization{ ID: Ptr(int64(1234)), - URL: Ptr("https://git.company.com/api/v3/authorizations/1234"), + URL: Ptr("https://example.com/authorizations"), App: &OAuthAPP{ Name: Ptr("GitHub Site Administrator"), URL: Ptr("https://docs.github.com/en/rest/enterprise/users/"), diff --git a/github/dependabot_alerts_test.go b/github/dependabot_alerts_test.go index 813aa897846..d6ab4d1453a 100644 --- a/github/dependabot_alerts_test.go +++ b/github/dependabot_alerts_test.go @@ -296,19 +296,19 @@ func TestDependabotSecurityAdvisory_Marshal(t *testing.T) { }, References: []*AdvisoryReference{ { - URL: Ptr("https://nvd.nist.gov/vuln/detail/CVE-2018-6188"), + URL: Ptr("https://example.com/vuln/detail/CVE-2018-6188"), }, { URL: Ptr("https://github.com/advisories/GHSA-rf4j-j272-fj86"), }, { - URL: Ptr("https://usn.ubuntu.com/3559-1/"), + URL: Ptr("https://example.com/3559-1/"), }, { - URL: Ptr("https://www.djangoproject.com/weblog/2018/feb/01/security-releases/"), + URL: Ptr("https://example.com/weblog/2018/feb/01/security-releases/"), }, { - URL: Ptr("https://www.securitytracker.com/id/1040422"), + URL: Ptr("https://example.com/id/1040422"), }, }, PublishedAt: &Timestamp{publishedAt}, @@ -372,19 +372,19 @@ func TestDependabotSecurityAdvisory_Marshal(t *testing.T) { ], "references": [ { - "url": "https://nvd.nist.gov/vuln/detail/CVE-2018-6188" + "url": "https://example.com/vuln/detail/CVE-2018-6188" }, { "url": "https://github.com/advisories/GHSA-rf4j-j272-fj86" }, { - "url": "https://usn.ubuntu.com/3559-1/" + "url": "https://example.com/3559-1/" }, { - "url": "https://www.djangoproject.com/weblog/2018/feb/01/security-releases/" + "url": "https://example.com/weblog/2018/feb/01/security-releases/" }, { - "url": "https://www.securitytracker.com/id/1040422" + "url": "https://example.com/id/1040422" } ], "published_at": "2018-10-03T21:13:54Z", diff --git a/github/enterprise_licenses_test.go b/github/enterprise_licenses_test.go index 70338b39e33..422d28277c6 100644 --- a/github/enterprise_licenses_test.go +++ b/github/enterprise_licenses_test.go @@ -39,9 +39,9 @@ func TestEnterpriseService_GetConsumedLicenses(t *testing.T) { "github_com_saml_name_id": "saml123", "github_com_orgs_with_pending_invites": [], "github_com_two_factor_auth": true, - "enterprise_server_emails": ["user1@enterprise.local"], + "enterprise_server_emails": ["user1@example.com"], "visual_studio_license_status": "active", - "visual_studio_subscription_email": "user1@visualstudio.com", + "visual_studio_subscription_email": "user1@example.com", "total_user_accounts": 1 }] }`) @@ -60,7 +60,7 @@ func TestEnterpriseService_GetConsumedLicenses(t *testing.T) { samlNameID := "saml123" twoFactorAuth := true licenseStatus := "active" - vsEmail := "user1@visualstudio.com" + vsEmail := "user1@example.com" want := &EnterpriseConsumedLicenses{ TotalSeatsConsumed: 20, @@ -81,7 +81,7 @@ func TestEnterpriseService_GetConsumedLicenses(t *testing.T) { GithubComSamlNameID: &samlNameID, GithubComOrgsWithPendingInvites: []string{}, GithubComTwoFactorAuth: &twoFactorAuth, - EnterpriseServerEmails: []string{"user1@enterprise.local"}, + EnterpriseServerEmails: []string{"user1@example.com"}, VisualStudioLicenseStatus: &licenseStatus, VisualStudioSubscriptionEmail: &vsEmail, TotalUserAccounts: 1, diff --git a/github/enterprise_manage_ghes_config_test.go b/github/enterprise_manage_ghes_config_test.go index 519dc05f491..8f7f4e0a21c 100644 --- a/github/enterprise_manage_ghes_config_test.go +++ b/github/enterprise_manage_ghes_config_test.go @@ -123,8 +123,8 @@ func TestEnterpriseService_Settings(t *testing.T) { "noreply_address": "noreply@github.com" }, "ntp": { - "primary_server": "0.pool.ntp.org", - "secondary_server": "1.pool.ntp.org" + "primary_server": "example.com/primary", + "secondary_server": "example.com/secondary" }, "timezone": null, "snmp": { @@ -266,8 +266,8 @@ func TestEnterpriseService_Settings(t *testing.T) { EnableStarttlsAuto: Ptr(true), }, NTP: &ConfigSettingsNTP{ - PrimaryServer: Ptr("0.pool.ntp.org"), - SecondaryServer: Ptr("1.pool.ntp.org"), + PrimaryServer: Ptr("example.com/primary"), + SecondaryServer: Ptr("example.com/secondary"), }, Timezone: nil, SNMP: &ConfigSettingsSNMP{ diff --git a/github/enterprise_scim_test.go b/github/enterprise_scim_test.go index edfbd64724d..1ffe24e75fd 100644 --- a/github/enterprise_scim_test.go +++ b/github/enterprise_scim_test.go @@ -82,7 +82,7 @@ func TestSCIMEnterpriseUsers_Marshal(t *testing.T) { Emails: []*SCIMEnterpriseUserEmail{{ Primary: true, Type: "work", - Value: "un1@email.com", + Value: "un1@example.com", }}, Roles: []*SCIMEnterpriseUserRole{{ Display: Ptr("rd1"), @@ -125,7 +125,7 @@ func TestSCIMEnterpriseUsers_Marshal(t *testing.T) { "emails": [{ "primary": true, "type": "work", - "value": "un1@email.com" + "value": "un1@example.com" }], "roles": [{ "display": "rd1", @@ -559,7 +559,7 @@ func TestEnterpriseService_SetProvisionedSCIMUser(t *testing.T) { mux.HandleFunc("/scim/v2/enterprises/ee/Users/7fce", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "PUT") testHeader(t, r, "Accept", mediaTypeSCIM) - testBody(t, r, `{"displayName":"John Doe","userName":"e123","emails":[{"value":"john@email.com","primary":true,"type":"work"}],"externalId":"e123","active":true,"schemas":["`+SCIMSchemasURINamespacesUser+`"]}`+"\n") + testBody(t, r, `{"displayName":"John Doe","userName":"e123","emails":[{"value":"john@example.com","primary":true,"type":"work"}],"externalId":"e123","active":true,"schemas":["`+SCIMSchemasURINamespacesUser+`"]}`+"\n") w.WriteHeader(http.StatusOK) fmt.Fprint(w, `{ "schemas": ["`+SCIMSchemasURINamespacesUser+`"], @@ -569,7 +569,7 @@ func TestEnterpriseService_SetProvisionedSCIMUser(t *testing.T) { "userName": "e123", "displayName": "John Doe", "emails": [{ - "value": "john@email.com", + "value": "john@example.com", "type": "work", "primary": true }], @@ -589,7 +589,7 @@ func TestEnterpriseService_SetProvisionedSCIMUser(t *testing.T) { UserName: "e123", DisplayName: "John Doe", Emails: []*SCIMEnterpriseUserEmail{{ - Value: "john@email.com", + Value: "john@example.com", Type: "work", Primary: true, }}, @@ -609,7 +609,7 @@ func TestEnterpriseService_SetProvisionedSCIMUser(t *testing.T) { UserName: "e123", DisplayName: "John Doe", Emails: []*SCIMEnterpriseUserEmail{{ - Value: "john@email.com", + Value: "john@example.com", Type: "work", Primary: true, }}, @@ -721,7 +721,7 @@ func TestEnterpriseService_UpdateSCIMUserAttribute(t *testing.T) { mux.HandleFunc("/scim/v2/enterprises/ee/Users/7fce", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "PATCH") testHeader(t, r, "Accept", mediaTypeSCIM) - testBody(t, r, `{"schemas":["`+SCIMSchemasURINamespacesPatchOp+`"],"Operations":[{"op":"replace","path":"emails[type eq 'work'].value","value":"updatedEmail@email.com"},{"op":"replace","path":"name.familyName","value":"updatedFamilyName"}]}`+"\n") + testBody(t, r, `{"schemas":["`+SCIMSchemasURINamespacesPatchOp+`"],"Operations":[{"op":"replace","path":"emails[type eq 'work'].value","value":"updatedEmail@example.com"},{"op":"replace","path":"name.familyName","value":"updatedFamilyName"}]}`+"\n") w.WriteHeader(http.StatusOK) fmt.Fprint(w, `{ "schemas": ["`+SCIMSchemasURINamespacesUser+`"], @@ -737,7 +737,7 @@ func TestEnterpriseService_UpdateSCIMUserAttribute(t *testing.T) { }, "displayName": "John Doe", "emails": [{ - "value": "john@email.com", + "value": "john@example.com", "type": "work", "primary": true }], @@ -767,7 +767,7 @@ func TestEnterpriseService_UpdateSCIMUserAttribute(t *testing.T) { MiddleName: Ptr("X"), }, Emails: []*SCIMEnterpriseUserEmail{{ - Value: "john@email.com", + Value: "john@example.com", Type: "work", Primary: true, }}, @@ -789,7 +789,7 @@ func TestEnterpriseService_UpdateSCIMUserAttribute(t *testing.T) { Operations: []*SCIMEnterpriseAttributeOperation{{ Op: "replace", Path: Ptr("emails[type eq 'work'].value"), - Value: Ptr("updatedEmail@email.com"), + Value: Ptr("updatedEmail@example.com"), }, { Op: "replace", Path: Ptr("name.familyName"), @@ -918,7 +918,7 @@ func TestEnterpriseService_ProvisionSCIMUser(t *testing.T) { mux.HandleFunc("/scim/v2/enterprises/ee/Users", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "POST") testHeader(t, r, "Accept", mediaTypeSCIM) - testBody(t, r, `{"displayName":"DOE John","name":{"givenName":"John","familyName":"Doe","formatted":"John Doe"},"userName":"e123","emails":[{"value":"john@email.com","primary":true,"type":"work"}],"roles":[{"value":"User","primary":false}],"externalId":"e123","active":true,"schemas":["`+SCIMSchemasURINamespacesUser+`"]}`+"\n") + testBody(t, r, `{"displayName":"DOE John","name":{"givenName":"John","familyName":"Doe","formatted":"John Doe"},"userName":"e123","emails":[{"value":"john@example.com","primary":true,"type":"work"}],"roles":[{"value":"User","primary":false}],"externalId":"e123","active":true,"schemas":["`+SCIMSchemasURINamespacesUser+`"]}`+"\n") w.WriteHeader(http.StatusCreated) fmt.Fprint(w, `{ "schemas": ["`+SCIMSchemasURINamespacesUser+`"], @@ -933,7 +933,7 @@ func TestEnterpriseService_ProvisionSCIMUser(t *testing.T) { }, "displayName": "DOE John", "emails": [{ - "value": "john@email.com", + "value": "john@example.com", "type": "work", "primary": true }], @@ -962,7 +962,7 @@ func TestEnterpriseService_ProvisionSCIMUser(t *testing.T) { GivenName: "John", }, Emails: []*SCIMEnterpriseUserEmail{{ - Value: "john@email.com", + Value: "john@example.com", Type: "work", Primary: true, }}, @@ -991,7 +991,7 @@ func TestEnterpriseService_ProvisionSCIMUser(t *testing.T) { }, DisplayName: "DOE John", Emails: []*SCIMEnterpriseUserEmail{{ - Value: "john@email.com", + Value: "john@example.com", Type: "work", Primary: true, }}, diff --git a/github/git_commits_test.go b/github/git_commits_test.go index 95f81d61c7a..cf8caf2798b 100644 --- a/github/git_commits_test.go +++ b/github/git_commits_test.go @@ -482,13 +482,13 @@ func TestGitService_createSignatureMessage_withoutCommitter(t *testing.T) { }, Committer: &CommitAuthor{ Name: Ptr("foo"), - Email: Ptr("foo@bar.com"), + Email: Ptr("foo@example.com"), Date: &Timestamp{date}, }, }) expected := `parent p author go-github 1493849023 +0200 -committer foo 1493849023 +0200 +committer foo 1493849023 +0200 Commit Message.` if msg != expected { diff --git a/github/meta_test.go b/github/meta_test.go index 7b0a8c86a8c..1d9d999ea3b 100644 --- a/github/meta_test.go +++ b/github/meta_test.go @@ -25,7 +25,7 @@ func TestAPIMeta_Marshal(t *testing.T) { Importer: []string{"i"}, GithubEnterpriseImporter: []string{"gei"}, Actions: []string{"a"}, - ActionsMacos: []string{"192.0.2.1/32", "198.51.100.0/24"}, + ActionsMacos: []string{"example.com/1", "example.com/2"}, Dependabot: []string{"d"}, SSHKeyFingerprints: map[string]string{"a": "f"}, SSHKeys: []string{"k"}, @@ -36,16 +36,16 @@ func TestAPIMeta_Marshal(t *testing.T) { "*.github.com", "*.github.dev", "*.github.io", - "*.githubassets.com", - "*.githubusercontent.com", + "*.example.com/assets", + "*.example.com", }, ArtifactAttestations: &APIMetaArtifactAttestations{ TrustDomain: "", Services: []string{ - "*.actions.githubusercontent.com", + "*.actions.github.com", "tuf-repo.github.com", - "fulcio.githubapp.com", - "timestamp.githubapp.com", + "fulcio.github.com", + "timestamp.github.com", }, }, }, @@ -58,13 +58,13 @@ func TestAPIMeta_Marshal(t *testing.T) { "importer":["i"], "github_enterprise_importer":["gei"], "actions":["a"], - "actions_macos":["192.0.2.1/32", "198.51.100.0/24"], + "actions_macos":["example.com/1", "example.com/2"], "dependabot":["d"], "ssh_key_fingerprints":{"a":"f"}, "ssh_keys":["k"], "api":["a"], "web":["w"], - "domains":{"website":["*.github.com","*.github.dev","*.github.io","*.githubassets.com","*.githubusercontent.com"],"artifact_attestations":{"trust_domain":"","services":["*.actions.githubusercontent.com","tuf-repo.github.com","fulcio.githubapp.com","timestamp.githubapp.com"]}} + "domains":{"website":["*.github.com","*.github.dev","*.github.io","*.example.com/assets","*.example.com"],"artifact_attestations":{"trust_domain":"","services":["*.actions.github.com","tuf-repo.github.com","fulcio.github.com","timestamp.github.com"]}} }` testJSONMarshal(t, a, want) @@ -76,7 +76,7 @@ func TestMetaService_Get(t *testing.T) { mux.HandleFunc("/meta", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") - fmt.Fprint(w, `{"web":["w"],"api":["a"],"hooks":["h"], "git":["g"], "pages":["p"], "importer":["i"], "github_enterprise_importer": ["gei"], "actions":["a"], "actions_macos": ["192.0.2.1/32", "198.51.100.0/24"], "dependabot":["d"], "verifiable_password_authentication": true, "domains":{"website":["*.github.com","*.github.dev","*.github.io","*.githubassets.com","*.githubusercontent.com"],"artifact_attestations":{"trust_domain":"","services":["*.actions.githubusercontent.com","tuf-repo.github.com","fulcio.githubapp.com","timestamp.githubapp.com"]}}}`) + fmt.Fprint(w, `{"web":["w"],"api":["a"],"hooks":["h"], "git":["g"], "pages":["p"], "importer":["i"], "github_enterprise_importer": ["gei"], "actions":["a"], "actions_macos": ["example.com/1", "example.com/2"], "dependabot":["d"], "verifiable_password_authentication": true, "domains":{"website":["*.github.com","*.github.dev","*.github.io","*.example.com/assets","*.example.com"],"artifact_attestations":{"trust_domain":"","services":["*.actions.github.com","tuf-repo.github.com","fulcio.github.com","timestamp.github.com"]}}}`) }) ctx := t.Context() @@ -92,7 +92,7 @@ func TestMetaService_Get(t *testing.T) { Importer: []string{"i"}, GithubEnterpriseImporter: []string{"gei"}, Actions: []string{"a"}, - ActionsMacos: []string{"192.0.2.1/32", "198.51.100.0/24"}, + ActionsMacos: []string{"example.com/1", "example.com/2"}, Dependabot: []string{"d"}, API: []string{"a"}, Web: []string{"w"}, @@ -101,16 +101,16 @@ func TestMetaService_Get(t *testing.T) { "*.github.com", "*.github.dev", "*.github.io", - "*.githubassets.com", - "*.githubusercontent.com", + "*.example.com/assets", + "*.example.com", }, ArtifactAttestations: &APIMetaArtifactAttestations{ TrustDomain: "", Services: []string{ - "*.actions.githubusercontent.com", + "*.actions.github.com", "tuf-repo.github.com", - "fulcio.githubapp.com", - "timestamp.githubapp.com", + "fulcio.github.com", + "timestamp.github.com", }, }, }, diff --git a/github/repos_environments_test.go b/github/repos_environments_test.go index e273b512b68..ce7f83337c1 100644 --- a/github/repos_environments_test.go +++ b/github/repos_environments_test.go @@ -380,7 +380,7 @@ func TestRepoEnvironment_Marshal(t *testing.T) { ID: Ptr(int64(2)), NodeID: Ptr("star"), Name: Ptr("eg"), - URL: Ptr("https://hey.in"), + URL: Ptr("https://example.com"), HTMLURL: Ptr("htmlurl"), CreatedAt: &Timestamp{referenceTime}, UpdatedAt: &Timestamp{referenceTime}, @@ -421,7 +421,7 @@ func TestRepoEnvironment_Marshal(t *testing.T) { "id":2, "node_id":"star", "name":"eg", - "url":"https://hey.in", + "url":"https://example.com", "html_url":"htmlurl", "created_at":` + referenceTimeStr + `, "updated_at":` + referenceTimeStr + `, @@ -483,7 +483,7 @@ func TestEnvironment_Marshal(t *testing.T) { ID: Ptr(int64(2)), NodeID: Ptr("star"), Name: Ptr("eg"), - URL: Ptr("https://hey.in"), + URL: Ptr("https://example.com"), HTMLURL: Ptr("htmlurl"), CreatedAt: &Timestamp{referenceTime}, UpdatedAt: &Timestamp{referenceTime}, @@ -519,7 +519,7 @@ func TestEnvironment_Marshal(t *testing.T) { "id":2, "node_id":"star", "name":"eg", - "url":"https://hey.in", + "url":"https://example.com", "html_url":"htmlurl", "created_at":` + referenceTimeStr + `, "updated_at":` + referenceTimeStr + `, diff --git a/github/repos_hooks_test.go b/github/repos_hooks_test.go index 8ea402c04b5..b391acc4ea2 100644 --- a/github/repos_hooks_test.go +++ b/github/repos_hooks_test.go @@ -322,12 +322,12 @@ func TestBranchWebHookPayload_Marshal(t *testing.T) { { Added: []string{"1", "2", "3"}, Author: &WebHookAuthor{ - Email: Ptr("abc@gmail.com"), + Email: Ptr("abc@example.com"), Name: Ptr("abc"), Login: Ptr("abc_12"), }, Committer: &WebHookAuthor{ - Email: Ptr("abc@gmail.com"), + Email: Ptr("abc@example.com"), Name: Ptr("abc"), Login: Ptr("abc_12"), }, @@ -343,12 +343,12 @@ func TestBranchWebHookPayload_Marshal(t *testing.T) { HeadCommit: &WebHookCommit{ Added: []string{"1", "2", "3"}, Author: &WebHookAuthor{ - Email: Ptr("abc@gmail.com"), + Email: Ptr("abc@example.com"), Name: Ptr("abc"), Login: Ptr("abc_12"), }, Committer: &WebHookAuthor{ - Email: Ptr("abc@gmail.com"), + Email: Ptr("abc@example.com"), Name: Ptr("abc"), Login: Ptr("abc_12"), }, @@ -364,14 +364,14 @@ func TestBranchWebHookPayload_Marshal(t *testing.T) { ID: Ptr(int64(22)), }, Pusher: &CommitAuthor{ - Login: Ptr("rd@yahoo.com"), + Login: Ptr("rd@example.com"), }, Repo: &PushEventRepository{ ID: Ptr(int64(321)), NodeID: Ptr("node_321"), }, Sender: &User{ - Login: Ptr("st@gmail.com"), + Login: Ptr("st@example.com"), ID: Ptr(int64(202)), }, } @@ -384,12 +384,12 @@ func TestBranchWebHookPayload_Marshal(t *testing.T) { { "added": ["1", "2", "3"], "author":{ - "email": "abc@gmail.com", + "email": "abc@example.com", "name": "abc", "username": "abc_12" }, "committer": { - "email": "abc@gmail.com", + "email": "abc@example.com", "name": "abc", "username": "abc_12" }, @@ -405,12 +405,12 @@ func TestBranchWebHookPayload_Marshal(t *testing.T) { "head_commit": { "added": ["1", "2", "3"], "author":{ - "email": "abc@gmail.com", + "email": "abc@example.com", "name": "abc", "username": "abc_12" }, "committer": { - "email": "abc@gmail.com", + "email": "abc@example.com", "name": "abc", "username": "abc_12" }, @@ -426,14 +426,14 @@ func TestBranchWebHookPayload_Marshal(t *testing.T) { "id" : 22 }, "pusher":{ - "username": "rd@yahoo.com" + "username": "rd@example.com" }, "repository":{ "id": 321, "node_id": "node_321" }, "sender":{ - "login": "st@gmail.com", + "login": "st@example.com", "id": 202 } }` @@ -446,13 +446,13 @@ func TestBranchWebHookAuthor_Marshal(t *testing.T) { testJSONMarshal(t, &WebHookAuthor{}, "{}") v := &WebHookAuthor{ - Email: Ptr("abc@gmail.com"), + Email: Ptr("abc@example.com"), Name: Ptr("abc"), Login: Ptr("abc_12"), } want := `{ - "email": "abc@gmail.com", + "email": "abc@example.com", "name": "abc", "username": "abc_12" }` @@ -467,12 +467,12 @@ func TestBranchWebHookCommit_Marshal(t *testing.T) { v := &WebHookCommit{ Added: []string{"1", "2", "3"}, Author: &WebHookAuthor{ - Email: Ptr("abc@gmail.com"), + Email: Ptr("abc@example.com"), Name: Ptr("abc"), Login: Ptr("abc_12"), }, Committer: &WebHookAuthor{ - Email: Ptr("abc@gmail.com"), + Email: Ptr("abc@example.com"), Name: Ptr("abc"), Login: Ptr("abc_12"), }, @@ -485,12 +485,12 @@ func TestBranchWebHookCommit_Marshal(t *testing.T) { want := `{ "added": ["1", "2", "3"], "author":{ - "email": "abc@gmail.com", + "email": "abc@example.com", "name": "abc", "username": "abc_12" }, "committer": { - "email": "abc@gmail.com", + "email": "abc@example.com", "name": "abc", "username": "abc_12" }, diff --git a/github/repos_pages_test.go b/github/repos_pages_test.go index 6abf2e8b149..5936999739c 100644 --- a/github/repos_pages_test.go +++ b/github/repos_pages_test.go @@ -26,7 +26,7 @@ func TestRepositoriesService_EnablePagesLegacy(t *testing.T) { Branch: Ptr("master"), Path: Ptr("/"), }, - CNAME: Ptr("www.my-domain.com"), // not passed along. + CNAME: Ptr("www.example.com"), // not passed along. } mux.HandleFunc("/repos/o/r/pages", func(w http.ResponseWriter, r *http.Request) { @@ -80,7 +80,7 @@ func TestRepositoriesService_EnablePagesWorkflow(t *testing.T) { input := &Pages{ BuildType: Ptr("workflow"), - CNAME: Ptr("www.my-domain.com"), // not passed along. + CNAME: Ptr("www.example.com"), // not passed along. } mux.HandleFunc("/repos/o/r/pages", func(w http.ResponseWriter, r *http.Request) { @@ -129,7 +129,7 @@ func TestRepositoriesService_UpdatePagesLegacy(t *testing.T) { client, mux, _ := setup(t) input := &PagesUpdate{ - CNAME: Ptr("www.my-domain.com"), + CNAME: Ptr("www.example.com"), BuildType: Ptr("legacy"), Source: &PagesSource{Branch: Ptr("gh-pages")}, } @@ -139,12 +139,12 @@ func TestRepositoriesService_UpdatePagesLegacy(t *testing.T) { assertNilError(t, json.NewDecoder(r.Body).Decode(v)) testMethod(t, r, "PUT") - want := &PagesUpdate{CNAME: Ptr("www.my-domain.com"), BuildType: Ptr("legacy"), Source: &PagesSource{Branch: Ptr("gh-pages")}} + want := &PagesUpdate{CNAME: Ptr("www.example.com"), BuildType: Ptr("legacy"), Source: &PagesSource{Branch: Ptr("gh-pages")}} if !cmp.Equal(v, want) { t.Errorf("Request body = %+v, want %+v", v, want) } - fmt.Fprint(w, `{"cname":"www.my-domain.com","build_type":"legacy","source":{"branch":"gh-pages"}}`) + fmt.Fprint(w, `{"cname":"www.example.com","build_type":"legacy","source":{"branch":"gh-pages"}}`) }) ctx := t.Context() @@ -169,7 +169,7 @@ func TestRepositoriesService_UpdatePagesWorkflow(t *testing.T) { client, mux, _ := setup(t) input := &PagesUpdate{ - CNAME: Ptr("www.my-domain.com"), + CNAME: Ptr("www.example.com"), BuildType: Ptr("workflow"), } @@ -178,12 +178,12 @@ func TestRepositoriesService_UpdatePagesWorkflow(t *testing.T) { assertNilError(t, json.NewDecoder(r.Body).Decode(v)) testMethod(t, r, "PUT") - want := &PagesUpdate{CNAME: Ptr("www.my-domain.com"), BuildType: Ptr("workflow")} + want := &PagesUpdate{CNAME: Ptr("www.example.com"), BuildType: Ptr("workflow")} if !cmp.Equal(v, want) { t.Errorf("Request body = %+v, want %+v", v, want) } - fmt.Fprint(w, `{"cname":"www.my-domain.com","build_type":"workflow"}`) + fmt.Fprint(w, `{"cname":"www.example.com","build_type":"workflow"}`) }) ctx := t.Context() diff --git a/github/repos_test.go b/github/repos_test.go index e87210ba387..33843242c58 100644 --- a/github/repos_test.go +++ b/github/repos_test.go @@ -4378,12 +4378,12 @@ func TestSignaturesProtectedBranch_Marshal(t *testing.T) { testJSONMarshal(t, &SignaturesProtectedBranch{}, "{}") u := &SignaturesProtectedBranch{ - URL: Ptr("https://www.testURL.in"), + URL: Ptr("https://www.example.com"), Enabled: Ptr(false), } want := `{ - "url": "https://www.testURL.in", + "url": "https://www.example.com", "enabled": false }` @@ -4426,12 +4426,12 @@ func TestAdminEnforcement_Marshal(t *testing.T) { testJSONMarshal(t, &AdminEnforcement{}, "{}") u := &AdminEnforcement{ - URL: Ptr("https://www.test-url.in"), + URL: Ptr("https://www.example.com"), Enabled: false, } want := `{ - "url": "https://www.test-url.in", + "url": "https://www.example.com", "enabled": false }` diff --git a/github/search_test.go b/github/search_test.go index 91a2bab401e..ea7ca2bb42b 100644 --- a/github/search_test.go +++ b/github/search_test.go @@ -932,7 +932,7 @@ func TestLabelsSearchResult_Marshal(t *testing.T) { Labels: []*LabelResult{ { ID: Ptr(int64(1)), - URL: Ptr("https://www.test-url.com"), + URL: Ptr("https://www.example.com"), Name: Ptr("test name"), Color: Ptr("green"), Default: Ptr(true), @@ -948,7 +948,7 @@ func TestLabelsSearchResult_Marshal(t *testing.T) { "items": [ { "id": 1, - "url": "https://www.test-url.com", + "url": "https://www.example.com", "name": "test name", "color": "green", "default": true, diff --git a/github/users_gpg_keys_test.go b/github/users_gpg_keys_test.go index 127ae39b404..87fa613005e 100644 --- a/github/users_gpg_keys_test.go +++ b/github/users_gpg_keys_test.go @@ -194,12 +194,12 @@ func TestGPGEmail_Marshal(t *testing.T) { testJSONMarshal(t, &GPGEmail{}, "{}") u := &GPGEmail{ - Email: Ptr("email@abc.com"), + Email: Ptr("email@example.com"), Verified: Ptr(false), } want := `{ - "email" : "email@abc.com", + "email" : "email@example.com", "verified" : false }` diff --git a/github/users_test.go b/github/users_test.go index 317b001d704..a9523b2f30b 100644 --- a/github/users_test.go +++ b/github/users_test.go @@ -64,17 +64,17 @@ func TestUser_Marshal(t *testing.T) { Login: Ptr("testLogin"), ID: Ptr(int64(1)), NodeID: Ptr("testNode123"), - AvatarURL: Ptr("https://www.my-avatar.com"), - HTMLURL: Ptr("https://www.test-url.com"), + AvatarURL: Ptr("https://www.example.com"), + HTMLURL: Ptr("https://www.example.com"), GravatarID: Ptr("testGravatar123"), Name: Ptr("myName"), Company: Ptr("testCompany"), Blog: Ptr("test Blog"), Location: Ptr("test location"), - Email: Ptr("test@test.com"), + Email: Ptr("test@example.com"), Hireable: Ptr(true), Bio: Ptr("my good bio"), - TwitterUsername: Ptr("https://www.twitter.com/test"), + TwitterUsername: Ptr("https://www.example.com/test"), PublicRepos: Ptr(1), PublicGists: Ptr(2), Followers: Ptr(100), @@ -105,17 +105,17 @@ func TestUser_Marshal(t *testing.T) { "login": "testLogin", "id": 1, "node_id":"testNode123", - "avatar_url": "https://www.my-avatar.com", - "html_url":"https://www.test-url.com", + "avatar_url": "https://www.example.com", + "html_url":"https://www.example.com", "gravatar_id": "testGravatar123", "name": "myName", "company": "testCompany", "blog": "test Blog", "location": "test location", - "email": "test@test.com", + "email": "test@example.com", "hireable": true, "bio": "my good bio", - "twitter_username": "https://www.twitter.com/test", + "twitter_username": "https://www.example.com/test", "public_repos": 1, "public_gists":2, "followers": 100,