@@ -30,8 +30,23 @@ func TestAPIMeta_Marshal(t *testing.T) {
30
30
SSHKeys : []string {"k" },
31
31
API : []string {"a" },
32
32
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
+ },
35
50
},
36
51
}
37
52
want := `{
@@ -47,7 +62,7 @@ func TestAPIMeta_Marshal(t *testing.T) {
47
62
"ssh_keys":["k"],
48
63
"api":["a"],
49
64
"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"]} }
51
66
}`
52
67
53
68
testJSONMarshal (t , a , want )
@@ -59,7 +74,7 @@ func TestMetaService_Get(t *testing.T) {
59
74
60
75
mux .HandleFunc ("/meta" , func (w http.ResponseWriter , r * http.Request ) {
61
76
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"]} }}` )
63
78
})
64
79
65
80
ctx := context .Background ()
@@ -78,8 +93,23 @@ func TestMetaService_Get(t *testing.T) {
78
93
Dependabot : []string {"d" },
79
94
API : []string {"a" },
80
95
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
+ },
83
113
},
84
114
85
115
VerifiablePasswordAuthentication : Bool (true ),
0 commit comments