Code automatic submission method and device, equipment and storage medium

By obtaining access tokens and automatically pulling and submitting front-end and back-end development branches, the front-end code synchronization problem is solved, which improves development efficiency and reduces costs, and achieves code security and consistency.

CN119166490APending Publication Date: 2024-12-20GUANGZHOU SANQI DREAM NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311571601.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-22
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the prior art, there are synchronization problems in the development process of front-end and back-end codes, resulting in low development efficiency and high cost, and the need for manual operations increases communication costs.

Method used

Obtain access tokens through the authorization protocol, pull and submit front-end and back-end development branches separately, avoid manual operations, ensure consistent development pace, and deploy code in the test environment.

Benefits of technology

It improves the efficiency of front-end code submission, reduces communication costs, and ensures the security and consistency of the development process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166490A_ABST
    Figure CN119166490A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an automatic code submission method and device, equipment and a storage medium, and the method comprises the steps: obtaining an access token corresponding to a code item set through an authorization protocol under the condition that a front-end code file and a rear-end code file are generated, and the code item set comprises a front-end development branch and a rear-end development branch; respectively pulling the front-end development branch and the rear-end development branch based on the access token, adding the front-end code to the front-end development branch to obtain a front-end to-be-submitted code, and adding the rear-end code to the rear-end development branch to obtain a rear-end to-be-submitted code; and based on the access token, submitting the front-end to-be-submitted code to the front-end development branch, and submitting the rear-end to-be-submitted code to the rear-end development branch, so that the development efficiency is improved, and the labor cost in the development process is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method, apparatus, device and storage medium for automatic code submission. Background Art

[0002] With the continuous improvement of software development technology, people have higher and higher requirements for development efficiency and quality. In order to ensure the efficiency of each link in project development, various development tools are usually used to assist. However, in the process of submitting and deploying front-end and back-end codes, only using corresponding development tools still cannot meet the technical personnel's needs for development cost and efficiency.

[0003] In the prior art, the functions of the front-end and back-end codes are usually implemented through scaffolding or drag-and-drop methods. For example, the front-end and back-end developers pull development branches according to different projects respectively, copy the new branch codes to the local integrated development environment, submit the new branch codes and automatically deploy them respectively. The front-end and back-end need to communicate and perform manual operations respectively, and there is a situation where the development pace is inconsistent. The entire development process is time-consuming and labor-intensive, which reduces the development efficiency and increases the labor cost of the development process. Summary of the invention

[0004] The embodiments of the present application provide a method, apparatus, device and storage medium for automatic code submission, which solve the problems of low development efficiency and high development cost due to the lack of synchronization of front-end and back-end codes during the development process, improve the development efficiency and reduce the labor cost during the development process.

[0005] In a first aspect, an embodiment of the present application provides a method for automatically submitting a code, comprising:

[0006] When the front-end code file and the back-end code file are generated, an access token corresponding to the code project set is obtained through an authorization protocol, wherein the code project set includes a front-end development branch and a back-end development branch;

[0007] Pull the front-end development branch and the back-end development branch respectively based on the access token, add the front-end code to the front-end development branch to obtain the front-end code to be submitted, and add the back-end code to the back-end development branch to obtain the back-end code to be submitted;

[0008] Based on the access token, the front-end code to be submitted is submitted to the front-end development branch, and the back-end code to be submitted is submitted to the back-end development branch.

[0009] Optionally, pulling the front-end development branch and the back-end development branch respectively based on the access token includes:

[0010] Access the front-end development branch and the back-end development branch respectively based on the access token, create a new front-end branch in the front-end development branch, and create a new back-end branch in the back-end development branch;

[0011] Pull the front-end new branch and the back-end new branch.

[0012] Optionally, the step of adding the front-end code to the front-end development branch to obtain the front-end code to be submitted, and adding the back-end code to the back-end development branch to obtain the back-end code to be submitted includes:

[0013] According to the recognition result of the front-end code, the front-end code is added to the corresponding folder of the corresponding new front-end branch to obtain the front-end code to be submitted. According to the recognition result of the back-end code, the back-end code is added to the corresponding folder of the corresponding new back-end branch to obtain the back-end code to be submitted.

