Code submission method and computer readable storage medium
By setting up a trigger event interface between the client and the compilation server, automatically updating the code submission information to the project management system, the problem of developers forgetting to update the project management system is solved, ensuring that the project progress is smooth.
Patent Information
- Application Number
- CN202411589092.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, developers often forget to update the project management system after submitting code to the code management system, resulting in delayed project progress or confusion in acceptance.
By setting up a trigger event interface between the client and the compilation server, the code submission information is automatically updated to the project management system to ensure that the information between the code management system and the project management system is synchronized.
It effectively avoids the problem of developers forgetting to update the project management system, ensures the smooth progress of project progress, and reduces the situation of project postponement and acceptance disorder.
Smart Images

Figure CN119512609A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a code submission method and a computer-readable storage medium. Background Art
[0002] Currently, major Internet companies are developing localized code management tools to better suit their business processes. Because code management systems have a high degree of freedom in submission, different developers upload a variety of submission information. In addition, existing technologies usually lack code checks, resulting in the submission code failing to compile, which seriously affects the stability of the final version integration.
[0003] To solve the above technical problems, a Chinese invention patent with application number CN202410194837.8 (application publication number CN117971692A) discloses a code submission method, an electronic device, a storage medium and a program product, the method comprising: obtaining the code to be submitted and the version number of the code to be submitted; based on the version number of the code to be submitted, performing a quality inspection on the code to be submitted to obtain a inspection result; if the inspection result is that the inspection passes, submitting the code to be submitted to the code library.
[0004] Although the above code submission method will only submit the code to the code base after it passes the quality inspection, the quality and reliability of the code base can be ensured. However, according to the company process in the prior art, after the developer submits the code, he needs to log in to the project management system, update the corresponding problem ticket status (from being solved to solved), and also need to submit the problem cause description, solution description, test suggestions and risk description to the problem ticket log. The problem ticket status update can notify the test department to immediately verify whether the problem ticket modification is effective, and the update log can effectively inform the test engineer of the test content and risk items, and keep it as a record; however, at present, developers often forget to update the code to the project management system after submitting it to the code management system, which makes it impossible to promote the project progress in time, resulting in project delays or acceptance confusion. For this reason, further improvements to the prior art are needed. Summary of the invention
[0005] The first technical problem to be solved by the present invention is to provide a code submission method for the above-mentioned prior art, which can effectively prevent developers from forgetting to update the project management system after submitting codes to the code management system.
[0006] The second technical problem to be solved by the present invention is to provide a computer-readable storage medium for executing the above-mentioned code submission method.
[0007] The technical solution adopted by the present invention to solve the above-mentioned first technical problem is: a code submission method, characterized by comprising a client, a compilation server and an application service layer, wherein the application service layer is provided with a code management system and a project management system;
[0008] The specific steps for code submission are as follows:
[0009] The developer logs in to the client, fills in the corresponding information according to the regulations, and submits the code to the temporary storage area;
[0010] The trigger event interface set in the temporary storage area will trigger the compilation server, which will obtain the latest submitted code and compile it. After the compilation is successful, the compilation server will submit the compiled code to the code management system;
[0011] The trigger event interface set by the code management system is triggered, and the code management system automatically intercepts the submission information, identifies the corresponding issue ticket, and uses the submission information to update the corresponding issue ticket status and update the content to the project management system.
[0012] In order to further promote the progress of the project, after the developer logs in to the client and before the developer fills in the corresponding information as required, the following steps are also included:
[0013] The client reads the locally configured developer information and sends a request to the project management system to query the number of unresolved issues remaining under the name of the currently logged-in developer. The project management system returns the number of unresolved issues remaining under the developer's name to the client. The client determines whether the number of unresolved issues remaining exceeds the threshold. If so, the developer is not allowed to submit code; if not, the developer is allowed to fill in the corresponding information according to regulations.
[0014] Preferably, when a developer is not allowed to submit code, the developer needs to contact the administrator, so that the administrator will be aware of the large number of issues in a timely manner and assign them to other developers to speed up the overall project progress.
[0015] In order to reduce code submission accidents caused by human errors and improve the submission efficiency of developers, the bottom layer of the client is encapsulated with commands. After the developer fills in the corresponding information according to the regulations on the client and clicks the submit command, the program will automatically complete the submission content layout and submit the code to the temporary storage area.
[0016] Preferably, after the compilation server obtains the latest submitted code and compiles it, it also includes the following steps:
[0017] Determine whether the compilation is successful. If so, the compilation server submits the compiled code to the code management system; if not, delete the code stored in the temporary storage area and notify the developer.
[0018] Specifically, after the code management system automatically intercepts the submitted information, it uses the issue ticket number as an index, intercepts the submitted information as the update content, and modifies the issue ticket status and update content in the project management system.
[0019] Preferably, the code management system adopts the Git system.
[0020] Preferably, the project management system adopts the Redmine system.
[0021] The technical solution adopted by the present invention to solve the above-mentioned second technical problem is: a computer-readable storage medium, which stores a computer program and can be read and executed by a processor, characterized in that: when the computer program is executed by the processor, the code submission method as mentioned above is implemented.
[0022] Compared with the prior art, the advantages of the present invention are: on the one hand, the compilation server is triggered through the trigger event interface set in the temporary storage area, and the compilation server obtains the latest submitted code and compiles it to ensure the stability of each submitted code; on the other hand, the compilation server submits the compiled code to the code management system, and the trigger event interface set by the code management system is triggered, so that the code on the code management system can be automatically updated to the project management system, so as to promote the project progress in time, avoid the situation where the developer forgets to update the code to the project management system, resulting in project delays or acceptance confusion, and can shorten the developer's code submission time. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 The flowchart of the code submission method in the embodiment of the present invention. DETAILED DESCRIPTION
[0024] The present invention is further described in detail below with reference to the accompanying drawings.
[0025] like Figure 1 As shown, the code submission method in this embodiment includes a client, a compilation server and an application service layer, and the application service layer is provided with a code management system and a project management system. The code management system in this embodiment adopts the Git system, and the project management system adopts the Redmine system; the Git system is an open source distributed version control system; the Redmine system is a web-based project management software developed in Ruby, and is a cross-platform project management system developed using the ROR framework. The above-mentioned Git system and Redmine system are both prior arts and will not be elaborated here.
[0026] The specific steps for code submission are as follows:
[0027] The developer logs in to the client, fills in the corresponding information in accordance with the regulations, and submits the code to the temporary storage area. Specifically, the bottom layer of the client is encapsulated with commands. After the developer fills in the corresponding information in accordance with the regulations and clicks the submit command, the program will automatically complete the submission content typesetting and submit the code to the temporary storage area.
[0028] The trigger event interface set in the temporary storage area will trigger the compile server, and the compile server will obtain the latest submitted code and compile it. After the compilation is successful, the compile server submits the compiled code to the code management system; specifically, after the compile server obtains the latest submitted code and compiles it, the following steps are also included: determining whether the compilation is successful, if so, the compile server submits the compiled code to the code management system; if not, deleting the code temporarily stored in the temporary storage area and notifying the developer;
[0029] The trigger event interface set by the code management system is triggered, and the code management system automatically intercepts the submission information, identifies the corresponding issue ticket, and uses the submission information to update the corresponding issue ticket status and update content to the project management system; specifically, after the code management system automatically intercepts the submission information, it uses the issue ticket number as an index, intercepts the submission information as the update content, and modifies the issue ticket status and update content in the project management system.
[0030] After the developer logs in to the client and before the developer fills in the corresponding information as required, the following steps are also included:
[0031] The client reads the locally configured developer information, and sends a request to the project management system to query the number of unresolved tickets under the name of the currently logged-in developer. The project management system returns the number of unresolved tickets under the developer's name to the client, and the client determines whether the number of unresolved tickets exceeds the threshold. If so, the developer is not allowed to submit code; if not, the developer can be allowed to fill in the corresponding information according to regulations. In this embodiment, the threshold is 12. Of course, the threshold can be adaptively changed according to the difficulty of the problem to promote the progress of the project in a timely manner; if the developer is not allowed to submit code, the developer needs to contact the manager, and the manager needs to assign the problem to other developers under his account to speed up the overall project.
[0032] In addition, before logging into the client for the first time, the developer needs to configure the developer name, account password, email address and other information in the configuration file. When the compilation server fails to compile, the corresponding developer will be notified by email.
[0033] This embodiment also involves a computer-readable storage medium, which stores a computer program and can be read and executed by a processor. When the computer program is executed by the processor, the code submission method as described above is implemented.
[0034] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A code submission method, characterized in that It includes client, compilation server and application service layer. The application service layer has code management system and project management system. The specific steps for code submission are as follows: The developer logs in to the client, fills in the corresponding information according to the regulations, and submits the code to the temporary storage area; The trigger event interface set in the temporary storage area will trigger the compilation server, which will obtain the latest submitted code and compile it. After the compilation is successful, the compilation server will submit the compiled code to the code management system; The trigger event interface set by the code management system is triggered, and the code management system automatically intercepts the submission information, identifies the corresponding issue ticket, and uses the submission information to update the corresponding issue ticket status and update the content to the project management system.
2. The code submission method according to claim 1, characterized in that: After the developer logs in to the client and before the developer fills in the corresponding information as required, the following steps are also included: The client reads the locally configured developer information and sends a request to the project management system to query the number of unresolved issues remaining under the name of the currently logged-in developer. The project management system returns the number of unresolved issues remaining under the developer's name to the client. The client determines whether the number of unresolved issues remaining exceeds the threshold. If so, the developer is not allowed to submit code; if not, the developer is allowed to fill in the corresponding information according to regulations.
3. The code submission method according to claim 2, characterized in that: When a developer is not allowed to submit code, the developer needs to contact the administrator.
4. The code submission method according to claim 1, characterized in that: The bottom layer of the client is encapsulated with commands. After the developer fills in the corresponding information according to the regulations on the client and clicks the submit command, the program will automatically complete the submission content layout and submit the code to the temporary storage area.
5. The code submission method according to claim 1, characterized in that: After the compilation server obtains the latest submitted code and compiles it, the following steps are also included: Determine whether the compilation is successful. If so, the compilation server submits the compiled code to the code management system; if not, delete the code stored in the temporary storage area and notify the developer.
6. The code submission method according to claim 1, characterized in that: After the code management system automatically intercepts the submitted information, it uses the issue ticket number as an index, intercepts the submitted information as the update content, and modifies the issue ticket status and update content in the project management system.
7. The code submission method according to any one of claims 1 to 6, characterized in that: The code management system adopts the Git system.
8. The code submission method according to any one of claims 1 to 6, characterized in that: The project management system adopts the Redmine system.
9. A computer-readable storage medium storing a computer program and capable of being read and executed by a processor, characterized in that: When the computer program is executed by a processor, the code submission method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Code submission method, electronic device, storage medium and program product
CN117971692A