@@ -30,8 +30,23 @@ func TestAPIMeta_Marshal(t *testing.T) {
3030 SSHKeys : []string {"k" },
3131 API : []string {"a" },
3232 Web : []string {"w" },
33- Domains : map [string ][]string {
34- "example" : {"example.com" , "*.example.com" },
33+ Domains : & APIMetaDomains {
34+ Website : []string {
35+ "*.github.com" ,
36+ "*.github.dev" ,
37+ "*.github.io" ,
38+ "*.githubassets.com" ,
39+ "*.githubusercontent.com" ,
40+ },
41+ ArtifactAttestations : & APIMetaArtifactAttestations {
42+ TrustDomain : "" ,
43+ Services : []string {
44+ "*.actions.githubusercontent.com" ,
45+ "tuf-repo.github.com" ,
46+ "fulcio.githubapp.com" ,
47+ "timestamp.githubapp.com" ,
48+ },
49+ },
3550 },
3651 }
3752 want := `{
@@ -47,7 +62,7 @@ func TestAPIMeta_Marshal(t *testing.T) {
4762 "ssh_keys":["k"],
4863 "api":["a"],
4964 "web":["w"],
50- "domains":{"example ":["example. com","*.example. com"] }
65+ "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"]} }
5166 }`
5267
5368 testJSONMarshal (t , a , want )
@@ -59,7 +74,7 @@ func TestMetaService_Get(t *testing.T) {
5974
6075 mux .HandleFunc ("/meta" , func (w http.ResponseWriter , r * http.Request ) {
6176 testMethod (t , r , "GET" )
62- fmt .Fprint (w , `{"web":["w"],"api":["a"],"hooks":["h"], "git":["g"], "pages":["p"], "importer":["i"], "github_enterprise_importer": ["gei"], "actions":["a"], "dependabot":["d"], "verifiable_password_authentication": true, "domains":{"example ":["example. com","*.example. com"] }}` )
77+ fmt .Fprint (w , `{"web":["w"],"api":["a"],"hooks":["h"], "git":["g"], "pages":["p"], "importer":["i"], "github_enterprise_importer": ["gei"], "actions":["a"], "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"]} }}` )
6378 })
6479
6580 ctx := context .Background ()
@@ -78,8 +93,23 @@ func TestMetaService_Get(t *testing.T) {
7893 Dependabot : []string {"d" },
7994 API : []string {"a" },
8095 Web : []string {"w" },
81- Domains : map [string ][]string {
82- "example" : {"example.com" , "*.example.com" },
96+ Domains : & APIMetaDomains {
97+ Website : []string {
98+ "*.github.com" ,
99+ "*.github.dev" ,
100+ "*.github.io" ,
101+ "*.githubassets.com" ,
102+ "*.githubusercontent.com" ,
103+ },
104+ ArtifactAttestations : & APIMetaArtifactAttestations {
105+ TrustDomain : "" ,
106+ Services : []string {
107+ "*.actions.githubusercontent.com" ,
108+ "tuf-repo.github.com" ,
109+ "fulcio.githubapp.com" ,
110+ "timestamp.githubapp.com" ,
111+ },
112+ },
83113 },
84114
85115 VerifiablePasswordAuthentication : Bool (true ),
0 commit comments