Skip to content

feat: Add actions_macos field to APIMeta struct #3535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions github/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ type APIMeta struct {
// GitHub Actions will originate from.
Actions []string `json:"actions,omitempty"`

// An array of IP addresses in CIDR format specifying the IP addresses
// GitHub Action macOS runner will originate from.
ActionsMacos []string `json:"actions_macos,omitempty"`

// An array of IP addresses in CIDR format specifying the IP addresses
// Dependabot will originate from.
Dependabot []string `json:"dependabot,omitempty"`
Expand Down
5 changes: 4 additions & 1 deletion github/meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,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"},
Dependabot: []string{"d"},
SSHKeyFingerprints: map[string]string{"a": "f"},
SSHKeys: []string{"k"},
Expand Down Expand Up @@ -58,6 +59,7 @@ 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"],
"dependabot":["d"],
"ssh_key_fingerprints":{"a":"f"},
"ssh_keys":["k"],
Expand All @@ -75,7 +77,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"], "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": ["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"]}}}`)
})

ctx := context.Background()
Expand All @@ -91,6 +93,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"},
Dependabot: []string{"d"},
API: []string{"a"},
Web: []string{"w"},
Expand Down
Loading