@@ -37,13 +37,6 @@ const sqlite3_1 = __importDefault(__nccwpck_require__(4946));
3737const sqlite_1 = __nccwpck_require__(2515);
3838const nanoid_1 = __nccwpck_require__(9140);
3939const dbfile = 'github-archive.sqlite';
40- const events = [
41- 'issues',
42- 'issue_comment',
43- 'pull_request',
44- 'pull_request_review',
45- 'pull_request_review_comment',
46- ];
4740async function run() {
4841 const now = new Date().toISOString();
4942 const id = nanoid_1.nanoid();
@@ -60,9 +53,6 @@ async function run() {
6053 core.debug('Configured git user.name/user.email');
6154 core.endGroup();
6255 const eventName = github.context.eventName;
63- if (!events.includes(eventName)) {
64- throw new Error(`Unsupported event type: ${eventName}`);
65- }
6656 // Actions can be triggered in parallel
6757 // As a result, several invocations of this code might be
6858 // executing right now.
@@ -92,11 +82,7 @@ async function run() {
9282 });
9383 await db.close();
9484 await exec_1.exec('git', ['add', dbfile]);
95- await exec_1.exec('git', [
96- 'commit',
97- '-m',
98- `Capturing event ${eventName} (id: ${id})`,
99- ]);
85+ await exec_1.exec('git', ['commit', '-m', `${eventName} ${id}`]);
10086 try {
10187 await exec_1.exec('git', ['push']);
10288 // if the push succeeded, we're finished
0 commit comments