Repository: google/go-github (go)

Issue:
Need a function to remove status check contexts
I want to remove all the status checks that are added under my branch protection, to do so I tried using this `UPDATE` API call with the array of status checks as empty: https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#update-status-check-protection
but I'm not able to achieve what I wanted.
Then I tried using this recent `DELETE` API to remove status checks, 
https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#remove-status-check-protection
It worked but there is no equivalent function in this go package. Can you add the same?

Pull request description:
Add RemoveRequiredStatusChecks API and tests
Fixes #1770 

Patch:
diff --git a/github/misc.go b/github/misc.go
index 458b6f7d..1fa6c4e1 100644
--- a/github/misc.go
+++ b/github/misc.go
@@ -162,13 +162,21 @@ type APIMeta struct {
 	// An Array of IP addresses specifying the addresses that source imports
 	// will originate from on GitHub.com.
 	Importer []string `json:"importer,omitempty"`
+
+	// An array of IP addresses in CIDR format specifying the IP addresses
+	// GitHub Actions will originate from.
+	Actions []string `json:"actions,omitempty"`
+
+	// An array of IP addresses in CIDR format specifying the IP addresses
+	// Dependabot will originate from.
+	Dependabot []string `json:"dependabot,omitempty"`
 }
 
 // APIMeta returns information about GitHub.com, the service. Or, if you access
 // this endpoint on your organization’s GitHub Enterprise installation, this
 // endpoint provides information about that installation.
 //
-// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/meta/
+// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/meta#get-github-meta-information
 func (c *Client) APIMeta(ctx context.Context) (*APIMeta, *Response, error) {
 	req, err := c.NewRequest("GET", "meta", nil)
 	if err != nil {
diff --git a/github/repos.go b/github/repos.go
index c8770d95..a31ad8ce 100644
--- a/github/repos.go
+++ b/github/repos.go
@@ -1137,6 +1137,19 @@ func (s *RepositoriesService) UpdateRequiredStatusChecks(ctx context.Context, ow
 	return sc, resp, nil
 }
 
+// RemoveRequiredStatusChecks removes the required status checks for a given protected branch.
+//
+// GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#remove-status-check-protection
+func (s *RepositoriesService) RemoveRequiredStatusChecks(ctx context.Context, owner, repo, branch string) (*Response, error) {
+	u := fmt.Sprintf("repos/%v/%v/branches/%v/protection/required_status_checks", owner, repo, branch)
+	req, err := s.client.NewRequest("DELETE", u, nil)
+	if err != nil {
+		return nil, err
+	}
+
+	return s.client.Do(ctx, req, nil)
+}
+
 // License gets the contents of a repository's license if one is detected.
 //
 // GitHub API docs: https://docs.github.com/en/free-pro-team@latest/rest/reference/licenses/#get-the-license-for-a-repository


Test patch:
diff --git a/github/misc_test.go b/github/misc_test.go
index c283de2b..7cab3f48 100644
--- a/github/misc_test.go
+++ b/github/misc_test.go
@@ -185,12 +185,17 @@ func TestAPIMeta_marshal(t *testing.T) {
 		VerifiablePasswordAuthentication: Bool(true),
 		Pages:                            []string{"p"},
 		Importer:                         []string{"i"},
+		Actions:                          []string{"a"},
+		Dependabot:                       []string{"d"},
 	}
 	want := `{
 		"hooks":["h"],
 		"git":["g"],
 		"verifiable_password_authentication":true,
-		"pages":["p"],"importer":["i"]
+		"pages":["p"],
+		"importer":["i"],
+		"actions":["a"],
+		"dependabot":["d"]
 	}`
 
 	testJSONMarshal(t, a, want)
@@ -202,7 +207,7 @@ func TestAPIMeta(t *testing.T) {
 
 	mux.HandleFunc("/meta", func(w http.ResponseWriter, r *http.Request) {
 		testMethod(t, r, "GET")
-		fmt.Fprint(w, `{"hooks":["h"], "git":["g"], "pages":["p"], "importer":["i"], "verifiable_password_authentication": true}`)
+		fmt.Fprint(w, `{"hooks":["h"], "git":["g"], "pages":["p"], "importer":["i"], "actions":["a"], "dependabot":["d"], "verifiable_password_authentication": true}`)
 	})
 
 	ctx := context.Background()
@@ -212,10 +217,12 @@ func TestAPIMeta(t *testing.T) {
 	}
 
 	want := &APIMeta{
-		Hooks:    []string{"h"},
-		Git:      []string{"g"},
-		Pages:    []string{"p"},
-		Importer: []string{"i"},
+		Hooks:      []string{"h"},
+		Git:        []string{"g"},
+		Pages:      []string{"p"},
+		Importer:   []string{"i"},
+		Actions:    []string{"a"},
+		Dependabot: []string{"d"},
 
 		VerifiablePasswordAuthentication: Bool(true),
 	}
diff --git a/github/repos_test.go b/github/repos_test.go
index aaa517c5..0438820d 100644
--- a/github/repos_test.go
+++ b/github/repos_test.go
@@ -1378,6 +1378,33 @@ func TestRepositoriesService_UpdateRequiredStatusChecks(t *testing.T) {
 	})
 }
 
+func TestRepositoriesService_RemoveRequiredStatusChecks(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/repos/o/r/branches/b/protection/required_status_checks", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "DELETE")
+		testHeader(t, r, "Accept", mediaTypeV3)
+		w.WriteHeader(http.StatusNoContent)
+	})
+
+	ctx := context.Background()
+	_, err := client.Repositories.RemoveRequiredStatusChecks(ctx, "o", "r", "b")
+	if err != nil {
+		t.Errorf("Repositories.RemoveRequiredStatusChecks returned error: %v", err)
+	}
+
+	const methodName = "RemoveRequiredStatusChecks"
+	testBadOptions(t, methodName, func() (err error) {
+		_, err = client.Repositories.RemoveRequiredStatusChecks(ctx, "\n", "\n", "\n")
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		return client.Repositories.RemoveRequiredStatusChecks(ctx, "o", "r", "b")
+	})
+}
+
 func TestRepositoriesService_ListRequiredStatusChecksContexts(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()