Skip to content

Commit 2a7c924

Browse files
authored
Merge branch 'main' into main
2 parents d0de5b5 + 00aa376 commit 2a7c924

File tree

456 files changed

+17617
-6388
lines changed

Some content is hidden

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

456 files changed

+17617
-6388
lines changed

.github/CODEOWNERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# AG2 code owners
2+
# About code owners https://docs.github.com/ru/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
3+
4+
# A2A and Remote
5+
/autogen/a2a/ @Lancetnik
6+
/autogen/remote/ @Lancetnik
7+
/test/a2a/ @Lancetnik
8+
/test/remote/ @Lancetnik
9+
/website/docs/user-guide/a2a/ @Lancetnik

.github/workflows/build-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828
- uses: astral-sh/setup-uv@v6
2929
with:
3030
version: "latest"
31-
- uses: actions/setup-node@v4
31+
- uses: actions/setup-node@v5
3232
with:
3333
node-version: ${{ github.event.inputs.node-version }}
3434
- name: setup python
35-
uses: actions/setup-python@v5
35+
uses: actions/setup-python@v6
3636
with:
3737
python-version: ${{ github.event.inputs.python-version }}
3838

.github/workflows/build-mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
version: "latest"
2323
- name: setup python
24-
uses: actions/setup-python@v5
24+
uses: actions/setup-python@v6
2525
with:
2626
python-version: ${{ github.event.inputs.python-version }}
2727

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: Claude Code Review
2+
3+
on:
4+
# For PRs from the same repository (fast path)
5+
pull_request:
6+
types:
7+
- opened
8+
- synchronize
9+
- ready_for_review
10+
# For PRs from forked repositories (secure path with secrets)
11+
pull_request_target:
12+
types:
13+
- opened
14+
- synchronize
15+
- ready_for_review
16+
17+
jobs:
18+
# Job for same-repo PRs (can use OIDC if needed)
19+
claude-review-same-repo:
20+
if: |
21+
github.event_name == 'pull_request' &&
22+
github.event.pull_request.head.repo.full_name == github.repository &&
23+
github.event.pull_request.draft == false
24+
25+
runs-on: ubuntu-latest
26+
permissions:
27+
contents: read
28+
pull-requests: read
29+
issues: read
30+
id-token: write
31+
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 1
37+
38+
- name: Checkout PR branch
39+
env:
40+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
run: |
42+
echo "Checking out PR #${{ github.event.pull_request.number }}"
43+
gh pr checkout ${{ github.event.pull_request.number }}
44+
echo "✅ PR branch checked out successfully"
45+
46+
- name: Run Claude Code Review
47+
id: claude-review
48+
uses: anthropics/claude-code-action@v1
49+
with:
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
52+
prompt: |
53+
REPO: ${{ github.repository }}
54+
PR NUMBER: ${{ github.event.pull_request.number }}
55+
56+
Please review this pull request and provide feedback on:
57+
- Code quality and best practices
58+
- Potential bugs or issues
59+
- Performance considerations
60+
- Security concerns
61+
- Test coverage
62+
63+
# Steps to run a Review:
64+
1) Check if previous review is already done by Claude. If so, perform a re-reivew with the latest changes referring previous review.
65+
2) If no previous review is found, perform a new review with the latest changes.
66+
67+
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
68+
69+
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
70+
71+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
72+
73+
# Job for forked PRs (no OIDC, token-based only)
74+
claude-review-forked:
75+
if: |
76+
github.event_name == 'pull_request_target' &&
77+
github.event.pull_request.head.repo.full_name != github.repository &&
78+
github.event.pull_request.draft == false
79+
80+
runs-on: ubuntu-latest
81+
permissions:
82+
contents: read
83+
pull-requests: write
84+
issues: read
85+
# Explicitly disable id-token to avoid OIDC flow
86+
87+
steps:
88+
- name: Checkout repository (no credentials persisted)
89+
uses: actions/checkout@v4
90+
with:
91+
fetch-depth: 1
92+
persist-credentials: false
93+
94+
- name: Checkout PR branch (forked PR)
95+
env:
96+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
run: |
98+
echo "⚠️ Forked PR detected - running in secure mode"
99+
echo "PR from: ${{ github.event.pull_request.head.repo.full_name }}"
100+
echo "Base repo: ${{ github.repository }}"
101+
echo "Checking out PR #${{ github.event.pull_request.number }}"
102+
gh pr checkout ${{ github.event.pull_request.number }}
103+
echo "✅ PR branch checked out successfully"
104+
105+
- name: Run Claude Code Review
106+
id: claude-review
107+
uses: anthropics/claude-code-action@v1
108+
with:
109+
github_token: ${{ secrets.GITHUB_TOKEN }}
110+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
111+
prompt: |
112+
REPO: ${{ github.repository }}
113+
PR NUMBER: ${{ github.event.pull_request.number }}
114+
115+
Please review this pull request and provide feedback on:
116+
- Code quality and best practices
117+
- Potential bugs or issues
118+
- Performance considerations
119+
- Security concerns
120+
- Test coverage
121+
122+
# Steps to run a Review:
123+
1) Check if previous review is already done by Claude. If so, perform a re-reivew with the latest changes referring previous review.
124+
2) If no previous review is found, perform a new review with the latest changes.
125+
126+
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
127+
128+
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
129+
130+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

