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

Issue:
macOS '*.pages' conversion
Apologies if this was raised in the past, I see that pages is not supported, what would it take to add such support?

Invalid form data: no form file found for extensions: [.bib .doc .xml .docx .fodt .html .ltx .txt .odt .ott .pdb .pdf .psw .rtf .sdw .stw .sxw .uot .vor .wps .epub .png .bmp .emf .eps .fodg .gif .jpg .jpeg .met .odd .otg .pbm .pct .pgm .ppm .ras .std .svg .svm .swf .sxd .sxw .tif .tiff .xhtml .xpm .odp .fodp .potm .pot .pptx .pps .ppt .pwp .sda .sdd .sti .sxi .uop .wmf .csv .dbf .dif .fods .ods .ots .pxl .sdc .slk .stc .sxc .uos .xls .xlt .xlsx]

I am refering to the output file of https://www.apple.com/pages/

Pull request:
feat(libreoffice): add macOS *.pages support
Closes #635.

Patch:
diff --git a/pkg/modules/libreoffice/api/api.go b/pkg/modules/libreoffice/api/api.go
index 6b0496e..6f66b1d 100644
--- a/pkg/modules/libreoffice/api/api.go
+++ b/pkg/modules/libreoffice/api/api.go
@@ -315,6 +315,7 @@ func (a *Api) Extensions() []string {
 		".xpm",
 		".odp",
 		".fodp",
+		".pages",
 		".potm",
 		".pot",
 		".pptx",


Test patch:
diff --git a/pkg/modules/libreoffice/api/api_test.go b/pkg/modules/libreoffice/api/api_test.go
index 8a63ab0..169535f 100644
--- a/pkg/modules/libreoffice/api/api_test.go
+++ b/pkg/modules/libreoffice/api/api_test.go
@@ -450,7 +450,7 @@ func TestApi_Extensions(t *testing.T) {
 	extensions := a.Extensions()
 
 	actual := len(extensions)
-	expect := 79
+	expect := 80
 
 	if actual != expect {
 		t.Errorf("expected %d extensions, but got %d", expect, actual)
Repository: JuliaML/TableTransforms.jl (julia)

Issue:
`Unitify()` should work in the presence of non-continuous variables
The transform should forward columns that cannot have units (e.g. categorical). Currently, the transform crashes in the presence of non-continuous variables.

Pull request:
closes #279

Patch:
diff --git a/src/transforms/unitify.jl b/src/transforms/unitify.jl
index d0a598c8..69e51696 100644
--- a/src/transforms/unitify.jl
+++ b/src/transforms/unitify.jl
@@ -45,7 +45,7 @@ function applyfeat(::Unitify, feat, prep)
   pairs = map(names) do name
     x = Tables.getcolumn(cols, name)
     newname, unit = _unitify(name)
-    newname => x * unit
+    newname => _addunit(x, unit)
   end
 
   newfeat = (; pairs...) |> Tables.materializer(feat)
@@ -59,7 +59,7 @@ function revertfeat(::Unitify, newfeat, fcache)
   onames = fcache
   ocolumns = map(names) do name
     x = Tables.getcolumn(cols, name)
-    ustrip.(x)
+    first(_dropunit(x))
   end
 
   𝒯 = (; zip(onames, ocolumns)...)


Test patch:
diff --git a/test/transforms/unitify.jl b/test/transforms/unitify.jl
index fcd75442..b7a2a14f 100644
--- a/test/transforms/unitify.jl
+++ b/test/transforms/unitify.jl
@@ -42,4 +42,15 @@
   @test unit(eltype(n.a)) === NoUnits
   tₒ = revert(T, n, c)
   @test tₒ == t
+
+  # non-numeric columns
+  t = Table(; anm => a, :b => rand('a':'z', 10), :c => categorical(rand(["yes", "no"], 10)))
+  T = Unitify()
+  n, c = apply(T, t)
+  @test Tables.schema(n).names == (:a, :b, :c)
+  @test unit(eltype(n.a)) === u"m"
+  @test eltype(n.b) <: Char
+  @test eltype(n.c) <: CategoricalValue
+  tₒ = revert(T, n, c)
+  @test tₒ == t
 end
Repository: labstack/echo (go)

Issue:
Custom CSRF ErrorHandler
### Issue Description
Similar to the JWT middleware which has a [ErrorHandler](https://github.com/labstack/echo/blob/6df1c355c26f7fdfde0ce85265dc7d386638f659/middleware/jwt.go#L30), it would be useful to have a similar thing for the CSRF middleware.
Why? Same as JWT, returning custom HTTP errors.

There are also `BeforeFunc`, `SuccessFunc` and `ErrorHandlerWithContext`, but I'm not sure all of these are useful. 


Pull request:
Added ErrorHandler and ErrorHandlerWithContext in CSRF middleware
Fixes #2183

Patch:
diff --git a/middleware/csrf.go b/middleware/csrf.go
index 61299f5..ea90fdb 100644
--- a/middleware/csrf.go
+++ b/middleware/csrf.go
@@ -61,7 +61,13 @@ type (
 		// Indicates SameSite mode of the CSRF cookie.
 		// Optional. Default value SameSiteDefaultMode.
 		CookieSameSite http.SameSite `yaml:"cookie_same_site"`
+
+		// ErrorHandler defines a function which is executed for returning custom errors.
+		ErrorHandler CSRFErrorHandler
 	}
+
+	// CSRFErrorHandler is a function which is executed for creating custom errors.
+	CSRFErrorHandler func(err error, c echo.Context) error
 )
 
 // ErrCSRFInvalid is returned when CSRF check fails
@@ -154,8 +160,9 @@ func CSRFWithConfig(config CSRFConfig) echo.MiddlewareFunc {
 						lastTokenErr = ErrCSRFInvalid
 					}
 				}
+				var finalErr error
 				if lastTokenErr != nil {
-					return lastTokenErr
+					finalErr = lastTokenErr
 				} else if lastExtractorErr != nil {
 					// ugly part to preserve backwards compatible errors. someone could rely on them
 					if lastExtractorErr == errQueryExtractorValueMissing {
@@ -167,7 +174,14 @@ func CSRFWithConfig(config CSRFConfig) echo.MiddlewareFunc {
 					} else {
 						lastExtractorErr = echo.NewHTTPError(http.StatusBadRequest, lastExtractorErr.Error())
 					}
-					return lastExtractorErr
+					finalErr = lastExtractorErr
+				}
+
+				if finalErr != nil {
+					if config.ErrorHandler != nil {
+						return config.ErrorHandler(finalErr, c)
+					}
+					return finalErr
 				}
 			}
 


Test patch:
diff --git a/middleware/csrf_test.go b/middleware/csrf_test.go
index 9aff82a..6bccdbe 100644
--- a/middleware/csrf_test.go
+++ b/middleware/csrf_test.go
@@ -358,3 +358,25 @@ func TestCSRFConfig_skipper(t *testing.T) {
 		})
 	}
 }
