File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,6 @@ import { open } from 'sqlite'
66import { nanoid } from 'nanoid'
77
88const dbfile = 'github-archive.sqlite'
9- const events = [
10- 'issues' ,
11- 'issue_comment' ,
12- 'pull_request' ,
13- 'pull_request_review' ,
14- 'pull_request_review_comment' ,
15- ]
169async function run ( ) : Promise < void > {
1710 const now = new Date ( ) . toISOString ( )
1811 const id = nanoid ( )
@@ -33,10 +26,6 @@ async function run(): Promise<void> {
3326 core . endGroup ( )
3427
3528 const eventName = github . context . eventName
36- if ( ! events . includes ( eventName ) ) {
37- throw new Error ( `Unsupported event type: ${ eventName } ` )
38- }
39-
4029 // Actions can be triggered in parallel
4130 // As a result, several invocations of this code might be
4231 // executing right now.
@@ -71,11 +60,7 @@ async function run(): Promise<void> {
7160 )
7261 await db . close ( )
7362 await exec ( 'git' , [ 'add' , dbfile ] )
74- await exec ( 'git' , [
75- 'commit' ,
76- '-m' ,
77- `Capturing event ${ eventName } (id: ${ id } )` ,
78- ] )
63+ await exec ( 'git' , [ 'commit' , '-m' , `${ eventName } ${ id } ` ] )
7964 try {
8065 await exec ( 'git' , [ 'push' ] )
8166 // if the push succeeded, we're finished
You can’t perform that action at this time.
0 commit comments