[0014] Optionally, the step of creating a new backend branch in the backend development branch includes:

[0015] Get the set branch creation rules;

[0016] A new backend branch is created in the backend development branch based on the branch creation rule.

[0017] Optionally, after pulling the front-end development branch and the back-end development branch based on the access token, the method further includes:

[0018] A front-end deployment identifier and a back-end deployment identifier are added to the front-end development branch and the back-end development branch respectively.

[0019] Optionally, after submitting the front-end code to be submitted to the front-end development branch and submitting the back-end code to be submitted to the back-end development branch, the process further includes:

[0020] The front-end code to be submitted is deployed to the front-end test environment according to the front-end deployment identifier, and the back-end code to be submitted is deployed to the back-end test environment according to the back-end deployment identifier, and the corresponding test results are displayed.

[0021] Optionally, after displaying the corresponding test results, the method further includes:

[0022] Determine a code submitter who generates the front-end code file and the back-end code file;

[0023] The test result is sent to the code submitter for modifying the corresponding code branch based on the code modification operation of the code submitter.

[0024] In a second aspect, an embodiment of the present application provides a device for automatically submitting a code, including:

[0025] An access token acquisition module, used to acquire an access token corresponding to a code project set through an authorization protocol when a front-end code file and a back-end code file are generated, wherein the code project set includes a front-end development branch and a back-end development branch;

[0026] A development branch pulling module, used to pull the front-end development branch and the back-end development branch respectively based on the access token;

[0027] A code adding module, used for adding the front-end code to the front-end development branch to obtain the front-end code to be submitted, and adding the back-end code to the back-end development branch to obtain the back-end code to be submitted;

[0028] A code submission module is used to submit the front-end code to be submitted to the front-end development branch and submit the back-end code to be submitted to the back-end development branch based on the access token.

[0029] In a third aspect, an embodiment of the present application provides an automatic code submission device, the device comprising: one or more processors; a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the automatic code submission method described in the first aspect.

[0030] In a fourth aspect, an embodiment of the present application provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the automatic code submission method as described in the first aspect.

[0031] In the embodiment of the present application, when generating the front-end code file and the back-end code file, the access token corresponding to the code project set is obtained through the authorization protocol, and the code project set includes the front-end development branch and the back-end development branch; based on the access token, the front-end development branch and the back-end development branch are pulled respectively, the front-end code is added to the front-end development branch to obtain the front-end code to be submitted, and the back-end code is added to the back-end development branch to obtain the back-end code to be submitted; based on the access token, the front-end code to be submitted is submitted to the front-end development branch, and the back-end code to be submitted is submitted to the back-end development branch. The front-end development branch and the back-end development branch can be pulled respectively by carrying the access token, and the front-end code is submitted in the front-end development branch and the back-end code is submitted in the back-end development branch respectively. While ensuring the security of the development environment, the independence of the front-end and the back-end in the development process can be ensured, avoiding the manual operation of the generated code by the code submitter, and also avoiding the way of ensuring the consistency of the development pace through the communication between the front-end developer and the back-end developer, reducing the communication cost in the process of submitting the front-end and back-end codes, improving the submission efficiency of the front-end and back-end codes, and ensuring the security and consistency of the automatic submission of the front-end and back-end codes. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 This is a flowchart of a method for automatically submitting code provided in an embodiment of the present application;

[0033] Figure 2 This is a flow chart of a development branch pulling method provided by an embodiment of the present application;

[0034] Figure 3 is a flowchart of a code deployment method provided by an embodiment of the present application;

[0035] Figure 4 is a flow chart of a code modification method provided by an embodiment of the present application;

[0036] Figure 5 It is a structural diagram of a code automatic submission device provided in an embodiment of the present application;

[0037] Figure 6 It is a structural diagram of a code automatic submission device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0039] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0040] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0041] The following, in conjunction with the accompanying drawings, describes in detail the code automatic submission method, device, equipment and medium provided in the embodiments of the present application through specific embodiments and their application scenarios.

