Skip to content

Commit cbdd46b

Browse files
authored
Merge branch 'main' into feat-simple-bom
2 parents d5e6467 + ad6c763 commit cbdd46b

File tree

38 files changed

+1103
-248
lines changed

38 files changed

+1103
-248
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ on:
2525
- main
2626
paths-ignore:
2727
- '**.md'
28+
env:
29+
ENABLE_TEST_CI: true
2830
permissions:
2931
contents: read
3032
jobs:
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2024-2026 the original author or authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
name: Greetings
15+
on: [pull_request]
16+
jobs:
17+
greeting:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
pull-requests: write
21+
contents: read
22+
steps:
23+
- uses: actions/first-interaction@v1
24+
with:
25+
repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
issue-message: |
27+
# Message with markdown.
28+
This is the message that will be displayed on users' first issue.
29+
pr-message: |-
30+
🎉 Congratulations, @${{ github.actor }}, on your inaugural contribution to the Spring AI Alibaba repository! Your efforts are sincerely appreciated.
31+
32+
To maintain the integrity and legibility of our codebase, we kindly request that you verify your code adheres to the established project formatting standards prior to merging. Typically, comprehensive guidelines regarding code style and recommended formatting utilities can be found within the CONTRIBUTING.md file located in the repository.
33+
34+
Should you encounter any queries or require clarification, please do not hesitate to raise them. We extend our gratitude once more for your valuable contribution!
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright 2024-2026 the original author or authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
name: "Close Invalid Issue"
15+
on:
16+
schedule:
17+
- cron: "0 0,8,16 * * *"
18+
permissions:
19+
contents: read
20+
jobs:
21+
stale:
22+
permissions:
23+
issues: write
24+
runs-on: ubuntu-latest
25+
env:
26+
ACTIONS_STEP_DEBUG: true
27+
steps:
28+
- name: Close Stale Issues
29+
uses: actions/stale@v6
30+
with:
31+
repo-token: ${{ secrets.GITHUB_TOKEN }}
32+
stale-issue-message: "This issue has been marked as invalid question, please give more information by following the `issue` template. The issue will be closed in 1 days if no further activity occurs."
33+
stale-issue-label: "stale"
34+
days-before-stale: 0
35+
days-before-close: 1
36+
remove-stale-when-updated: true
37+
only-labels: "invalid issue"

.github/workflows/issue-label.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright 2024-2026 the original author or authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
name: Labeling new issue
15+
on:
16+
issues:
17+
types: ['opened', 'reopened']
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
sparse-checkout: |
25+
tools/scripts/_issue.json_label
26+
sparse-checkout-cone-mode: false
27+
- uses: Renato66/auto-label@v3
28+
with:
29+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint-pr-title.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,33 @@ jobs:
3434
types: |
3535
fix
3636
feat
37-
reactor
37+
refactor
3838
docs
3939
chore
4040
perf
4141
infra
4242
revert
4343
release
44+
test
45+
style
4446
scopes: |
4547
core
4648
vector-stores
4749
document-readers
4850
document-parsers
51+
deepresearch
52+
docs
4953
memories
5054
tool-calls
5155
graph
52-
jManus
56+
jmanus
5357
mcp
5458
prompt
5559
studio
56-
autoConf
60+
autoconf
5761
ci
62+
# e.g. feat(core): add new feature
63+
# if false: feat: add new feature
5864
requireScope: true
5965
disallowScopes: |
6066
[A-Z]+
@@ -63,5 +69,7 @@ jobs:
6369
The subject "{subject}" found in the pull request title "{title}"
6470
didn't match the configured pattern. Please ensure that the subject
6571
doesn't start with an uppercase character.
66-
validateSingleCommit: true
67-
validateSingleCommitMatchesPrTitle: true
72+
# if true, the PR title must match the commit message
73+
validateSingleCommit: false
74+
# if true, the PR title must match the single commit message
75+
validateSingleCommitMatchesPrTitle: false
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#
2+
# Copyright 2024-2025 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
name: Stale PRs
17+
on:
18+
schedule:
19+
- cron: '30 3 * * *' # Run at 3:30 UTC nightly
20+
workflow_dispatch:
21+
inputs:
22+
dryRun:
23+
description: 'Dry Run'
24+
required: true
25+
default: true
26+
type: boolean
27+
operationsPerRun:
28+
description: 'Max GitHub API operations'
29+
required: true
30+
default: 30
31+
type: number
32+
permissions:
33+
issues: write
34+
pull-requests: write
35+
contents: read
36+
jobs:
37+
stale:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/stale@v9
41+
with:
42+
debug-only: ${{ inputs.dryRun || false }}
43+
operations-per-run: ${{ inputs.operationsPerRun || 500 }}
44+
ascending: true
45+
days-before-stale: 90
46+
days-before-close: 30 # Since adding 'stale' will update the PR, days-before-close is relative to that.
47+
stale-pr-label: 'stale'
48+
stale-pr-message: "This PR is being marked as stale since it has not had any activity in 90 days. If you\nwould like to keep this PR alive, please leave a comment asking for a review. If the PR has \nmerge conflicts, update it with the latest from the base branch.\n<p>\nIf you are having difficulty finding a reviewer, please reach out on the \n[committer list](COMMITTERS.md).\n<p>\nIf this PR is no longer valid or desired, please feel free to close it. If no activity\noccurs in the next 30 days, it will be automatically closed.\n"
49+
close-pr-label: 'closed-stale'
50+
close-pr-message: "This PR has been closed since it has not had any activity in 120 days. If you feel like this\nwas a mistake, or you would like to continue working on it, please feel free to re-open the \nPR and ask for a review."

