-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add option to run OpenCommit as a Github Action
- Loading branch information
1 parent
5400682
commit 3eb319a
Showing
17 changed files
with
50,409 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
node_modules/ | ||
coverage/ | ||
out/ | ||
temp/ | ||
build/ | ||
dist/ | ||
application.log | ||
.DS_Store | ||
/*.env | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 'OpenCommit' | ||
description: 'Replaces lame commit messages with meaningful AI-generated messages when you push to remote 🤯🔫' | ||
author: 'https://github.com/di-sukharev' | ||
repo: 'https://github.com/di-sukharev/opencommit/tree/github-action' | ||
keywords: | ||
[ | ||
'git', | ||
'chatgpt', | ||
'gpt', | ||
'ai', | ||
'openai', | ||
'opencommit', | ||
'aicommit', | ||
'aicommits', | ||
'gptcommit', | ||
'commit' | ||
] | ||
|
||
inputs: | ||
GITHUB_TOKEN: | ||
description: 'GitHub token' | ||
required: true | ||
|
||
runs: | ||
using: 'node16' | ||
main: 'out/github-action.cjs' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
import { build } from 'esbuild' | ||
import fs from 'fs' | ||
import { build } from 'esbuild'; | ||
import fs from 'fs'; | ||
|
||
await build({ | ||
entryPoints: ['./src/cli.ts'], | ||
bundle: true, | ||
platform: 'node', | ||
format: 'cjs', | ||
outfile: './out/cli.cjs', | ||
entryPoints: ['./src/cli.ts'], | ||
bundle: true, | ||
platform: 'node', | ||
format: 'cjs', | ||
outfile: './out/cli.cjs' | ||
}); | ||
|
||
const wasmFile = fs.readFileSync('./node_modules/@dqbd/tiktoken/lite/tiktoken_bg.wasm') | ||
await build({ | ||
entryPoints: ['./src/github-action.ts'], | ||
bundle: true, | ||
platform: 'node', | ||
format: 'cjs', | ||
outfile: './out/github-action.cjs' | ||
}); | ||
|
||
const wasmFile = fs.readFileSync( | ||
'./node_modules/@dqbd/tiktoken/lite/tiktoken_bg.wasm' | ||
); | ||
|
||
fs.writeFileSync('./out/tiktoken_bg.wasm', wasmFile) | ||
fs.writeFileSync('./out/tiktoken_bg.wasm', wasmFile); |
Oops, something went wrong.