[0042] The automatic code submission method provided in the embodiment of the present application can be applied to the scene where the front-end code and the back-end code are automatically submitted after they are generated. The method can be executed by a computing device such as a server, a laptop, a tablet computer, etc.

[0043] Figure 1 is a flowchart of a method for automatically submitting a code provided in an embodiment of the present application, such as Figure 1 As shown, including:

[0044] Step S101: When a front-end code file and a back-end code file are generated, an access token corresponding to a code project set is obtained through an authorization protocol, where the code project set includes a front-end development branch and a back-end development branch.

[0045] In one embodiment, the front-end code file and the back-end code file can be generated separately through the low-code platform, wherein the low-code platform is a set of visual development tools, which can help developers write the basic functions of the front-end and back-end solidly. Developers only need to fill in the form to configure or drag and drop to generate the front-end components to complete the rapid construction of the back-end management system. It is also possible for developers to write code and store the completed code in the corresponding file to generate a code file, and send the code file to the server. Among them, the low-code platform can be a development platform that can quickly generate applications without coding or with a small amount of code. The front-end code file can be used to store the code written in the front-end development, and the back-end code file can be used to store the code written in the back-end development. The authorization protocol can be used to authorize a third-party application as an authorization mechanism to obtain user data. For example, through the authorization protocol, the owner of the data tells the system that he agrees to authorize the third-party application to enter the system, thereby obtaining the data of the third-party application. The access token can be a temporary password with a time limit, and the access token can be a string of encrypted strings generated by the server for identity authentication. The code project set can be an open source project for a warehouse management system, which mainly manages the code and documents generated during the software development process, and mainly manages the code and documents in two dimensions: groups and engineering projects. A group can include multiple software development tasks, and an engineering project can also include multiple branches, each branch is independent of each other, and each branch can also be merged. Optionally, the code project set includes a front-end development branch and a back-end development branch. The front-end development branch is used to store a folder for front-end code files. The back-end development branch is used to store a folder for back-end code files. After the front-end code and the back-end code are generated separately through the low-code platform, the access token corresponding to the code project set is obtained by entering the user's login information and the authorization agreement to obtain the permission to access the code project set. In one embodiment, after the server receives the front-end code files and back-end code files sent by the developer, the access token corresponding to the code project set is obtained by entering the user's login information and the authorization agreement to obtain the permission to access the code project set.

[0046] Step S102: Pull the front-end development branch and the back-end development branch based on the access token, add the front-end code to the front-end development branch to obtain the front-end code to be submitted, and add the back-end code to the back-end development branch to obtain the back-end code to be submitted.

[0047] The front-end code to be submitted can be a code that stores the front-end code file in the corresponding position of the front-end code project set and waits for submission and deployment, wherein the storage location can be in the main branch of the front-end code project set or in a specific sub-branch. The back-end code to be submitted can be a code that stores the back-end code file in the corresponding position of the back-end code project set and waits for submission and deployment, wherein the storage location can be in the main branch of the back-end code project set or in a specific sub-branch. In one embodiment, the front-end development branch and the back-end development branch can be requested to be pulled from the code project set by carrying the acquired access token. When the code project set receives the corresponding access token for pulling the development branch, the server can be allowed to pull the front-end development branch and the back-end development branch. After pulling the front-end development branch and the back-end development branch respectively, the front-end code is stored in the front-end main development branch respectively to obtain the front-end code to be submitted, and the back-end code is stored in the back-end main development branch to obtain the back-end code to be submitted.

[0048] Step S103: Based on the access token, the front-end code to be submitted is submitted to the front-end development branch, and the back-end code to be submitted is submitted to the back-end development branch.

