中文 | English
Before contributing code, please take a moment to understand the process of contributing to Spring AI Alibaba DeepResearch.
We welcome any contribution, whether it's a simple typo correction, bug fix, or adding new features. Please actively ask questions or submit PRs. We also value documentation and integration with other open-source projects, and welcome contributions in these areas.
For more complex modifications, we suggest adding a Feature tag to the Issue and briefly describing the design and changes.
-
Click the
Forkicon in the upper right corner of this project to fork alibaba/spring-ai-alibaba to your own hosting space. -
Clone the spring-ai-alibaba repository from your own account to your local machine. For example, for my account
chickenlj, this would be done by executinggit clone https://github.com/spring-ai-alibaba/deepresearch.
-
On your machine, execute
git config --listto view the global username and email address for Git. -
Check if the displayed user.name and user.email match your GitHub username and email address.
-
If your company uses its own GitLab or you are using another commercial GitLab, mismatches may occur. In this case, you need to set a separate username and email address for the spring-ai-alibaba project.
-
For instructions on setting your username and email address, please refer to the official GitHub documentation: Setting your username and Setting your email address.
After forking the code, new commits may appear on the original repository's main branch. To avoid conflicts between the PR and commits in Master, you need to merge the main branch promptly.
-
In your local
spring-ai-alibabadirectory, executegit remote add upstream https://github.com/spring-ai-alibaba/deepresearchto add the original repository address to the remote stream. -
In your local
spring-ai-alibabadirectory, executegit fetch upstreamto fetch the remote stream to your local machine. -
In your local
spring-ai-alibabadirectory, executegit checkout mainto switch to themasterbranch. -
In your local
spring-ai-alibabadirectory, executegit rebase upstream/mainto rebase the latest code.
As one of the implementations of Spring AI, Spring AI Alibaba directly adopts the Spring AI project specification for code style. Please refer to the relevant code style specification instructions before starting. You need to configure the code style specification before committing code.
Develop your own features. After development, it is recommended to use the mvn clean package command to ensure that the modified code can be compiled successfully locally. Executing this command will also automatically format the code in Spring's way. Then commit the code. Before committing, please remember to create a new branch related to this feature and use that branch to commit the code.
After completing local Boe environment development, it is strongly recommended to run the make command provided by the project's CI\make to perform local continuous integration (CI) checks before submitting a pull request, ensuring that the code conforms to the project's standards and specifications. If you have any questions about local CI, you can type make help in the console for specific information.
To reduce unnecessary code style issues, Spring AI Alibaba provides a local checkstyle check function. You can execute the mvn checkstyle:check command in the project root directory to check if the code style conforms to the specifications.
To ensure clean code, please delete unused imports in Java files. Unused imports can be automatically deleted by executing the mvn spotless:apply command.
After completing the coding, you need to format and check the commit message according to the PR specification [lint-pr-title.yml](.github/workflows/lint-pr-title.yml) to ensure that the commit message conforms to the specification.
Commit Specification: git commit -m "type(module): space conforming commit message", for example feat(docs): contribute-zh update`
-
Similarly, before submitting the PR, you need to rebase the code of the main branch (if your target branch is not the main branch, you need to rebase the corresponding target branch). Please refer to the previous chapters for specific steps.
-
If conflicts occur, you need to resolve them first.
Submit the PR, specifying the changes and implemented functions according to the Pull request template, and wait for code review and merging. Become a Spring AI Alibaba Contributor and contribute to making Spring AI Alibaba more usable.