+
+func TestCSRFErrorHandling(t *testing.T) {
+	cfg := CSRFConfig{
+		ErrorHandler: func(err error, c echo.Context) error {
+			return echo.NewHTTPError(http.StatusTeapot, "error_handler_executed")
+		},
+	}
+
+	e := echo.New()
+	e.POST("/", func(c echo.Context) error {
+		return c.String(http.StatusNotImplemented, "should not end up here")
+	})
+
+	e.Use(CSRFWithConfig(cfg))
+
+	req := httptest.NewRequest(http.MethodPost, "/", nil)
+	res := httptest.NewRecorder()
+	e.ServeHTTP(res, req)
+
+	assert.Equal(t, http.StatusTeapot, res.Code)
+	assert.Equal(t, "{\"message\":\"error_handler_executed\"}\n", res.Body.String())
+}
Repository: Redocly/redoc (ts)

Issue:
[OAS3] when summary is empty, use $request_type $path
When summary is empty, the generated docs have 'no summary'

Instead, use '$request_type $path' as a summary, eg
GET /users/{username}

Thanks

Pull request:
Improve operational summary
resolves #1270

Show path instead of `<no summary>` in sidebar menu

![Selection_477](https://user-images.githubusercontent.com/7952949/116601086-b7ad9f00-a932-11eb-8cb5-0655ad640df8.png)



Patch:
diff --git a/src/utils/openapi.ts b/src/utils/openapi.ts
index e20dbef9..71af2572 100644
--- a/src/utils/openapi.ts
+++ b/src/utils/openapi.ts
@@ -1,12 +1,12 @@
 import { dirname } from 'path';
 import * as URLtemplate from 'url-template';
 
+import { ExtendedOpenAPIOperation } from '../services';
 import { FieldModel } from '../services/models';
 import { OpenAPIParser } from '../services/OpenAPIParser';
 import {
   OpenAPIEncoding,
   OpenAPIMediaType,
-  OpenAPIOperation,
   OpenAPIParameter,
   OpenAPIParameterStyle,
   OpenAPISchema,
@@ -62,12 +62,13 @@ export function isOperationName(key: string): boolean {
   return key in operationNames;
 }
 
-export function getOperationSummary(operation: OpenAPIOperation): string {
+export function getOperationSummary(operation: ExtendedOpenAPIOperation): string {
   return (
     operation.summary ||
     operation.operationId ||
     (operation.description && operation.description.substring(0, 50)) ||
-    '<no summary>'
+    operation.pathName ||
+   '<no summary>'
   );
 }
 


Test patch:
diff --git a/src/utils/__tests__/openapi.test.ts b/src/utils/__tests__/openapi.test.ts
index 9e511259..7050f36f 100644
--- a/src/utils/__tests__/openapi.test.ts
+++ b/src/utils/__tests__/openapi.test.ts
@@ -101,6 +101,13 @@ describe('Utils', () => {
       expect(getOperationSummary(operation as any).length).toBe(50);
     });
 
+    it('Should return pathName if no summary, operationId, description', () => {
+      const operation = {
+        pathName: '/sandbox/test'
+      };
+      expect(getOperationSummary(operation as any)).toBe('/sandbox/test');
+    });
+
     it('Should return <no summary> if no info', () => {
       const operation = {
         description: undefined,
Repository: phpstan/phpstan-doctrine (php)

Issue:
EntityNotFinalRule should allow for final keyword for embeddables
## State

Project with some entities and embeddables.

## Current

```
 ------ -------------------------------------------------------------------------------------------- 
  Line   src/Entity/Bar.php                                                                      
 ------ -------------------------------------------------------------------------------------------- 
  10     Entity class App\Foo\Entity\Bar is final which can cause problems with proxies.  
 ------ -------------------------------------------------------------------------------------------- 
```

## Expected

No errors :)

Pull request:
Allow for final embeddable class
Fixes #215 

Patch:
diff --git a/src/Rules/Doctrine/ORM/EntityNotFinalRule.php b/src/Rules/Doctrine/ORM/EntityNotFinalRule.php
index c69112b..a80fbe6 100644
--- a/src/Rules/Doctrine/ORM/EntityNotFinalRule.php
+++ b/src/Rules/Doctrine/ORM/EntityNotFinalRule.php
@@ -43,6 +43,11 @@ class EntityNotFinalRule implements Rule
 			return [];
 		}
 
+		$metadata = $this->objectMetadataResolver->getClassMetadata($classReflection->getName());
+		if ($metadata !== null && $metadata->isEmbeddedClass === true) {
+			return [];
+		}
+
 		return [sprintf(
 			'Entity class %s is final which can cause problems with proxies.',
 			$classReflection->getDisplayName()


Test patch:
diff --git a/tests/Rules/Doctrine/ORM/EntityNotFinalRuleTest.php b/tests/Rules/Doctrine/ORM/EntityNotFinalRuleTest.php
index cd29cf9..7ee88a3 100644
--- a/tests/Rules/Doctrine/ORM/EntityNotFinalRuleTest.php
+++ b/tests/Rules/Doctrine/ORM/EntityNotFinalRuleTest.php
@@ -72,6 +72,16 @@ class EntityNotFinalRuleTest extends RuleTestCase
 			__DIR__ . '/data/MyEntity.php',
 			[],
 		];
+
+		yield 'final embeddable' => [
+			__DIR__ . '/data/FinalEmbeddable.php',
+			[],
+		];
+
+		yield 'non final embeddable' => [
+			__DIR__ . '/data/MyEmbeddable.php',
+			[],
+		];
 	}
 
 }
diff --git a/tests/Rules/Doctrine/ORM/data/FinalEmbeddable.php b/tests/Rules/Doctrine/ORM/data/FinalEmbeddable.php
new file mode 100644
index 0000000..2dedb38
--- /dev/null
+++ b/tests/Rules/Doctrine/ORM/data/FinalEmbeddable.php
@@ -0,0 +1,21 @@
+<?php declare(strict_types = 1);
+
+namespace PHPStan\Rules\Doctrine\ORM;
+
+use Doctrine\ORM\Mapping as ORM;
+
+/**
+ * @ORM\Embeddable()
+ */
+final class FinalEmbeddable
+{
+	/**
+	 * @ORM\Id()
+	 * @ORM\GeneratedValue()
+	 * @ORM\Column(type="integer")
+	 *
+	 * @var int
+	 */
+	private $id;
+
+}
diff --git a/tests/Rules/Doctrine/ORM/data/MyEmbeddable.php b/tests/Rules/Doctrine/ORM/data/MyEmbeddable.php
new file mode 100644
index 0000000..61e83f6
--- /dev/null
+++ b/tests/Rules/Doctrine/ORM/data/MyEmbeddable.php
@@ -0,0 +1,17 @@
+<?php declare(strict_types = 1);
+
+namespace PHPStan\Rules\Doctrine\ORM;
+
+use Doctrine\ORM\Mapping as ORM;
+
+/**
+ * @ORM\Embeddable()
+ */
+class MyEmbeddable
+{
+	/**
+	 * @var string
+	 * @ORM\Column(type="string")
+	 */
+	private $title;
+}