Skip to content

Commit 392fa86

Browse files
committed
Update workflows
1 parent bb2547c commit 392fa86

File tree

6 files changed

+81
-9
lines changed

6 files changed

+81
-9
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Claude Auto Review
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
auto-review:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
pull-requests: read
13+
id-token: write
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17+
with:
18+
fetch-depth: 1
19+
20+
- name: Automatic PR Review
21+
uses: anthropics/claude-code-action@28f83620103c48a57093dcc2837eec89e036bb9f # beta
22+
with:
23+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
24+
timeout_minutes: "60"
25+
direct_prompt: |
26+
Please review this pull request and provide actionable feedback.
27+
28+
Focus on:
29+
- Code quality and best practices
30+
- Potential bugs or issues
31+
- Performance considerations
32+
- Security implications
33+
- Overall architecture and design decisions
34+
35+
Provide constructive feedback with specific suggestions for improvement.
36+
Use inline comments to highlight specific areas of concern. Be concise and clear in your feedback.
37+
allowed_tools: "mcp__github__create_pending_pull_request_review,mcp__github__add_pull_request_review_comment_to_pending_review,mcp__github__submit_pending_pull_request_review,mcp__github__get_pull_request_diff"

.github/workflows/claude.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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: write
24+
issues: write
25+
id-token: write
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
fetch-depth: 1
31+
32+
- name: Run Claude Code
33+
id: claude
34+
uses: anthropics/claude-code-action@28f83620103c48a57093dcc2837eec89e036bb9f # beta
35+
with:
36+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
37+

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26-
- uses: SocketDev/socket-registry/.github/actions/setup@d1687f08833e7355042a1addedd474e84bebacd7
26+
- uses: SocketDev/socket-registry/.github/actions/setup@main
2727
with:
2828
node-version: '22'
2929

.github/workflows/provenance.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Packages to npm
1+
name: Publish to registry
22

33
on:
44
workflow_dispatch:
@@ -11,7 +11,6 @@ on:
1111
options:
1212
- '0'
1313
- '1'
14-
1514
jobs:
1615
build:
1716
runs-on: ubuntu-latest
@@ -22,10 +21,10 @@ jobs:
2221

2322
steps:
2423
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25-
- uses: SocketDev/socket-registry/.github/actions/setup@d1687f08833e7355042a1addedd474e84bebacd7
24+
- uses: SocketDev/socket-registry/.github/actions/setup@main
2625
with:
2726
node-version: '22'
28-
- run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
27+
- run: pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
2928
- run: pnpm run package:npm:publish
3029
env:
3130
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ concurrency:
2020

2121
jobs:
2222
test:
23-
name: 'Tests'
2423
runs-on: ${{ matrix.os }}
24+
timeout-minutes: 10
2525
strategy:
2626
matrix:
2727
node-version: [20, 22, 24]
2828
os: [ubuntu-latest, windows-latest]
2929
steps:
3030
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
31-
- uses: SocketDev/socket-registry/.github/actions/setup@d1687f08833e7355042a1addedd474e84bebacd7
31+
- uses: SocketDev/socket-registry/.github/actions/setup@main
3232
with:
3333
node-version: ${{ matrix.node-version }}
3434

.github/workflows/types.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ permissions:
1515

1616
jobs:
1717
type-check:
18-
name: 'Type Check'
1918
runs-on: ubuntu-latest
2019
steps:
2120
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
22-
- uses: SocketDev/socket-registry/.github/actions/setup@d1687f08833e7355042a1addedd474e84bebacd7
21+
- uses: SocketDev/socket-registry/.github/actions/setup@main
2322
with:
2423
node-version: '22'
2524

0 commit comments

Comments
 (0)