Repository: google/go-github (go)

Issue:
The Copilot Seat Billing API response for the assignee type can be "null"
There is a bug in the copilot seat details, per the spec null is a valid response type for the assignee:

```json
          "assignee": {
            "anyOf": [
              {
                "type": "null"
              },
```

https://docs.github.com/en/rest/copilot/copilot-user-management?apiVersion=2022-11-28#list-all-copilot-seat-assignments-for-an-organization

However, the code here errors with 
Code:
https://github.com/google/go-github/blob/eff2bbd83e04dfdb38a9a878f7756e305656a9e2/github/copilot.go#L47

https://github.com/google/go-github/blob/eff2bbd83e04dfdb38a9a878f7756e305656a9e2/github/copilot.go#L212

 it's getting tested here and expecting an error, as invalid json. 
This test checks for nil type, and returns an error, it should pass. 
https://github.com/google/go-github/blob/eff2bbd83e04dfdb38a9a878f7756e305656a9e2/github/copilot_test.go#L30


Pull request description:
fix: Handle null assignee in Copilot Seat Billing API response
### Fix: Handle `null` assignee in Copilot API response
Resolves #3616  
#### 🔧 Changes Made
- **Fixed `UnmarshalJSON` method** in `copilot.go`:
  - Added a `case nil:` branch to handle `null` `assignee` values.
  - Sets `cp.Assignee = nil` when `assignee` is `null`, instead of returning an error.
- **Updated `copilot_test.go`**:
  - Added a unit test case `"Null Assignee"` to ensure the `assignee: null` scenario is handled correctly and no error is thrown.

#### 🐛 Problem
The current implementation of `UnmarshalJSON` for `CopilotSeatDetails` throws an error when the `assignee` field is `null`, even though the [GitHub API documentation](https://docs.github.com/en/rest/copilot/copilot-user-management?apiVersion=2022-11-28#list-all-copilot-seat-assignments-for-an-organization) explicitly states that `assignee` can be `null`.




Patch:
diff --git a/github/copilot.go b/github/copilot.go
index bed83536..b4f21ad3 100644
--- a/github/copilot.go
+++ b/github/copilot.go
@@ -203,6 +203,11 @@ func (cp *CopilotSeatDetails) UnmarshalJSON(data []byte) error {
 	cp.PlanType = seatDetail.PlanType
 
 	switch v := seatDetail.Assignee.(type) {
+	case nil:
+		// Assignee can be null according to GitHub API specification.
+		// See: https://docs.github.com/en/rest/copilot/copilot-user-management?apiVersion=2022-11-28#list-all-copilot-seat-assignments-for-an-organization
+		// Note: Copilot API is in public preview and subject to change.
+		cp.Assignee = nil
 	case map[string]any:
 		jsonData, err := json.Marshal(seatDetail.Assignee)
 		if err != nil {


Test patch:
diff --git a/github/copilot_test.go b/github/copilot_test.go
index ed817613..1aeb4308 100644
--- a/github/copilot_test.go
+++ b/github/copilot_test.go
@@ -58,6 +58,16 @@ func TestCopilotSeatDetails_UnmarshalJSON(t *testing.T) {
 			want:    &CopilotSeatDetails{},
 			wantErr: true,
 		},
+		{
+			name: "Null Assignee",
+			data: `{
+					"assignee": null
+				}`,
+			want: &CopilotSeatDetails{
+				Assignee: nil,
+			},
+			wantErr: false,
+		},
 		{
 			name: "Invalid Assignee Field Type",
 			data: `{