-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 2.3 KB
/
thought-consolidation.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
name: Thought Consolidation
on:
push:
paths:
- 'random-thoughts/*.md'
workflow_dispatch:
jobs:
consolidate-thoughts:
runs-on: ubuntu-latest
permissions:
contents: write # Needed for pushing changes
pull-requests: write # Needed for creating pull requests
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Get full history for comparing changes
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipx
pipx install aider-chat
- name: Configure Git
run: |
git config --global user.name 'GitHub Action Bot'
git config --global user.email 'action@github.com'
- name: Process thoughts
env:
AIDER_ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
git diff HEAD HEAD^ | cat > latest_change.md
aider --auto-commits --sonnet --architect --read latest_change.md --message "consolidate how many topics in the read-only files, then identify each topic if has matched in the random-thoughts/aider-brain/*.md, for each identified topic: 1. If matched, consolidate and expand the thoughts into detailed content in the matched file 2. If not matched, create a new file in the random-thoughts/aider-brain in a structure of descriptive paragraphs, with 7 to 15 sentences in one paragraph to express your ideas with style like documents in `Permanent/*.md` instead of bullet points" --yes
rm latest_change.md
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
commit-message: 'Consolidate thoughts from aider itself'
branch: i-am-aider
title: 'Aider: Consolidate thoughts'
body: |
Aider has consolidated the thoughts from the random-thoughts/aider-brain/*.md files and the latest commit.
labels: |
automation
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"