[0049] In one embodiment, the access token can be security-verified through a code project set. If the security verification is passed, the code to be submitted is allowed to be submitted in the corresponding development branch. The security verification may include string verification and authorization time verification. When both the string verification and the authorization time verification are passed, the code is allowed to be submitted to the corresponding development branch. Exemplarily, the authorization period of the access token is obtained, such as 2 hours. After the access token is string-compared, the difference between the authorization period of the access token and the current time can be calculated to obtain the calculation result. If the calculated time difference is less than 2 hours, the authorization time verification is passed, otherwise the security verification fails. Since the access token can be a string of encrypted strings, the encrypted string can be decrypted by the corresponding decryption key when the authorization time verification is passed, and the decrypted string is further compared with the string corresponding to the preset code submission function. If they are the same, the authorization server submits the code to be submitted to the corresponding development branch. Optionally, the front-end code to be submitted is submitted to the front-end development branch, and the back-end code to be submitted is submitted to the back-end development branch.

[0050] In the embodiment of the present application, when generating the front-end code file and the back-end code file, the access token corresponding to the code project set is obtained through the authorization protocol, and the code project set includes the front-end development branch and the back-end development branch; based on the access token, the front-end development branch and the back-end development branch are pulled respectively, the front-end code is added to the front-end development branch to obtain the front-end code to be submitted, and the back-end code is added to the back-end development branch to obtain the back-end code to be submitted; based on the access token, the front-end code to be submitted is submitted to the front-end development branch, and the back-end code to be submitted is submitted to the back-end development branch. The front-end development branch and the back-end development branch can be pulled respectively by carrying the access token, and the front-end code is submitted in the front-end development branch and the back-end code is submitted in the back-end development branch respectively. While ensuring the security of the development environment, the independence of the front-end and the back-end in the development process can be ensured, avoiding the manual operation of the generated code by the code submitter, and also avoiding the way of ensuring the consistency of the development pace through the communication between the front-end developer and the back-end developer, reducing the communication cost in the process of submitting the front-end and back-end codes, improving the submission efficiency of the front-end and back-end codes, and ensuring the security and consistency of the automatic submission of the front-end and back-end codes.

[0051] Figure 2 is a flow chart of a development branch pulling method provided in an embodiment of the present application, such as Figure 2 As shown, including:

[0052] Step S201: When a front-end code file and a back-end code file are generated, an access token corresponding to a code project set is obtained through an authorization protocol, where the code project set includes a front-end development branch and a back-end development branch.

[0053] Step S202: Access the front-end development branch and the back-end development branch respectively based on the access token, create a new front-end branch in the front-end development branch, and create a new back-end branch in the back-end development branch.

[0054] In one embodiment, the front-end new branch can be a new branch created in the front-end development branch according to the preset front-end branch creation rule, and the front-end new branch can be a new folder for storing the front-end code to be submitted. The back-end new branch can be a new branch created in the back-end development branch according to the preset back-end branch creation rule, and the back-end new branch can also be a folder for storing the back-end code to be submitted. The server can access the front-end development branch and the back-end development branch locally by carrying the acquired access token, and create a new front-end branch in the front-end development branch, and create a new back-end branch in the back-end development branch, such as auto-branch-{zhangsan}-{datetime}-{6-digit random number}. When creating a new back-end branch, optionally, obtain the set branch creation rule, and create a new back-end branch in the back-end development branch based on the branch creation rule. In one embodiment, the branch creation rule set according to the development requirements and development habits is obtained, and the back-end new branch is created in the back-end development branch based on the hierarchy of the creation branch and the naming of the branch. For example, if the back-end code is for the development of new functions, a feature branch will be created based on develop, and the branch will be named feature / user_module or feature / cart_module, etc.

[0055] In another embodiment, all development branches with access rights can be queried in the front-end development branch and all development branches with access rights can be queried in the back-end development branch by carrying the access token. A development branch with access rights can be selected in the front-end development branch as a new front-end branch, and a development branch with access rights can be selected in the back-end development branch as a new back-end branch.

[0056] Step S203: Pull the front-end new branch and the back-end new branch.

[0057] After obtaining the front-end new branch and the back-end new branch, determine the branch name of the corresponding branch, and pull the front-end new branch and the back-end new branch through the branch acquisition command. For example, if the front-end new branch name is XXX, then the front-end new branch with the instruction name "XXX" is pulled through the "gitclone-b XXX" command.

[0058] Step S204: Add the front-end code to the front-end development branch to obtain the front-end code to be submitted, and add the back-end code to the back-end development branch to obtain the back-end code to be submitted.