CONTRIBUTING-zh.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,19 @@ fork 出来的代码后,原仓库 main 分支可能出现了新的提交,这
4545

4646
Spring AI Alibaba 作为 Spring AI 的实现之一,在代码规范方面直接沿用了 Spring AI 项目规范,在正式开始之前请参考相关代码格式规范说明,提交代码前需要先配置好代码格式规范。
4747

48-
### 开发、提交、Push
48+
### 开发
4949

5050
开发自己的功能,**开发完毕后建议使用 `mvn clean package` 命令确保能修改后的代码能在本地编译通过。执行该命令的同时还能以 spring 的方式自动格式化代码**。然后再提交代码,提交代码之前请注意创建一个新的有关本特性的分支,用该分支进行代码提交。
5151

52+
### 本地CI
53+
54+
本地 boe 环境开发完成后,强烈建议在提交 PR 之前执行项目`tools\make`提供的 `make` 命令进行本地持续集成(CI)检查,以确保代码符合项目的标准和规范。如果对于本地CI有任何疑问,可以在控制台输入 `make help` 了解具体信息。
55+
56+
### 提交最新代码
57+
58+
在编码完成之后,需要基于 pr 规范`[lint-pr-title.yml](.github/workflows/lint-pr-title.yml)`对提交信息进行 format & check,确保提交信息符合规范。
59+
Commit 规范: git commit -m "类型(模块): 空格 符合规范的提交信息",例如 `feat(docs): contribute-zh 更新`
60+
5261
### Merge 最新代码
5362

5463
- 同样,提交 PR 前,需要 rebase main 分支的代码(如果您的目标分支不是 main 分支,则需要 rebase 对应目标分支),具体操作步骤请参考之前的章节。

CONTRIBUTING.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,30 @@ After forking the repository, new commits may have appeared in the original repo
4747

4848
As one of the implementations of Spring AI, Spring AI Alibaba directly follows the Spring AI project's code standards. Before you start, please refer to the relevant code format specification instructions. You need to configure the code format standards properly before submitting your code.
4949

50-
### Develop, Commit, and Push
50+
### Develop
5151

5252
Develop your feature, and **after development, we recommend using the `mvn clean package` command to ensure that the modified code can be compiled locally. This command will also automatically format the code in the Spring way**. Then commit your code. Before committing, please create a new branch related to this feature and use this branch for code submission.
5353

54+
### Development
55+
56+
Develop your feature, and **after completing development, it's recommended to use the `mvn clean package` command to ensure that the modified code compiles successfully locally. This command also automatically formats the code according to Spring standards.** Before committing your code, please create a new branch specific to your feature and commit your changes to this branch.
57+
58+
### Local CI
59+
60+
After completing development in your local BOE environment, it's strongly recommended to run the provided `make` command in the project's `tools/make` directory to perform local Continuous Integration (CI) checks. This ensures your code adheres to the project's standards and guidelines. If you have questions about local CI, you can enter `make help` in the console for more detailed information.
61+
62+
### Commit the Latest Code
63+
64+
After completing your coding, you need to format and verify your commit messages according to the PR specification in `[lint-pr-title.yml](.github/workflows/lint-pr-title.yml)` to ensure they comply with the guidelines.
65+
66+
Commit format example:
67+
68+
```bash
69+
git commit -m "type(module): descriptive message"
70+
```
71+
72+
For instance: `feat(docs): update contribute-zh`
73+
5474
### Merge Latest Code Again
5575

5676
- Similarly, before submitting a PR, you need to rebase the code from the main branch (if your target branch is not the main branch, you need to rebase from the corresponding target branch). Please refer to the previous section for specific operation steps.

0 commit comments

Comments
 (0)