Skip to content

Commit 38be50d

Browse files
authored
Merge pull request chaitin#295 from yokowu/feat-ai-employee
feat: ai 员工
2 parents 1230215 + 232e8e8 commit 38be50d

Some content is hidden

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

47 files changed

+9595
-74
lines changed

.github/workflows/backend-ci-cd.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,7 @@ jobs:
3030
- name: Set up Go
3131
uses: actions/setup-go@v4
3232
with:
33-
go-version: '1.23'
34-
35-
- name: Cache Go modules
36-
uses: actions/cache@v4
37-
with:
38-
path: |
39-
~/.cache/go-build
40-
~/go/pkg/mod
41-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
42-
restore-keys: |
43-
${{ runner.os }}-go-
33+
go-version: '1.25'
4434

4535
- name: Download dependencies
4636
run: go mod download
@@ -49,19 +39,6 @@ jobs:
4939
run: |
5040
touch docs/swagger.json
5141
52-
- name: Run tests
53-
run: go test -v ./...
54-
55-
- name: Validate go.mod and go.sum
56-
run: |
57-
go mod tidy
58-
go mod verify
59-
if [ -n "$(git status --porcelain)" ]; then
60-
echo "go.mod or go.sum files are not up to date"
61-
git diff
62-
exit 1
63-
fi
64-
6542
build:
6643
needs: test
6744
runs-on: ubuntu-latest

backend/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type Config struct {
4747

4848
Redis struct {
4949
Host string `mapstructure:"host"`
50-
Port string `mapstructure:"port"`
50+
Port int `mapstructure:"port"`
5151
Pass string `mapstructure:"pass"`
5252
DB int `mapstructure:"db"`
5353
IdleConn int `mapstructure:"idle_conn"`
@@ -136,7 +136,7 @@ func Init() (*Config, error) {
136136
v.SetDefault("database.max_idle_conns", 10)
137137
v.SetDefault("database.conn_max_lifetime", 30)
138138
v.SetDefault("redis.host", "monkeycode-redis")
139-
v.SetDefault("redis.port", "6379")
139+
v.SetDefault("redis.port", 6379)
140140
v.SetDefault("redis.pass", "")
141141
v.SetDefault("redis.db", 0)
142142
v.SetDefault("redis.idle_conn", 20)

backend/consts/aiemployee.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package consts
2+
3+
// AIEmployeePosition represents the position of an AI employee
4+
type AIEmployeePosition string
5+
6+
const (
7+
// AIEmployeePositionEngineer represents a研发工程师
8+
AIEmployeePositionEngineer AIEmployeePosition = "研发工程师"
9+
10+
// AIEmployeePositionProductManager represents a产品经理
11+
AIEmployeePositionProductManager AIEmployeePosition = "产品经理"
12+
13+
// AIEmployeePositionTester represents a测试工程师
14+
AIEmployeePositionTester AIEmployeePosition = "测试工程师"
15+
)
16+
17+
type RepoPlatform string
18+
19+
const (
20+
RepoPlatformGitHub RepoPlatform = "GitHub"
21+
RepoPlatformGitLab RepoPlatform = "GitLab"
22+
RepoPlatformGitee RepoPlatform = "Gitee"
23+
RepoPlatformGitea RepoPlatform = "Gitea"
24+
)

backend/db/admin.go

Lines changed: 21 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/db/admin/admin.go

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/db/admin/where.go

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/db/admin_create.go

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)