[0059] Step S205: Based on the access token, submit the front-end code to be submitted to the front-end development branch, and submit the back-end code to be submitted to the back-end development branch.

[0060] The embodiment of the present application accesses the front-end development branch and the back-end development branch respectively based on the access token, creates a new front-end branch in the front-end development branch, and creates a new back-end branch in the back-end development branch; and pulls the new front-end branch and the new back-end branch. By carrying the access token, the front-end new branch and the back-end new branch can be created and branches with access rights can be selected as the front-end new branch and the back-end new branch, which can ensure the security in the front-end and back-end development branches. By creating the front-end new branch and the back-end new branch respectively, it can be ensured that the front-end code and the back-end code have independent development environments and are not affected by other branches, thereby ensuring the quality of project development.

[0061] In one embodiment, the front-end code is added to the front-end development branch to obtain the front-end code to be submitted, and the back-end code is added to the back-end development branch to obtain the back-end code to be submitted, including: according to the recognition result of the front-end code, the front-end code is added to the corresponding folder of the corresponding front-end new branch to obtain the front-end code to be submitted, and according to the recognition result of the back-end code, the back-end code is added to the corresponding folder of the corresponding back-end new branch to obtain the back-end code to be submitted.

[0062] In the actual development process, corresponding development specifications are set at the front-end and back-end according to the developer's development habits or the performance of the development project, and the code can be submitted to a folder in the development branch according to the development specifications. In one embodiment, the front-end code is identified according to the front-end code development specifications, such as identifying the name of the front-end code, the main content of the front-end code, and the submission location, etc., and the front-end code is added to the corresponding folder of the front-end new branch according to the submission location to obtain the front-end code to be submitted, where the submission location can be one or more folder names of the front-end branch. The back-end code is identified according to the back-end code development specifications to obtain an identification result.

[0063] And determine the specific code submission location in the recognition result, where the submission location can be one or more folder names in the new branch of the backend, and add the backend code to the folder corresponding to the folder name to obtain the backend code to be submitted. The embodiment of the present application adds the front-end code to the corresponding folder of the corresponding new branch of the front-end according to the recognition result of the front-end code to obtain the front-end code to be submitted, and adds the back-end code to the corresponding folder of the corresponding new branch of the back-end according to the recognition result of the back-end code to obtain the back-end code to be submitted. The specific submission location of the front-end and back-end codes can be determined through different development rules of the front-end and back-end, and the front-end and back-end codes can be maintained subsequently.

[0064] Figure 3 is a flowchart of a code deployment method provided in an embodiment of the present application, such as Figure 3 As shown, including:

[0065] Step S301: When generating a front-end code file and a back-end code file, obtain an access token corresponding to a code project set through an authorization protocol, wherein the code project set includes a front-end development branch and a back-end development branch.

[0066] Step S302: Pull the front-end development branch and the back-end development branch based on the access token, add the front-end code to the front-end development branch to obtain the front-end code to be submitted, and add the back-end code to the back-end development branch to obtain the back-end code to be submitted.

[0067] Step S303: Based on the access token, submit the front-end code to be submitted to the front-end development branch, and submit the back-end code to be submitted to the back-end development branch.

[0068] Step S304: adding a front-end deployment identifier and a back-end deployment identifier to the front-end development branch and the back-end development branch respectively.

[0069] In one embodiment, the front-end deployment identifier can be the prefix of the front-end development branch, which is used to identify that there is undeployed front-end code in the development branch. The back-end deployment identifier can be the prefix of the back-end development branch, which is used to identify that there is undeployed back-end code in the development branch. Exemplarily, if the front-end development branch is auto-branch-{zhangsan}-{datetime}-{6-digit random number}, the front-end deployment identifier can be "auto-branch".

[0070] In one embodiment, after the front-end code to be submitted is submitted to the front-end development branch and the back-end code to be submitted is submitted to the back-end development branch, the front-end code to be submitted is deployed to the front-end test environment according to the front-end deployment identifier, and the back-end code to be submitted is deployed to the back-end test environment according to the back-end deployment identifier, and the corresponding test results are displayed.

