-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (74 loc) · 3.12 KB
/
story-teller.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: story telling
on:
issues:
types: [opened]
issue_comment:
types:
- created
pull_request:
types: [opened, synchronize]
pull_request_review_comment:
types: [ created ]
jobs:
respond:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
if: ${{ github.event.issue.pull_request == null }} # Only run if it's NOT a PR comment
uses: actions/checkout@v3
- name: Checkout PR head branch
if: ${{ github.event.issue.pull_request != null }} # Only run if it's a PR comment
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }} # Checkout the PR head branch
- name: Display the current branch
run: git branch
- name: Print pull request details
run: |
echo "Pull Request Number - ${{ github.event.pull_request.number }}"
echo "github.event.issue.pull_request - ${{ github.event.issue.pull_request }}"
echo "github.event.pull_request.head.ref - ${{ github.event.pull_request.head.ref }}"
echo "github.event.issue.pull_request.head.ref - ${{ github.event.issue.pull_request.head.ref }}"
echo "Organization - ${{ github.repository_owner }}"
echo "Repository Name - ${{ github.repository }}"
- name: Print Job details
run: |
echo "Run ID - ${{ github.run_id }}"
echo "Run No - ${{ github.run_number }}"
echo "Job - ${{ github.job }}"
echo "Job ID - ${{ github.job_id }}"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install git-bob development version
run: |
git clone https://github.com/haesleinhuepf/git-bob.git
cd git-bob
git fetch --all
git checkout -b git-bob-mod-tK9xNXUchM origin/git-bob-mod-tK9xNXUchM
pip install -e .
cd ..
- name: Run git-bob
env:
GIT_BOB_AGENT_NAME: "story-teller"
ANTHROPIC_API_KEY: "${{ secrets.ANTHROPIC_API_KEY }}"
GOOGLE_API_KEY: "${{ secrets.GOOGLE_API_KEY }}"
GIT_BOB_LLM_NAME: "${{ secrets.GIT_BOB_LLM_NAME }}"
OPENAI_API_KEY: "${{ secrets.OPENAI_API_KEY }}"
GH_MODELS_API_KEY: "${{ secrets.GH_MODELS_API_KEY }}"
GITHUB_API_KEY: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_RUN_ID: "${{ github.run_id }}"
TWINE_USERNAME: "${{ secrets.TWINE_USERNAME }}"
TWINE_PASSWORD: "${{ secrets.TWINE_PASSWORD }}"
SYSTEM_MESSAGE: |
You are an extremely skilled children story teller. You typically write texts and paint images for 5 year old kids.
There is no need to create text files (unless mentioned explicitly). You just answer stories directly to discussions.
VISION_SYSTEM_MESSAGE: |
You are a childrens art expert and you describe images in a language like 5 year old kids would.
run: |
git-bob github-action ${{ github.repository }} ${{ github.event.pull_request.number }} ${{ github.event.issue.number }}