Skip to content

Commit a8524b7

Browse files
committed
🚀 ci: Migrate GitHub Actions to TypeScript
1 parent d8e3674 commit a8524b7

File tree

45 files changed

+7174
-739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+7174
-739
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ANTHROPIC_API_KEY=your_api_key_here
2+
FORCE_REGENERATE=false

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.github/**/*.ts

.eslintrc.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
plugins: ['@typescript-eslint'],
5+
extends: [
6+
'eslint:recommended',
7+
'plugin:@typescript-eslint/recommended',
8+
],
9+
parserOptions: {
10+
ecmaVersion: 2020,
11+
sourceType: 'module',
12+
},
13+
rules: {
14+
// Add any custom rules here
15+
},
16+
};

.github/scripts/config.ts

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import * as path from 'path';
2+
3+
interface Config {
4+
// Directories
5+
PROMPTS_DIR: string;
6+
TEMPLATES_DIR: string;
7+
8+
// File paths
9+
ANALYZER_PROMPT_PATH: string;
10+
README_PATH: string;
11+
12+
// Anthropic API
13+
ANTHROPIC_MODEL: string;
14+
ANTHROPIC_MAX_TOKENS: number;
15+
16+
// File names
17+
PROMPT_FILE_NAME: string;
18+
METADATA_FILE_NAME: string;
19+
VIEW_FILE_NAME: string;
20+
21+
// Template names
22+
VIEW_TEMPLATE_NAME: string;
23+
README_TEMPLATE_NAME: string;
24+
25+
// Metadata
26+
DEFAULT_CATEGORY: string;
27+
28+
// GitHub Actions
29+
FORCE_REGENERATE_ENV_VAR: string;
30+
31+
// Logging
32+
LOG_LEVEL: 'debug' | 'info' | 'warn' | 'error';
33+
34+
// YAML configuration
35+
YAML_INDENT: number;
36+
YAML_LINE_WIDTH: number;
37+
}
38+
39+
const config: Config = {
40+
// Directories
41+
PROMPTS_DIR: 'prompts',
42+
TEMPLATES_DIR: path.join('.github', 'templates'),
43+
44+
// File paths
45+
ANALYZER_PROMPT_PATH: path.join('.github', 'prompts', 'ai_prompt_analyzer_and_output_generator', 'prompt.md'),
46+
README_PATH: 'README.md',
47+
48+
// Anthropic API
49+
ANTHROPIC_MODEL: 'claude-3-5-sonnet-20240620',
50+
ANTHROPIC_MAX_TOKENS: 2500,
51+
52+
// File names
53+
PROMPT_FILE_NAME: 'prompt.md',
54+
METADATA_FILE_NAME: 'metadata.yml',
55+
VIEW_FILE_NAME: 'view.md',
56+
57+
// Template names
58+
VIEW_TEMPLATE_NAME: 'view_template.md',
59+
README_TEMPLATE_NAME: 'readme_template.md',
60+
61+
// Metadata
62+
DEFAULT_CATEGORY: 'uncategorized',
63+
64+
// GitHub Actions
65+
FORCE_REGENERATE_ENV_VAR: 'FORCE_REGENERATE',
66+
67+
// Logging
68+
LOG_LEVEL: 'info',
69+
70+
// YAML configuration
71+
YAML_INDENT: 2,
72+
YAML_LINE_WIDTH: 80,
73+
};
74+
75+
export default config;

.github/scripts/generate_metadata.py

Lines changed: 0 additions & 258 deletions
This file was deleted.

0 commit comments

Comments
 (0)