[0071] According to the pre-configured continuous integration and continuous delivery / deployment process, a deployment file is created in the code project set to define the various stages, tasks and steps of the continuous integration and continuous delivery / deployment process. Continuous integration refers to automatically integrating the developer's code into the corresponding branch, and verifying and building the code through automated testing, compilation and construction processes, so as to quickly discover and solve code problems, help speed up the speed and quality of code delivery, and improve the collaboration efficiency of the development team. The code verified by continuous integration is automatically deployed to the production environment to achieve faster delivery and response requirements. Continuous delivery / deployment includes automated testing, construction, deployment and monitoring steps to ensure that the delivered code is stable, reliable and secure. In one embodiment, after the front-end code to be submitted is submitted to the new front-end branch according to the front-end deployment identifier, the execution of the continuous integration and continuous delivery / deployment process is automatically triggered, and the front-end code to be submitted is deployed to the front-end test environment. After the back-end code to be submitted is submitted to the new back-end branch according to the back-end deployment identifier, the execution of the continuous integration and continuous delivery / deployment process is automatically triggered, and the back-end code to be submitted is deployed to the back-end test environment, and the test results are displayed.

[0072] The embodiment of the present application adds a front-end deployment identifier and a back-end deployment identifier to the front-end development branch and the back-end development branch respectively, deploys the front-end code to be submitted to the front-end test environment according to the front-end deployment identifier, deploys the back-end code to be submitted to the back-end test environment according to the back-end deployment identifier, and displays the corresponding test results. It can perform targeted automated deployment according to the front-end deployment identifier and the back-end deployment identifier, thereby improving the deployment efficiency of the front-end and back-end codes.

[0073] Figure 4 is a flowchart of a code modification method provided by an embodiment of the present application, such as Figure 4 As shown, including:

[0074] Step S401: Determine the code submitter who generates the front-end code file and the back-end code file.

[0075] In one embodiment, the code submitter of the front-end code file may be the developer of the front-end code, and the code submitter of the back-end code file may be the developer of the back-end code. The code submitters of the front-end code file and the back-end code file may be obtained through the low-code platform. The code submitters of the front-end code file and the back-end code file may also be determined through the user information entered by the developer before sending the code file to the server.

[0076] Step S402: Send the test result to the code submitter, so as to modify the corresponding code branch based on the code modification operation of the code submitter.

[0077] The user information associated with the code submitter can be queried based on the determined code submitter, and the user information may include the submitter's email address or other contact information. The test result may be a notification of "test normal" or "test abnormal", or a detailed test report. After receiving the test result, the code submitter sends a code modification request to the server, determines the code branch corresponding to the code to be modified, and modifies the code in the determined code branch.

[0078] The embodiment of the present application determines the code submitter who generated the front-end code file and the back-end code file; sends the test result to the code submitter, and modifies the corresponding code branch based on the code modification operation of the code submitter. After the code is submitted, the submitter information can still be traced back. When part of the code needs to be modified, the corresponding branch can be pulled for adjustment, avoiding the need to modify all the front-end and back-end codes after obtaining the test results, and then redeploying all the code files, which will increase the deployment pressure of the server and reduce the server performance.

[0079] Figure 5 : is a schematic diagram of the structure of a code automatic submission device provided in an embodiment of the present application, including:

[0080] An access token acquisition module 51 is used to acquire an access token corresponding to a code project set through an authorization protocol when a front-end code file and a back-end code file are generated, wherein the code project set includes a front-end development branch and a back-end development branch;

[0081] A development branch pulling module 52, used to pull the front-end development branch and the back-end development branch respectively based on the access token;

[0082] A code adding module 53 is used to add the front-end code to the front-end development branch to obtain the front-end code to be submitted, and to add the back-end code to the back-end development branch to obtain the back-end code to be submitted;

[0083] The code submission module 54 is used to submit the front-end code to be submitted to the front-end development branch and submit the back-end code to be submitted to the back-end development branch based on the access token.

