Skip to content

Commit 9f4c780

Browse files
author
Automated Build
committed
npm run dist
1 parent 2ea81f3 commit 9f4c780

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

dist/index.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ const sqlite3_1 = __importDefault(__nccwpck_require__(4946));
3737
const sqlite_1 = __nccwpck_require__(2515);
3838
const nanoid_1 = __nccwpck_require__(9140);
3939
const 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-
];
4740
async 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

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)