nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: line/line-bot-sdk-go
Pull request #277 (2021-04-17 03:25:48)

use boolean for Active in WebhookInfoResponse
bugfix for #276


CLAassistant: [![CLA assistant check](https://cla-assistant.io/pull/badge/not_signed)](https://cla-assistant.io/line/line-bot-sdk-go?pullRequest=277) <br/>Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla-assistant.io/line/line-bot-sdk-go?pullRequest=277) before we can accept your contribution.<br/><hr/>**Hiro Ogawa** seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please [add the email address used for this commit to your account](https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user).<br/><sub>You have signed the CLA already but the status is still pending? Let us [recheck](https://cla-assistant.io/check/line/line-bot-sdk-go?pullRequest=277) it.</sub>

Patch:
diff --git a/linebot/response.go b/linebot/response.go
index a922428..397c74d 100644
--- a/linebot/response.go
+++ b/linebot/response.go
@@ -262,7 +262,7 @@ type LinkTokenResponse struct {
 // WebhookInfoResponse type
 type WebhookInfoResponse struct {
 	Endpoint string `json:"endpoint"`
-	Active   string `json:"active"`
+	Active   bool   `json:"active"`
 }
 
 // isSuccess checks if status code is 2xx: The action was successfully received,


Test patch:
diff --git a/linebot/webhook_test.go b/linebot/webhook_test.go
index 01e28da..2a957dd 100644
--- a/linebot/webhook_test.go
+++ b/linebot/webhook_test.go
@@ -1170,13 +1170,13 @@ func TestGetWebhookInfo(t *testing.T) {
 		{
 			Label:        "Success",
 			ResponseCode: 200,
-			Response:     []byte(`{"endpoint":"https://example.herokuapp.com/test","active":"true"}`),
+			Response:     []byte(`{"endpoint":"https://example.herokuapp.com/test","active":true}`),
 			Want: want{
 				URLPath:     APIEndpointGetWebhookInfo,
 				RequestBody: []byte(""),
 				Response: &WebhookInfoResponse{
 					Endpoint: "https://example.herokuapp.com/test",
-					Active:   "true",
+					Active:   true,
 				},
 			},
 		},
@@ -1292,7 +1292,7 @@ func TestGetWebhookInfoWithContext(t *testing.T) {
 func BenchmarkGetWebhookInfo(b *testing.B) {
 	server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
 		defer r.Body.Close()
-		w.Write([]byte(`{"endpoint":"https://example.herokuapp.com/test","active":"true"}`))
+		w.Write([]byte(`{"endpoint":"https://example.herokuapp.com/test","active":true}`))
 	}))
 	defer server.Close()
Repository: line/line-bot-sdk-go
Pull request #294 (2021-10-27 10:34:44)

add border width for box component
I need to use border in box component but It missing border width, so I add border width for box component and update test case


Patch:
diff --git a/linebot/flex.go b/linebot/flex.go
index 90105cf..9072e70 100644
--- a/linebot/flex.go
+++ b/linebot/flex.go
@@ -488,6 +488,7 @@ type BoxComponent struct {
 	CornerRadius    FlexComponentCornerRadiusType
 	BackgroundColor string
 	BorderColor     string
+	BorderWidth     string
 	Action          TemplateAction
 	JustifyContent  FlexComponentJustifyContentType
 	AlignItems      FlexComponentAlignItemsType
@@ -518,6 +519,7 @@ func (c *BoxComponent) MarshalJSON() ([]byte, error) {
 		CornerRadius    FlexComponentCornerRadiusType   `json:"cornerRadius,omitempty"`
 		BackgroundColor string                          `json:"backgroundColor,omitempty"`
 		BorderColor     string                          `json:"borderColor,omitempty"`
+		BorderWidth     string                          `json:"borderWidth,omitempty"`
 		Action          TemplateAction                  `json:"action,omitempty"`
 		JustifyContent  FlexComponentJustifyContentType `json:"justifyContent,omitempty"`
 		AlignItems      FlexComponentAlignItemsType     `json:"alignItems,omitempty"`
@@ -544,6 +546,7 @@ func (c *BoxComponent) MarshalJSON() ([]byte, error) {
 		CornerRadius:    c.CornerRadius,
 		BackgroundColor: c.BackgroundColor,
 		BorderColor:     c.BorderColor,
+		BorderWidth:     c.BorderWidth,
 		Action:          c.Action,
 		JustifyContent:  c.JustifyContent,
 		AlignItems:      c.AlignItems,


Test patch:
diff --git a/linebot/flex_test.go b/linebot/flex_test.go
index cade97e..552c911 100644
--- a/linebot/flex_test.go
+++ b/linebot/flex_test.go
@@ -29,6 +29,40 @@ func TestUnmarshalFlexMessageJSON(t *testing.T) {
 		{
 			JSON: []byte(`{
 	"type": "bubble",
+	"body": {
+		"type": "box",
+		"layout": "vertical",
+		"borderColor": "#000000",
+		"borderWidth": "2px",
+		"cornerRadius": "20px",
+		"contents": [
+			{
+				"type": "text",
+				"text": "hello"
+			}
+		]
+	}
+}`),
+			Want: &BubbleContainer{
+				Type: FlexContainerTypeBubble,
+				Body: &BoxComponent{
+					Type:         FlexComponentTypeBox,
+					Layout:       FlexBoxLayoutTypeVertical,
+					BorderColor:  "#000000",
+					BorderWidth:  "2px",
+					CornerRadius: "20px",
+					Contents: []FlexComponent{
+						&TextComponent{
+							Type: FlexComponentTypeText,
+							Text: "hello",
+						},
+					},
+				},
+			},
+		},
+		{
+			JSON: []byte(`{
+	"type": "bubble",
 	"body": {
 		"type": "box",
 		"layout": "vertical",
Repository: line/line-bot-sdk-go
Pull request #356 (2023-09-12 22:37:28)

fix: Use POST method for Test Webhook endpoiont
i got an error below when consuming TestWebhook endpoint.
`"failed":"linebot: APIError 405 The request method, 'GET', is not supported`

it seems only post method is allowed according to the doc. 
https://developers.line.biz/en/reference/messaging-api/#test-webhook-endpoint


Patch:
diff --git a/linebot/webhook.go b/linebot/webhook.go
index 4324630..9fbc7ef 100644
--- a/linebot/webhook.go
+++ b/linebot/webhook.go
@@ -164,7 +164,7 @@ func (call *TestWebhook) WithContext(ctx context.Context) *TestWebhook {
 
 // Do method
 func (call *TestWebhook) Do() (*TestWebhookResponse, error) {
-	res, err := call.c.get(call.ctx, call.c.endpointBase, call.endpoint, nil)
+	res, err := call.c.post(call.ctx, call.endpoint, nil)
 	if err != nil {
 		return nil, err
 	}


Test patch:
diff --git a/linebot/webhook_test.go b/linebot/webhook_test.go
index 6be7d51..4f6e8f5 100644
--- a/linebot/webhook_test.go
+++ b/linebot/webhook_test.go
@@ -1864,6 +1864,28 @@ func TestTestWebhook(t *testing.T) {
 				},
 			},
 		},
+		{
+			Label:        "Failed with timeout",
+			ResponseCode: 200,
+			Response: []byte(`{
+				"success": false,
+				"timestamp": "2023-09-12T14:00:10.015Z",
+				"statusCode": 0,
+				"reason": "REQUEST_TIMEOUT",
+				"detail": "Request timeout: https://example.com/"
+			}`),
+			Want: want{
+				URLPath:     APIEndpointTestWebhook,
+				RequestBody: []byte(""),
+				Response: &TestWebhookResponse{
+					Success:    false,
+					Timestamp:  time.Date(2023, time.September, 12, 14, 00, 10, int(15*time.Millisecond), time.UTC),
+					StatusCode: 0,
+					Reason:     "REQUEST_TIMEOUT",
+					Detail:     "Request timeout: https://example.com/",
+				},
+			},
+		},
 		{
 			Label:        "Internal server error",
 			ResponseCode: 500,
@@ -1897,8 +1919,8 @@ func TestTestWebhook(t *testing.T) {
 	server := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
 		defer r.Body.Close()
 		tc := testCases[currentTestIdx]
-		if r.Method != http.MethodGet {
-			t.Errorf("Method %s; want %s", r.Method, http.MethodGet)
+		if r.Method != http.MethodPost {
+			t.Errorf("Method %s; want %s", r.Method, http.MethodPost)
 		}
 		if r.URL.Path != tc.Want.URLPath {
 			t.Errorf("URLPath %s; want %s", r.URL.Path, tc.Want.URLPath)