Skip to content

Commit 0710d0b

Browse files
feat: Add actions_macos field to APIMeta struct (#3535)
1 parent 4f05dfb commit 0710d0b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

github/meta.go

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ type APIMeta struct {
5252
// GitHub Actions will originate from.
5353
Actions []string `json:"actions,omitempty"`
5454

55+
// An array of IP addresses in CIDR format specifying the IP addresses
56+
// GitHub Action macOS runner will originate from.
57+
ActionsMacos []string `json:"actions_macos,omitempty"`
58+
5559
// An array of IP addresses in CIDR format specifying the IP addresses
5660
// Dependabot will originate from.
5761
Dependabot []string `json:"dependabot,omitempty"`

github/meta_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func TestAPIMeta_Marshal(t *testing.T) {
2626
Importer: []string{"i"},
2727
GithubEnterpriseImporter: []string{"gei"},
2828
Actions: []string{"a"},
29+
ActionsMacos: []string{"192.0.2.1/32", "198.51.100.0/24"},
2930
Dependabot: []string{"d"},
3031
SSHKeyFingerprints: map[string]string{"a": "f"},
3132
SSHKeys: []string{"k"},
@@ -58,6 +59,7 @@ func TestAPIMeta_Marshal(t *testing.T) {
5859
"importer":["i"],
5960
"github_enterprise_importer":["gei"],
6061
"actions":["a"],
62+
"actions_macos":["192.0.2.1/32", "198.51.100.0/24"],
6163
"dependabot":["d"],
6264
"ssh_key_fingerprints":{"a":"f"},
6365
"ssh_keys":["k"],
@@ -75,7 +77,7 @@ func TestMetaService_Get(t *testing.T) {
7577

7678
mux.HandleFunc("/meta", func(w http.ResponseWriter, r *http.Request) {
7779
testMethod(t, r, "GET")
78-
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"]}}}`)
80+
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"]}}}`)
7981
})
8082

8183
ctx := context.Background()
@@ -91,6 +93,7 @@ func TestMetaService_Get(t *testing.T) {
9193
Importer: []string{"i"},
9294
GithubEnterpriseImporter: []string{"gei"},
9395
Actions: []string{"a"},
96+
ActionsMacos: []string{"192.0.2.1/32", "198.51.100.0/24"},
9497
Dependabot: []string{"d"},
9598
API: []string{"a"},
9699
Web: []string{"w"},

0 commit comments

Comments
 (0)