File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ export default eventHandler(async (event) => {
66 const query = getQuery ( event ) ;
77
88 const cursor = ( query . cursor as string ) || undefined ;
9- // let objectCount = 0;
109
1110 const packagesPrefix = `${ usePackagesBucket . base } :` ;
1211 const cursorsPrefix = `${ useCursorsBucket . base } :` ;
@@ -15,7 +14,6 @@ export default eventHandler(async (event) => {
1514 const results = [ ] ;
1615
1716 const response = await binding . list ( { cursor, limit : 500 } ) ;
18- // objectCount += response.objects.length;
1917
2018 for ( const { key } of response . objects ) {
2119 let result = null ;
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import { hash } from "ohash";
44import type { PullRequestData , WorkflowData } from "../types" ;
55
66// mark a PR as a PR :)
7- const prMarkEvents = new Set < PullRequestEvent [ "action" ] > ( [
7+ const prMarkEvents : PullRequestEvent [ "action" ] [ ] = [
88 "opened" ,
99 "reopened" ,
1010 "synchronize" ,
11- ] ) ;
11+ ] ;
1212
1313export default eventHandler ( async ( event ) => {
1414 const app = useOctokitApp ( event ) ;
@@ -80,7 +80,7 @@ export default eventHandler(async (event) => {
8080 ref : payload . pull_request . head . ref ,
8181 } ;
8282
83- if ( prMarkEvents . has ( payload . action ) ) {
83+ if ( prMarkEvents . includes ( payload . action ) ) {
8484 await pullRequestNumbersBucket . setItem (
8585 `${ key . full_name } :${ key . ref } ` ,
8686 payload . number ,
Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ const githubUrlRegex =
55
66export function extractOwnerAndRepo (
77 repositoryUrl : string ,
8- ) : [ string , string ] | undefined {
8+ ) : [ string , string ] | null {
99 const match = repositoryUrl . match ( githubUrlRegex ) ;
1010
1111 if ( match ) {
1212 return [ match [ 1 ] , match [ 2 ] ] ;
1313 }
1414
15- return undefined ;
15+ return null ;
1616}
1717
1818export function extractRepository ( manifest : PackageManifest ) {
You can’t perform that action at this time.
0 commit comments