Skip to content

Commit

Permalink
Merge branch 'development' into fix/duplicate-error-messages
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/worker-deploy.yml
#	package.json
#	yarn.lock
  • Loading branch information
gentlementlegen committed Oct 2, 2024
2 parents 3ece0fd + ea1b270 commit b4a84fe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/worker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
id: wrangler_deploy
uses: cloudflare/wrangler-action@v3
with:
wranglerVersion: "3.78.12"
wranglerVersion: "3.79.0"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
secrets: |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"tsx": "4.15.6",
"typescript": "5.4.5",
"typescript-eslint": "7.13.1",
"wrangler": "3.78.12"
"wrangler": "^3.79.0"
},
"lint-staged": {
"*.ts": [
Expand Down
16 changes: 9 additions & 7 deletions src/utils/issue.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types";
import ms from "ms";
import { Context } from "../types/context";
import { GitHubIssueSearch, Review } from "../types/payload";
Expand Down Expand Up @@ -171,16 +172,17 @@ export async function addAssignees(context: Context, issueNo: number, assignees:

export async function getAllPullRequests(context: Context, state: "open" | "closed" | "all" = "open", username: string) {
const { payload } = context;
const query: RestEndpointMethodTypes["search"]["issuesAndPullRequests"]["parameters"] = {
q: `org:${payload.repository.owner.login} author:${username} state:${state}`,
per_page: 100,
order: "desc",
sort: "created",
};

try {
return (await context.octokit.paginate(context.octokit.search.issuesAndPullRequests, {
q: `org:${payload.repository.owner.login} author:${username} state:${state}`,
per_page: 100,
order: "desc",
sort: "created",
})) as GitHubIssueSearch["items"];
return (await context.octokit.paginate(context.octokit.search.issuesAndPullRequests, query)) as GitHubIssueSearch["items"];
} catch (err: unknown) {
throw new Error(context.logger.error("Fetching all pull requests failed!", { error: err as Error }).logMessage.raw);
throw new Error(context.logger.error("Fetching all pull requests failed!", { error: err as Error, query }).logMessage.raw);
}
}

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2852,7 +2852,7 @@ __metadata:
typebox-validators: "npm:^0.3.5"
typescript: "npm:5.4.5"
typescript-eslint: "npm:7.13.1"
wrangler: "npm:3.78.12"
wrangler: "npm:^3.79.0"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -9312,9 +9312,9 @@ __metadata:
languageName: node
linkType: hard

"wrangler@npm:3.78.12":
version: 3.78.12
resolution: "wrangler@npm:3.78.12"
"wrangler@npm:^3.79.0":
version: 3.79.0
resolution: "wrangler@npm:3.79.0"
dependencies:
"@cloudflare/kv-asset-handler": "npm:0.3.4"
"@cloudflare/workers-shared": "npm:0.5.4"
Expand Down Expand Up @@ -9345,7 +9345,7 @@ __metadata:
bin:
wrangler: bin/wrangler.js
wrangler2: bin/wrangler.js
checksum: 10c0/3999ae518d43cea6c00f2be806f934e20e79460a8ba01629250e85a48c0c281399be5782f0bdc94aa245295cb464e346f59edd601fee3f924e03acccbb96ffe9
checksum: 10c0/7c96c8bd8e5152d0106991188f86bdcfb18e51c1f0dae47198cea6f0964a990506f50779b4de683d489a587fb8d21e7cfebe91b884bcc68a66e94e07223748f8
languageName: node
linkType: hard

Expand Down

0 comments on commit b4a84fe

Please sign in to comment.