We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b76b78d commit fb5302fCopy full SHA for fb5302f
1 file changed
src/index.ts
@@ -1,6 +1,7 @@
1
import * as core from '@actions/core'
2
import * as github from '@actions/github'
3
import * as path from 'path'
4
+import { fileURLToPath } from 'url'
5
import { OpenAI } from 'openai'
6
import { evaluateContent } from './prompt.js'
7
import { addLabels, minimizeComment } from './github.js'
@@ -12,6 +13,8 @@ async function run(): Promise<void> {
12
13
// 0. Inputs & setup
14
//------------------------------------------------------------
15
const token = core.getInput('token')
16
+ const __filename = fileURLToPath(import.meta.url)
17
+ const __dirname = path.dirname(__filename)
18
const promptsDir = path.resolve(__dirname, '..', 'prompts') // Use built-in prompts
19
const spamLabel = core.getInput('spam-label')
20
const aiLabel = core.getInput('ai-label')
0 commit comments