PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: google/go-github (go)

Issue:
Support preview revoke installation token endpoint
GitHub Developer API announcement:
https://developer.github.com/changes/2020-01-10-revoke-installation-token/

This would be a great PR for any new contributor to this repo or a new Go developer.
All contributions are greatly appreciated!

Feel free to volunteer for any issue and the issue can be assigned to you so that others don't attempt to duplicate the work.

Please check out our [CONTRIBUTING.md](https://github.com/google/go-github/blob/master/CONTRIBUTING.md) guide to get started.

Thank you!

Pull request:
Added support to revoke apps installation token
This PR fixes #1385 

Patch:
diff --git a/github/apps_installation.go b/github/apps_installation.go
index 09d4043f..c2e3b4ca 100644
--- a/github/apps_installation.go
+++ b/github/apps_installation.go
@@ -101,3 +101,17 @@ func (s *AppsService) RemoveRepository(ctx context.Context, instID, repoID int64
 
 	return s.client.Do(ctx, req, nil)
 }
+
+// RevokeInstallationToken revokes an installation token.
+//
+// GitHub docs: https://developer.github.com/v3/apps/installations/#revoke-an-installation-token
+func (s *AppsService) RevokeInstallationToken(ctx context.Context) (*Response, error) {
+	u := "installation/token"
+	req, err := s.client.NewRequest("DELETE", u, nil)
+	if err != nil {
+		return nil, err
+	}
+	req.Header.Set("Accept", mediaTypeRevokeTokenPreview)
+
+	return s.client.Do(ctx, req, nil)
+}
diff --git a/github/github.go b/github/github.go
index b752c37b..70136105 100644
--- a/github/github.go
+++ b/github/github.go
@@ -46,6 +46,9 @@ const (
 
 	// Media Type values to access preview APIs
 
+	// https://developer.github.com/changes/2020-01-10-revoke-installation-token/
+	mediaTypeRevokeTokenPreview = "application/vnd.github.gambit-preview+json"
+
 	// https://developer.github.com/changes/2014-12-09-new-attributes-for-stars-api/
 	mediaTypeStarringPreview = "application/vnd.github.v3.star+json"
 


Test patch:
diff --git a/github/apps_installation_test.go b/github/apps_installation_test.go
index 745e1e5d..10955bf5 100644
--- a/github/apps_installation_test.go
+++ b/github/apps_installation_test.go
@@ -101,3 +101,19 @@ func TestAppsService_RemoveRepository(t *testing.T) {
 		t.Errorf("Apps.RemoveRepository returned error: %v", err)
 	}
 }
+
+func TestAppsService_RevokeInstallationToken(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+
+	mux.HandleFunc("/installation/token", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "DELETE")
+		testHeader(t, r, "Accept", mediaTypeRevokeTokenPreview)
+		w.WriteHeader(http.StatusNoContent)
+	})
+
+	_, err := client.Apps.RevokeInstallationToken(context.Background())
+	if err != nil {
+		t.Errorf("Apps.RevokeInstallationToken returned error: %v", err)
+	}
+}