[0084] In the embodiment of the present application, when generating the front-end code file and the back-end code file, the access token corresponding to the code project set is obtained through the authorization protocol, and the code project set includes the front-end development branch and the back-end development branch; based on the access token, the front-end development branch and the back-end development branch are pulled respectively, the front-end code is added to the front-end development branch to obtain the front-end code to be submitted, and the back-end code is added to the back-end development branch to obtain the back-end code to be submitted; based on the access token, the front-end code to be submitted is submitted to the front-end development branch, and the back-end code to be submitted is submitted to the back-end development branch. The front-end development branch and the back-end development branch can be pulled respectively by carrying the access token, and the front-end code is submitted in the front-end development branch and the back-end code is submitted in the back-end development branch respectively. While ensuring the security of the development environment, the independence of the front-end and the back-end in the development process can be ensured, avoiding the manual operation of the generated code by the code submitter, and also avoiding the way of ensuring the consistency of the development pace through the communication between the front-end developer and the back-end developer, reducing the communication cost in the process of submitting the front-end and back-end codes, improving the submission efficiency of the front-end and back-end codes, and ensuring the security and consistency of the automatic submission of the front-end and back-end codes.

[0085] In a possible embodiment, the development branch pulling module 52 is specifically used to access the front-end development branch and the back-end development branch respectively using the access token, and to create a new front-end branch in the front-end development branch, and to create a new back-end branch in the back-end development branch;

[0086] Pull the front-end new branch and the back-end new branch.

[0087] In a possible embodiment, the code adding module 53 is specifically used to add the front-end code to the corresponding folder of the corresponding new front-end branch to obtain the front-end code to be submitted according to the recognition result of the front-end code, and to add the back-end code to the corresponding folder of the corresponding new back-end branch to obtain the back-end code to be submitted according to the recognition result of the back-end code.

[0088] In a possible embodiment, the development branch pulling module 52 is specifically used to obtain the set branch creation rule;

[0089] A new backend branch is created in the backend development branch based on the branch creation rule.

[0090] In a possible embodiment, the automatic code submission device further includes a deployment identifier adding module, and the deployment identifier adding module is used to add a front-end deployment identifier and a back-end deployment identifier to the front-end development branch and the back-end development branch respectively.

[0091] In a possible embodiment, the automatic code submission device also includes a deployment module, which is used to deploy the front-end code to be submitted to the front-end test environment according to the front-end deployment identifier, deploy the back-end code to be submitted to the back-end test environment according to the back-end deployment identifier, and display the corresponding test results.

[0092] In a possible embodiment, the automatic code submission device further includes a code modification module, the code modification module being used to determine a code submitter who generates the front-end code file and the back-end code file;

[0093] The test result is sent to the code submitter for modifying the corresponding code branch based on the code modification operation of the code submitter.

[0094] The embodiment of the present application also provides a code automatic submission device, which can integrate an automatic code submission apparatus provided in the embodiment of the present application. Figure 6 Schematic diagram of a code automatic submission device provided in an embodiment of the present application. Figure 6 The automatic code submission device includes: an input device 63, an output device 64, a memory 62 and one or more processors 61; the memory 62 is used to store one or more programs; when one or more programs are executed by one or more processors 61, the one or more processors 61 implement the automatic code submission method provided in the above embodiment. The input device 63, the output device 64, the memory 62 and the processor 61 can be connected by a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0095] The memory 62, as a computing device readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the code automatic submission method provided in any embodiment of the present application. The memory 62 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 62 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 62 may further include a memory remotely arranged relative to the processor 61, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0096] The input device 63 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 64 may include a display device such as a display screen.

[0097] The processor 61 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 62, that is, realizes the above-mentioned automatic code submission method.

[0098] The automatic code submission device, equipment and computer provided above can be used to execute the automatic code submission method provided in any of the above embodiments, and have corresponding functions and beneficial effects.

[0099] The embodiment of the present application further provides a storage medium storing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to execute the automatic code submission method provided in the above embodiment. The automatic code submission method includes:

[0100] When the front-end code file and the back-end code file are generated, an access token corresponding to the code project set is obtained through an authorization protocol, wherein the code project set includes a front-end development branch and a back-end development branch;

