nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: xanzy/go-gitlab
Pull request #1430 (2022-03-26 08:32:59)

Support `namespace_id` for `GET /users/...` as admin
See the [docs](https://docs.gitlab.com/ee/api/users.html#:~:text=For%20admins-,The%20namespace_id%20field%20in%20the%20response%20was%20introduced%20in%20GitLab%2014.10.,-GET%20/users)

I've introduced this field for GitLab 14.10 and require it in the provider :)


Patch:
diff --git a/users.go b/users.go
index 4e04e3a..94f505c 100644
--- a/users.go
+++ b/users.go
@@ -99,6 +99,7 @@ type User struct {
 	ExtraSharedRunnersMinutesLimit int                `json:"extra_shared_runners_minutes_limit"`
 	UsingLicenseSeat               bool               `json:"using_license_seat"`
 	CustomAttributes               []*CustomAttribute `json:"custom_attributes"`
+	NamespaceID                    int                `json:"namespace_id"`
 }
 
 // UserIdentity represents a user identity.


Test patch:
diff --git a/testdata/get_user_admin.json b/testdata/get_user_admin.json
index 29d5a42..401e626 100644
--- a/testdata/get_user_admin.json
+++ b/testdata/get_user_admin.json
@@ -38,5 +38,6 @@
   "last_sign_in_ip": "2001:db8::68",
   "plan": "gold",
   "trial": true,
-  "sign_in_count": 1337
+  "sign_in_count": 1337,
+  "namespace_id": 42
 }
diff --git a/users_test.go b/users_test.go
index edfc400..3a388e0 100644
--- a/users_test.go
+++ b/users_test.go
@@ -115,6 +115,7 @@ func TestGetUserAdmin(t *testing.T) {
 		TwoFactorEnabled: true,
 		Note:             "DMCA Request: 2018-11-05 | DMCA Violation | Abuse | https://gitlab.zendesk.com/agent/tickets/123",
 		Identities:       []*UserIdentity{{Provider: "github", ExternUID: "2435223452345"}},
+		NamespaceID:      42,
 	}
 	require.Equal(t, want, user)
 }
Repository: xanzy/go-gitlab
Pull request #1513 (2022-07-28 07:12:52)

BlockingDiscussionsResolved field for MergeEvent
* Added `blocking_discussions_resolved` field

https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#merge-request-events


Patch:
diff --git a/event_webhook_types.go b/event_webhook_types.go
index c777ab0..bf6d478 100644
--- a/event_webhook_types.go
+++ b/event_webhook_types.go
@@ -520,11 +520,12 @@ type MergeEvent struct {
 				Email string `json:"email"`
 			} `json:"author"`
 		} `json:"last_commit"`
-		WorkInProgress bool       `json:"work_in_progress"`
-		URL            string     `json:"url"`
-		Action         string     `json:"action"`
-		OldRev         string     `json:"oldrev"`
-		Assignee       *EventUser `json:"assignee"`
+		BlockingDiscussionsResolved bool       `json:"blocking_discussions_resolved"`
+		WorkInProgress              bool       `json:"work_in_progress"`
+		URL                         string     `json:"url"`
+		Action                      string     `json:"action"`
+		OldRev                      string     `json:"oldrev"`
+		Assignee                    *EventUser `json:"assignee"`
 	} `json:"object_attributes"`
 	Repository *Repository  `json:"repository"`
 	Assignee   *EventUser   `json:"assignee"`


Test patch:
diff --git a/event_webhook_types_test.go b/event_webhook_types_test.go
index 1a75e29..5ac45d0 100644
--- a/event_webhook_types_test.go
+++ b/event_webhook_types_test.go
@@ -211,6 +211,10 @@ func TestMergeEventUnmarshal(t *testing.T) {
 		t.Errorf("Commit Username is %s, want %s", name, "GitLab dev user")
 	}
 
+	if event.ObjectAttributes.BlockingDiscussionsResolved != true {
+		t.Errorf("BlockingDiscussionsResolved isn't true")
+	}
+
 	if event.Assignees[0].ID != expectedID {
 		t.Errorf("Assignees[0].ID is %v, want %v", event.Assignees[0].ID, expectedID)
 	}
diff --git a/testdata/webhooks/merge_request.json b/testdata/webhooks/merge_request.json
index 2bc8406..c52d560 100644
--- a/testdata/webhooks/merge_request.json
+++ b/testdata/webhooks/merge_request.json
@@ -88,6 +88,7 @@
         "email": "gitlabdev@dv6700.(none)"
       }
     },
+    "blocking_discussions_resolved": true,
     "work_in_progress": false,
     "url": "http://example.com/diaspora/merge_requests/1",
     "action": "open",