.github/workflows/claude.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
actions: read # Required for Claude to read CI results on PRs
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
33+
- name: Checkout PR branch (if comment is on a PR)
34+
if: github.event.issue.pull_request || github.event.pull_request
35+
env:
36+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: |
38+
if [ -n "${{ github.event.issue.number }}" ]; then
39+
PR_NUMBER="${{ github.event.issue.number }}"
40+
elif [ -n "${{ github.event.pull_request.number }}" ]; then
41+
PR_NUMBER="${{ github.event.pull_request.number }}"
42+
fi
43+
44+
if [ -n "$PR_NUMBER" ]; then
45+
echo "Detected comment on PR #$PR_NUMBER"
46+
47+
# Check if it's a forked PR
48+
PR_INFO=$(gh pr view $PR_NUMBER --json isCrossRepository,headRepositoryOwner 2>/dev/null || echo '{}')
49+
IS_FORK=$(echo "$PR_INFO" | jq -r '.isCrossRepository // false')
50+
51+
if [ "$IS_FORK" = "true" ]; then
52+
echo "⚠️ Forked PR detected - running in secure mode"
53+
FORK_OWNER=$(echo "$PR_INFO" | jq -r '.headRepositoryOwner.login')
54+
echo "PR from: $FORK_OWNER"
55+
fi
56+
57+
echo "Checking out PR #$PR_NUMBER"
58+
gh pr checkout $PR_NUMBER
59+
echo "✅ PR branch checked out successfully"
60+
fi
61+
62+
- name: Run Claude Code
63+
id: claude
64+
uses: anthropics/claude-code-action@v1
65+
with:
66+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
67+
68+
# This is an optional setting that allows Claude to read CI results on PRs
69+
additional_permissions: |
70+
actions: read

.github/workflows/contrib-graph-rag-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
with:
6464
version: "latest"
6565
- name: Set up Python ${{ matrix.python-version }}
66-
uses: actions/setup-python@v5
66+
uses: actions/setup-python@v6
6767
with:
6868
python-version: ${{ matrix.python-version }}
6969
- name: Install FalkorDB SDK when on linux
@@ -136,7 +136,7 @@ jobs:
136136
with:
137137
version: "latest"
138138
- name: Set up Python ${{ matrix.python-version }}
139-
uses: actions/setup-python@v5
139+
uses: actions/setup-python@v6
140140
with:
141141
python-version: ${{ matrix.python-version }}
142142
- name: Install Neo4j and Llama-index when on linux
@@ -185,7 +185,7 @@ jobs:
185185
# with:
186186
# version: "latest"
187187
# - name: Set up Python ${{ matrix.python-version }}
188-
# uses: actions/setup-python@v5
188+
# uses: actions/setup-python@v6
189189
# with:
190190
# python-version: ${{ matrix.python-version }}
191191
# - name: Install Neo4j and Llama-index when on linux

.github/workflows/contrib-llm-test.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
with:
5555
version: "latest"
5656
- name: Set up Python ${{ matrix.python-version }}
57-
uses: actions/setup-python@v5
57+
uses: actions/setup-python@v6
5858
with:
5959
python-version: ${{ matrix.python-version }}
6060
- name: Install packages and dependencies
@@ -112,13 +112,19 @@ jobs:
112112
with:
113113
version: "latest"
114114
- name: Set up Python ${{ matrix.python-version }}
115-
uses: actions/setup-python@v5
115+
uses: actions/setup-python@v6
116116
with:
117117
python-version: ${{ matrix.python-version }}
118118
- name: Install packages and dependencies
119119
run: |
120120
docker --version
121-
uv pip install --system -e ".[test,openai,autobuild,captainagent]"
121+
uv pip install --system -e ".[test,openai,autobuild,captainagent,gemini]"
122+
- name: Create OAI_CONFIG_LIST from Secret
123+
run: |
124+
cat > OAI_CONFIG_LIST << 'EOF'
125+
${{ secrets.OAI_CONFIG_LIST }}
126+
EOF
127+
shell: bash
122128
- name: Run tests
123129
env:
124130
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -170,7 +176,7 @@ jobs:
170176
with:
171177
version: "latest"
172178
- name: Set up Python ${{ matrix.python-version }}
173-
uses: actions/setup-python@v5
179+
uses: actions/setup-python@v6
174180
with:
175181
python-version: ${{ matrix.python-version }}
176182
- name: Install packages and dependencies

0 commit comments

Comments
 (0)