PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: codecov/uploader (ts)

Issue:
Uploads to Service Travis CI Fail With Status Code 400
**Describe the bug**
Uploads to Travis CI fail.

**To Reproduce**
1. Go to https://travis-ci.com/github/tagatac/bagoup/builds/235325025#L340
2. Click on the arrow next to line 296
3. Scroll down to line 340
4. See error `Error uploading to Codecov when fetching PUT (inner): 400 Invalid request parameters`

**Expected behavior**
The coverage report is uploaded and processed without issue.

**Additional context**
See for comparison a successful upload of the same report, disguised as a local CI provider by unsetting the environment variable `CI`: https://travis-ci.com/github/tagatac/bagoup/builds/235324541

Note in the failing example `pr=NaN` could be problematic.

Pull request:
Convert NaN PR numbers to the empty string
Fixes #301 

Linux binary tested [here](https://app.travis-ci.com/github/tagatac/bagoup/builds/236026747) and looks good:
```
[2021-08-23T19:39:44.624Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.0&token=*******&branch=codecov-400&build=33.1&build_url=&commit=a3c175b59f8ed4541457c911c36ecd1dc039ea1b&job=533308429&pr=&service=travis&slug=tagatac/bagoup&name=&tag=&flags=&parent=
[2021-08-23T19:39:44.900Z] ['info'] Uploading...
[2021-08-23T19:39:45.067Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/tagatac/bagoup/commit/a3c175b59f8ed4541457c911c36ecd1dc039ea1b"}
```

Patch:
diff --git a/src/helpers/web.ts b/src/helpers/web.ts
index 50dbb29..82c375f 100644
--- a/src/helpers/web.ts
+++ b/src/helpers/web.ts
@@ -111,7 +111,7 @@ export async function uploadToCodecov(
  */
 export function generateQuery(queryParams: IServiceParams): string {
   checkValueType('pr', queryParams.pr, 'number')
-  if (queryParams.pr === 0) {
+  if (queryParams.pr === 0  || isNaN(Number(queryParams.pr))) {
     queryParams.pr = ''
   }
   return Object.entries(queryParams)


Test patch:
diff --git a/test/helpers/web.test.ts b/test/helpers/web.test.ts
index 9ababdb..72af2bc 100644
--- a/test/helpers/web.test.ts
+++ b/test/helpers/web.test.ts
@@ -93,6 +93,25 @@ describe('Web Helpers', () => {
     )
   })
 
+  it('NaN PR numbers are not propagated to the query', () => {
+    const queryParams: IServiceParams  = {
+      branch: 'testBranch',
+      commit: 'commitSHA',
+      build: '4',
+      buildURL: 'https://ci-providor.local/job/xyz',
+      name: 'testName',
+      tag: 'tagV1',
+      slug: 'testOrg/testRepo',
+      service: 'testingCI',
+      flags: 'unit,uploader',
+      pr: NaN,
+      job: '6',
+    }
+    expect(generateQuery(queryParams)).toBe(
+      'branch=testBranch&commit=commitSHA&build=4&build_url=https://ci-providor.local/job/xyz&name=testName&tag=tagV1&slug=testOrg/testRepo&service=testingCI&flags=unit,uploader&pr=&job=6',
+    )
+  })
+
   it('can populateBuildParams() from args', () => {
     const result = populateBuildParams(
       { args: { flags: 'testFlag', tag: 'testTag' }, environment: {} },
Repository: google/go-safeweb (go)

Issue:
Mismatch between the directory name and package name of the Fetch Metadata plugin
Currently it has to be imported like this:

```
import fetchmetadata "github.com/google/go-safeweb/safehttp/plugins/fetch_metadata"
```

Pull request:
Remove "_" from fetch_metadata to make imports nicer.
Fixes #232.

Patch:
diff --git a/examples/echo/security/web/web.go b/examples/echo/security/web/web.go
index ebcc6f3..4d51b4f 100644
--- a/examples/echo/security/web/web.go
+++ b/examples/echo/security/web/web.go
@@ -26,7 +26,7 @@ import (
 	"github.com/google/go-safeweb/safehttp/plugins/coop"
 	"github.com/google/go-safeweb/safehttp/plugins/cors"
 	"github.com/google/go-safeweb/safehttp/plugins/csp"
-	fetchmetadata "github.com/google/go-safeweb/safehttp/plugins/fetch_metadata"
+	"github.com/google/go-safeweb/safehttp/plugins/fetchmetadata"
 	"github.com/google/go-safeweb/safehttp/plugins/hostcheck"
 	"github.com/google/go-safeweb/safehttp/plugins/hsts"
 	"github.com/google/go-safeweb/safehttp/plugins/staticheaders"


Test patch:
diff --git a/safehttp/plugins/fetch_metadata/fetch_metadata.go b/safehttp/plugins/fetchmetadata/fetchmetadata.go
similarity index 100%
rename from safehttp/plugins/fetch_metadata/fetch_metadata.go
rename to safehttp/plugins/fetchmetadata/fetchmetadata.go
diff --git a/safehttp/plugins/fetch_metadata/fetch_metadata_test.go b/safehttp/plugins/fetchmetadata/fetchmetadata_test.go
similarity index 99%
rename from safehttp/plugins/fetch_metadata/fetch_metadata_test.go
rename to safehttp/plugins/fetchmetadata/fetchmetadata_test.go
index eba7eb6..33d9358 100644
--- a/safehttp/plugins/fetch_metadata/fetch_metadata_test.go
+++ b/safehttp/plugins/fetchmetadata/fetchmetadata_test.go
@@ -19,7 +19,7 @@ import (
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-safeweb/safehttp"
-	"github.com/google/go-safeweb/safehttp/plugins/fetch_metadata"
+	"github.com/google/go-safeweb/safehttp/plugins/fetchmetadata"
 	"github.com/google/go-safeweb/safehttp/safehttptest"
 )