[0101] Pull the front-end development branch and the back-end development branch respectively based on the access token, add the front-end code to the front-end development branch to obtain the front-end code to be submitted, and add the back-end code to the back-end development branch to obtain the back-end code to be submitted;

[0102] Based on the access token, the front-end code to be submitted is submitted to the front-end development branch, and the back-end code to be submitted is submitted to the back-end development branch.

[0103] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.

[0104] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application is not limited to the automatic code submission method described above, and the computer executable instructions can also execute related operations in the automatic code submission method provided in any embodiment of the present application.

[0105] The automatic code submission apparatus, device and storage medium provided in the above embodiments can execute the automatic code submission method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the automatic code submission method provided in any embodiment of the present application.

[0106] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A method for automatic code submission, characterized in that: include: When the front-end code file and the back-end code file are generated, an access token corresponding to the code project set is obtained through an authorization protocol, wherein the code project set includes a front-end development branch and a back-end development branch; Pull the front-end development branch and the back-end development branch respectively based on the access token, add the front-end code to the front-end development branch to obtain the front-end code to be submitted, and add the back-end code to the back-end development branch to obtain the back-end code to be submitted; Based on the access token, the front-end code to be submitted is submitted to the front-end development branch, and the back-end code to be submitted is submitted to the back-end development branch.

2. The automatic code submission method according to claim 1, characterized in that: Pulling the front-end development branch and the back-end development branch respectively based on the access token includes: Access the front-end development branch and the back-end development branch respectively based on the access token, create a new front-end branch in the front-end development branch, and create a new back-end branch in the back-end development branch; Pull the front-end new branch and the back-end new branch.

3. The automatic code submission method according to claim 2, characterized in that: The step of adding the front-end code to the front-end development branch to obtain the front-end code to be submitted, and adding the back-end code to the back-end development branch to obtain the back-end code to be submitted includes: According to the recognition result of the front-end code, the front-end code is added to the corresponding folder of the corresponding new front-end branch to obtain the front-end code to be submitted. According to the recognition result of the back-end code, the back-end code is added to the corresponding folder of the corresponding new back-end branch to obtain the back-end code to be submitted.

4. The automatic code submission method according to claim 2, characterized in that: The step of creating a new backend branch in the backend development branch includes: Get the set branch creation rules; A new backend branch is created in the backend development branch based on the branch creation rule.

5. The automatic code submission method according to claim 1, characterized in that: After pulling the front-end development branch and the back-end development branch respectively based on the access token, the method further includes: A front-end deployment identifier and a back-end deployment identifier are added to the front-end development branch and the back-end development branch respectively.

6. The automatic code submission method according to claim 5, characterized in that: After submitting the front-end code to be submitted to the front-end development branch and submitting the back-end code to be submitted to the back-end development branch, the method further includes: The front-end code to be submitted is deployed to the front-end test environment according to the front-end deployment identifier, and the back-end code to be submitted is deployed to the back-end test environment according to the back-end deployment identifier, and the corresponding test results are displayed.

7. The method for automatic code submission according to claim 6, characterized in that: After displaying the corresponding test results, the method further includes: Determine a code submitter who generates the front-end code file and the back-end code file; The test result is sent to the code submitter for modifying the corresponding code branch based on the code modification operation of the code submitter.

8. A code automatic submission device, characterized in that: include: An access token acquisition module, used to acquire an access token corresponding to a code project set through an authorization protocol when a front-end code file and a back-end code file are generated, wherein the code project set includes a front-end development branch and a back-end development branch; A development branch pulling module, used to pull the front-end development branch and the back-end development branch respectively based on the access token; A code adding module, used for adding the front-end code to the front-end development branch to obtain the front-end code to be submitted, and adding the back-end code to the back-end development branch to obtain the back-end code to be submitted; A code submission module is used to submit the front-end code to be submitted to the front-end development branch and submit the back-end code to be submitted to the back-end development branch based on the access token.

9. A code automatic submission device, the device comprising: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the automatic code submission method as described in any one of claims 1-7.

10. A storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the code automatic submission method according to any one of claims 1 to 7 when executed by a computer processor.