Skip to content

Commit a337029

Browse files
set auto replay robot for issues opened by repo users
1 parent e88a170 commit a337029

2 files changed

Lines changed: 427 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: G4F Issue Auto Reply
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
permissions:
8+
issues: write
9+
contents: read
10+
11+
jobs:
12+
reply:
13+
runs-on: ubuntu-latest
14+
15+
if: ${{ github.event.issue.user.type != 'Bot' }}
16+
17+
timeout-minutes: 10
18+
19+
steps:
20+
- name: Checkout Repository
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.11"
27+
28+
- name: Install Dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install -U "g4f[all]" requests openai
32+
33+
- name: Create g4f Dirs
34+
run: mkdir -p ~/.g4f/cookies
35+
36+
- name: Generate and Post Issue Reply
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
G4F_MODELS: ${{ vars.G4F_MODELS }}
40+
ECYLT_FREE_GPT_ENABLED: ${{ vars.ECYLT_FREE_GPT_ENABLED || 'true' }}
41+
ECYLT_FREE_GPT_URL: ${{ vars.ECYLT_FREE_GPT_URL || 'https://api.ecylt.top/v1/free_gpt/chat_json.php' }}
42+
OPENAI_COMPATIBLE_API_KEY: ${{ secrets.OPENAI_COMPATIBLE_API_KEY }}
43+
OPENAI_COMPATIBLE_BASE_URL: ${{ vars.OPENAI_COMPATIBLE_BASE_URL }}
44+
OPENAI_COMPATIBLE_MODEL: ${{ vars.OPENAI_COMPATIBLE_MODEL }}
45+
G4F_TIMEOUT_SECONDS: "90"
46+
MAX_REPLY_CHARS: "65536"
47+
run: |
48+
python ./scripts/g4f_issue_reply.py

0 commit comments

Comments
 (0)