CN116028064A - Git-based code processing method, system, equipment and storage medium - Google Patents

Git-based code processing method, system, equipment and storage medium Download PDF

Info

Publication number
CN116028064A
CN116028064A CN202310166439.0A CN202310166439A CN116028064A CN 116028064 A CN116028064 A CN 116028064A CN 202310166439 A CN202310166439 A CN 202310166439A CN 116028064 A CN116028064 A CN 116028064A
Authority
CN
China
Prior art keywords
code
merging
service
branch
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310166439.0A
Other languages
Chinese (zh)
Inventor
何辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An E Wallet Electronic Commerce Co Ltd
Original Assignee
Ping An E Wallet Electronic Commerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An E Wallet Electronic Commerce Co Ltd filed Critical Ping An E Wallet Electronic Commerce Co Ltd
Priority to CN202310166439.0A priority Critical patent/CN116028064A/en
Publication of CN116028064A publication Critical patent/CN116028064A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

The application provides a code processing method, a system, equipment and a storage medium, wherein the code processing method based on Git triggers a callback function based on Git by receiving a code merging instruction; calling a service pointing address in the callback function, wherein the service pointing address points to a code merging service; confirming that the merging result returned by the service pointing address is that the merging branch is successful; and saving the branch codes to be combined. The method and the device greatly reduce the processing nodes of the code merging branches and shorten the time of the code merging flow.

Description

Git-based code processing method, system, equipment and storage medium
Technical Field
The application belongs to the technical field of computers, and particularly relates to a code processing method, a code processing system, code processing equipment and a code processing storage medium based on Git.
Background
The Git system is an open-source distributed version control system and can effectively and rapidly process project version management. The Git system is mostly used for code management of IOS development projects. In the IOS project development process, the main project is typically composed of a plurality of modules, each of which is equipped with a respective Git system. When a developer receives a corresponding development requirement for the main project, the developer needs to pull corresponding development branches from the Git system corresponding to the modules, and perform requirement development for the development requirement. When the project release is carried out after the demand development is finished, the development branches pulled by the demand development in the module are merged into the corresponding release branches of the module.
However, when the developer needs to merge the own code branches into a specific branch, the code-merging process needs to be initiated and the code auditor needs to be selected, and after the code auditor confirms that the problem is not caused, the code auditor needs to click on the code processing flow such as the merged code, so that the whole code branch merging process needs a lot of processing nodes, but the developer needs a lot of time to concentrate on writing the code, if the effort and time input for submitting the code are more, the development time of the whole project is greatly increased, and the earning project development period is prolonged.
Disclosure of Invention
The code processing method, the system, the equipment and the storage medium based on Git can reduce the code processing nodes and shorten the time of the code merging process.
According to a first aspect of an embodiment of the present application, there is provided a method for processing a code based on Git, including:
receiving a code merging instruction, and triggering a callback function based on Git;
calling a service pointing address in the callback function, wherein the service pointing address points to a code merging service;
confirming that the merging result returned by the service pointing address is that the merging branch is successful; and saving the branch codes to be combined.
In some embodiments of the present application, the code combining service specifically includes the following service steps:
acquiring source codes and code description specifications;
confirming that the request format of the code description specification is correct; acquiring merging branch parameters and source branch parameters according to code description specifications;
initiating a code merging branch request according to the merging branch parameter and the source branch parameter; and returns the combined result.
In some embodiments of the present application, the confirmation code description specification has a correct request format, and specifically includes:
acquiring a request format of a code description specification;
if the request format includes all the merging branch parameters and the source branch parameters, the request format of the service-oriented address is confirmed to be correct.
In some embodiments of the present application, acquiring the merging branch parameter and the source branch parameter according to the code description specification specifically includes:
according to the request format of the code description specification, acquiring a code auditor, an object code merging branch and submitting code function description as merging branch parameters;
according to the request format of the code description specification, the source code is acquired as a source branch parameter.
In some embodiments of the present application, receiving a code merging instruction, triggering a callback function, specifically including:
setting a callback function in Webhook based on a Git platform;
detecting a code merging instruction through Webhook;
and triggering a callback function according to the code merging instruction.
In some embodiments of the present application, calling the service-oriented address in the callback function specifically includes:
setting a URL address as a service pointing address based on a callback function; the URL address points to the code merging service;
the URL address of the callback function is called.
In some embodiments of the present application, after calling the service-oriented address in the callback function, the method further includes:
and if the merging result returned by the confirmation service pointing address is that the merging branch fails, rejecting the code merging instruction.
According to a second aspect of the embodiments of the present application, there is provided a Git-based code processing system, specifically including:
an instruction acquisition unit: the method comprises the steps of receiving a code merging instruction, and triggering a callback function based on Git;
service callback unit: the service pointing address is used for calling the service pointing address in the callback function, and the service pointing address points to the code merging service;
code saving unit: the merging result returned by the service pointing address is used for confirming that the merging branch is successful; and saving the branch codes to be combined.
According to a third aspect of the embodiments of the present application, there is provided a code processing apparatus, including:
a memory: for storing executable instructions; and
and the processor is used for being connected with the memory to execute the executable instructions so as to complete the code processing method.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium having a computer program stored thereon; the computer program is executed by a processor to implement a code processing method.
By adopting the Git-based code processing method, the system, the equipment and the storage medium, the code merging instruction is received, and the Git-based callback function is triggered; calling a service pointing address in the callback function, wherein the service pointing address points to a code merging service; confirming that the merging result returned by the service pointing address is that the merging branch is successful; and saving the branch codes to be combined.
The method and the device greatly reduce the processing nodes of the code merging branches and shorten the time of the code merging flow.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
a schematic of the steps of a method of existing code merging branches is shown in fig. 1;
a schematic step diagram of a code processing method according to an embodiment of the present application is shown in fig. 2;
a schematic diagram of steps of a code combining service according to an embodiment of the present application is shown in fig. 3;
an exemplary diagram of steps for validating that a code description specification is in a correct format of a request in accordance with an embodiment of the present application is shown in FIG. 4;
an exemplary diagram of steps for triggering a callback function according to an embodiment of the present application is shown in fig. 5;
a schematic flow chart of a code processing method according to an embodiment of the present application is shown in fig. 6;
a schematic diagram of the structure of a code processing system according to an embodiment of the present application is shown in fig. 7;
a schematic structural diagram of a code processing apparatus according to an embodiment of the present application is shown in fig. 8.
Detailed Description
In the process of realizing the application, the inventor finds that when a developer needs to merge own code branches into a certain designated branch based on the Git system, the code reviewer needs to be initiated to merge the codes and selected, and after the code reviewer confirms that the code reviewer has no problem, the code processing flows such as 'merge' codes and the like also need to be clicked, so that the whole code branch merging process needs a plurality of processing nodes.
However, a developer needs a lot of time to concentrate on writing codes, and if the effort and time for submitting codes are more, the development time of the whole project is greatly increased, and the earning development period of the project is prolonged.
A schematic of the steps of a method of existing code merging branches is shown in fig. 1.
As shown in fig. 1, at present, when a developer finishes writing codes and needs to merge code branches, the developer needs to submit the codes first, then enter a visual page of Git to initiate a branch merging request, merge source branches of own codes into specified target branches, and meanwhile, a code auditor needs to be specified in the merging request; after the branch merging request is successfully initiated, the code auditor sees the branch merging request and returns a successful result of the branch merging request after the branch merging request passes through.
Therefore, after the developer submits the codes, the developer needs to process a subsequent series of actions, and finally, a code branch merging request can be initiated, so that the current code merging branch flow is excessively complicated, more effort and time of the developer are occupied, and the code processing time and the whole project development period are greatly prolonged.
Meanwhile, the applicant also discovers that in practical application, when a developer processes codes through the Git visual management page, the developer has complicated and many functions and is not friendly in experience, and thus the code processing workload and time of the developer are also intangibly and greatly increased.
Based on the method, the applicant finds out the extended function of Webhook provided by Git through carrying out in-depth research on branch management of Git, combines a series of researches on code habits submitted by an developer, and can greatly reduce code processing nodes and shorten the time of a code merging process by calling back a code merging service background system based on Git service; meanwhile, the specific functions of the code combining service background system and the code combining realization process are specifically built.
Specifically, the method, the system, the equipment and the storage medium for processing the codes based on the Git are adopted, and the callback function based on the Git is triggered by receiving the code merging instruction; calling a service pointing address in the callback function, wherein the service pointing address points to a code merging service; confirming that the merging result returned by the service pointing address is that the merging branch is successful; and saving the branch codes to be combined. The method and the device greatly reduce the processing nodes of the code merging branches and shorten the time of the code merging flow.
In addition, the application can simultaneously correspond to a plurality of code merging instructions, and different configuration file interfaces are allocated for different code merging instructions.
When a specific code merging instruction is responded, after a source code file is read at a configuration file interface of the Git system through a main item, a plurality of branches to be merged corresponding to development requirements and destination branches corresponding to the branches to be merged are determined for each branch to be merged according to the configuration file; after the completion of the determination, a merging instruction aiming at a plurality of branches with merging and destination branches can be submitted to the Git system in response to the merging triggering operation, so that each branch to be merged and the corresponding destination branch are merged by the Git system. According to the method and the device, development branches in each modification module corresponding to development requirements can be accurately combined into the release branches in batches, so that the combining efficiency of the branch codes is further improved, and the combining results of the branch codes are convenient to check.
In order to make the technical solutions and advantages of the embodiments of the present application more apparent, the following detailed description of exemplary embodiments of the present application is given with reference to the accompanying drawings, and it is apparent that the described embodiments are only some of the embodiments of the present application and not exhaustive of all the embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
Example 1
A schematic diagram of the steps of a code processing method according to an embodiment of the present application is shown in fig. 2.
As shown in fig. 2, the code processing method in the embodiment of the present application includes the following steps:
s1: and receiving a code merging instruction, and triggering a callback function based on Git.
S2: calling a service pointing address in the callback function, wherein the service pointing address points to a code merging service;
s3: confirming that the merging result returned by the service pointing address is that the merging branch is successful; and saving the branch codes to be combined.
According to the method and the device, the callback function based on the Git service is called back, the service pointing address in the callback function points to the code merging service, so that the code processing nodes can be greatly reduced, and the time of the code merging process is shortened; meanwhile, specific functions of the code merging service and a code merging implementation process are specifically built.
A schematic diagram of the steps of a code combining service according to an embodiment of the present application is shown in fig. 3.
Specifically described, as shown in fig. 3, the service in S2 points to the code merging service pointed to by the address, and specifically includes the following service steps:
s101: acquiring source codes and code description specifications;
s102: confirming that the request format of the code description specification is correct; acquiring merging branch parameters and source branch parameters according to code description specifications;
s103: initiating a code merging branch request according to the merging branch parameter and the source branch parameter; and returns the combined result.
An exemplary diagram of steps for validating that a code description specification is in the correct format of a request in accordance with an embodiment of the present application is shown in fig. 4.
As shown in fig. 4, in some embodiments, the confirmation code description specification in S3 has a correct request format, which specifically includes:
s31: acquiring a request format of a code description specification;
s32: if the request format includes all the merging branch parameters and the source branch parameters, the request format of the service-oriented address is confirmed to be correct.
In S32, according to the code description specification, the merging branch parameter and the source branch parameter are obtained, which specifically includes: according to the request format of the code description specification, acquiring a code auditor, an object code merging branch and submitting code function description as merging branch parameters; according to the request format of the code description specification, the source code is acquired as a source branch parameter.
An exemplary diagram of steps for triggering a callback function according to an embodiment of the present application is shown in fig. 5.
As shown in fig. 5, in other preferred embodiments, when implementing S1 to receive a code merging instruction and trigger a callback function, the method specifically includes:
s11: the callback function is set by Webhook based on the Git platform. S12: webhook detects code merging instructions. S13: the code merge instruction triggers a callback function.
Meanwhile, the step S2 of calling the service pointing address in the callback function specifically comprises the following steps:
setting a URL address as a service pointing address based on a callback function; the URL address points to the code merging service; the URL address of the callback function is called.
The preferred embodiment summarizes that after calling the service-oriented address in the callback function, the method further comprises: and if the merging result returned by the confirmation service pointing address is that the merging branch fails, rejecting the code merging instruction.
A schematic flow chart of a code processing method according to an embodiment of the present application is shown in fig. 6.
As shown in fig. 6, in order to further describe the code processing method of the embodiment of the present application, the following description is made by a specific flowchart.
1) Firstly, a code combining service system is built, and a service flow for setting a code combining service background system is specifically defined.
2) Then, a URL address is set in Webhook, and this URL address may directly point to the code combining service background system.
The method comprises the steps that a web hook is a callback mechanism of Git branch management, when a user submits codes to a Git platform, the Git platform detects and senses the user submitted codes, and before the Git platform stores the codes submitted by the user, a callback function is triggered and calls URL addresses in the web hook; the code merging service background system pointed by the URL address specifically performs code merging operation and returns a merging result.
If the URL address returns a result that the combination is successful, the Git platform stores codes submitted by users; if the URL address returns a result of merging failure, the Git platform refuses codes submitted by the user.
Specifically, when the code combining service background system performs code combining, the request format of the code description specification needs to be checked first, if the code description specification is correct, that is, the combining parameters are filled or described according to a certain sequence, a code combining request is generated and a combining success result is returned. If the code description specification is wrong, i.e. the merging parameters are not filled or described in a certain order, the code merging request cannot be generated and a merging failure result is returned.
3) And finally, when the codes are actually submitted, the description contents of the codes are filled according to a certain code description specification, and the codes are clicked to be combined.
The code description specifications comprise specifications of function descriptions of code auditors, target merging branch descriptions and current submitted codes in sequence.
In summary, the general flow of the code merging and branching process in the present application is as follows: the user submits the codes, the Git platform detects the merging branch instruction, triggers the callback function to call the URL address of the Webhook, and stores the codes submitted by the user after the merging is successful.
In summary, the application combines a series of researches on code habits submitted by developers based on the extended functions of Webhook provided by Git, and can greatly reduce code processing nodes and shorten the time of a code merging flow by calling back a code merging service background system based on Git service; meanwhile, the specific functions of the code combining service background system and the code combining realization process are specifically built.
In addition, the application can simultaneously correspond to a plurality of code merging instructions, and different configuration file interfaces are allocated for different code merging instructions.
When a specific code merging instruction is responded, after a source code file is read at a configuration file interface of the Git system through a main item, a plurality of branches to be merged corresponding to development requirements and destination branches corresponding to the branches to be merged are determined for each branch to be merged according to the configuration file; after the completion of the determination, a merging instruction aiming at a plurality of branches with merging and destination branches can be submitted to the Git system in response to the merging triggering operation, so that each branch to be merged and the corresponding destination branch are merged by the Git system. According to the method and the device, development branches in each modification module corresponding to development requirements can be accurately combined into the release branches in batches, so that the combining efficiency of the branch codes is further improved, and the combining results of the branch codes are convenient to check.
By adopting the Git-based code processing method, a callback function based on Git is triggered by receiving a code merging instruction; calling a service pointing address in the callback function, wherein the service pointing address points to a code merging service; confirming that the merging result returned by the service pointing address is that the merging branch is successful; and saving the branch codes to be combined. The method and the device greatly reduce the processing nodes of the code merging branches and shorten the time of the code merging flow.
Example 2
The present embodiment provides a code processing system, and for details not disclosed in the code processing system of the present embodiment, please refer to the specific implementation of the code processing method of the other embodiments.
A schematic structural diagram of a code processing system according to an embodiment of the present application is shown in fig. 7.
As shown in fig. 7, the code processing system of the embodiment of the present application specifically includes an instruction acquisition unit 10, a service callback unit 20, and a code saving unit 30.
In particular, the method comprises the steps of,
instruction fetch unit 10: and the callback function based on Git is triggered by receiving the code merging instruction.
Service callback unit 20: the service-oriented address is used for calling the service-oriented address in the callback function, and the service-oriented address is oriented to the code merging service.
Code saving unit 30: the merging result returned by the service pointing address is used for confirming that the merging branch is successful; and saving the branch codes to be combined.
The code processing system of the application can greatly reduce the code processing nodes and shorten the time of the code merging flow by calling back a callback function based on the Git service, wherein the service pointing address in the callback function points to the code merging service; meanwhile, specific functions of the code merging service and a code merging implementation process are specifically built.
Specifically, the code processing system of the present application further includes a code merging unit, where the service pointing address in the service callback unit 20 points to a code merging service of the code merging unit, and the code merging service of the code merging unit specifically includes: acquiring source codes and code description specifications; confirming that the request format of the code description specification is correct; acquiring merging branch parameters and source branch parameters according to code description specifications; initiating a code merging branch request according to the merging branch parameter and the source branch parameter; and returns the combined result.
Specifically, the code saving unit 30 confirms that the request format of the code description specification is correct, specifically includes: acquiring a request format of a code description specification; if the request format includes all the merging branch parameters and the source branch parameters, the request format of the service-oriented address is confirmed to be correct.
The method comprises the steps of obtaining merging branch parameters and source branch parameters according to code description specifications, wherein the merging branch parameters and the source branch parameters comprise: according to the request format of the code description specification, acquiring a code auditor, an object code merging branch and submitting code function description as merging branch parameters; according to the request format of the code description specification, the source code is acquired as a source branch parameter.
Specifically, when the instruction obtaining unit 10 receives the code merging instruction and triggers the callback function, the method specifically includes: setting a callback function based on Webhook of the Git platform; webhook detects code merging instructions; the code merge instruction triggers a callback function.
Meanwhile, calling the service pointing address in the callback function specifically comprises the following steps: setting a URL address as a service pointing address based on a callback function; the URL address points to the code merging service; the URL address of the callback function is called.
The preferred embodiment summarizes, after calling the service pointing address in the callback function, the method further comprises rejecting the code merging instruction if the merging result returned by the service pointing address is confirmed to be merging branch failure.
In summary, the application combines a series of researches on code habits submitted by developers based on the extended functions of Webhook provided by Git, and can greatly reduce code processing nodes and shorten the time of a code merging flow by calling back a code merging service background system based on Git service; meanwhile, the specific functions of the code combining service background system and the code combining realization process are specifically built.
Therefore, with the present application, the Git-based code processing system receives the code merging instruction through the instruction obtaining unit 10, and triggers the Git-based callback function; the service callback unit 20 calls a service pointing address in the callback function, and the service pointing address points to the code merging service; the code saving unit 30 confirms that the merging result returned by the service-oriented address is that the merging branch is successful; and saving the branch codes to be combined. The method and the device greatly reduce the processing nodes of the code merging branches and shorten the time of the code merging flow.
Example 3
The present embodiment provides a code processing apparatus, and for details not disclosed in the code processing apparatus of the present embodiment, reference is made to specific implementation contents of the code processing method or system in other embodiments.
A schematic structural diagram of a code processing apparatus 400 according to an embodiment of the present application is shown in fig. 8.
As shown in fig. 8, the code processing apparatus 400 includes:
memory 402: for storing executable instructions; and
processor 401 is operative to interface with memory 402 to execute executable instructions to perform a motion vector prediction method.
It will be appreciated by those skilled in the art that schematic diagram 8 is merely an example of code processing apparatus 400 and is not limiting of code processing apparatus 400, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., code processing apparatus 400 may also include input and output devices, network access devices, buses, etc.
The processor 401 (Central Processing Unit, CPU) may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor 401 may be any conventional processor or the like, and the processor 401 is a control center of the code processing apparatus 400, and various interfaces and lines are used to connect various portions of the entire code processing apparatus 400.
Memory 402 may be used to store computer readable instructions, and processor 401 may implement various functions of code processing apparatus 400 by executing or executing computer readable instructions or modules stored in memory 402 and invoking data stored in memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the code processing apparatus 400, or the like. In addition, the Memory 402 may include a hard disk, memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), at least one disk storage device, a Flash Memory device, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or other non-volatile/volatile storage device.
The modules integrated by the code processing apparatus 400 may be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. Based on such understanding, the present invention may implement all or part of the flow of the method of the above-described embodiments, or may be implemented by means of computer readable instructions to instruct related hardware, where the computer readable instructions may be stored in a computer readable storage medium, where the computer readable instructions, when executed by a processor, implement the steps of the method embodiments described above.
Example 4
The present embodiment provides a computer-readable storage medium having a computer program stored thereon; the computer program is executed by a processor to implement the code processing methods in other embodiments.
The method is based on the extended function of Webhook provided by Git, combines a series of researches on code habits submitted by developers, and can greatly reduce code processing nodes and shorten the time of a code merging process by calling back a code merging service background system based on Git service; meanwhile, the specific functions of the code combining service background system and the code combining realization process are specifically built.
In addition, the application can simultaneously correspond to a plurality of code merging instructions, and different configuration file interfaces are allocated for different code merging instructions.
When a specific code merging instruction is responded, after a source code file is read at a configuration file interface of the Git system through a main item, a plurality of branches to be merged corresponding to development requirements and destination branches corresponding to the branches to be merged are determined for each branch to be merged according to the configuration file; after the completion of the determination, a merging instruction aiming at a plurality of branches with merging and destination branches can be submitted to the Git system in response to the merging triggering operation, so that each branch to be merged and the corresponding destination branch are merged by the Git system. According to the method and the device, development branches in each modification module corresponding to development requirements can be accurately combined into the release branches in batches, so that the combining efficiency of the branch codes is further improved, and the combining results of the branch codes are convenient to check.
Therefore, by adopting the code processing device and the storage medium of the embodiment of the application, through the code processing method based on Git, the callback function based on Git is triggered by receiving the code merging instruction; calling a service pointing address in the callback function, wherein the service pointing address points to a code merging service; confirming that the merging result returned by the service pointing address is that the merging branch is successful; and saving the branch codes to be combined. The method and the device greatly reduce the processing nodes of the code merging branches and shorten the time of the code merging flow.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the invention. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. A Git-based code processing method, comprising:
receiving a code merging instruction, and triggering a callback function based on Git;
calling a service pointing address in the callback function, wherein the service pointing address points to a code merging service;
confirming that the merging result returned by the service pointing address is successful merging branch; and saving the branch codes to be combined.
2. The code processing method according to claim 1, wherein the code combining service specifically comprises the following service steps:
acquiring source codes and code description specifications;
confirming that the request format of the code description specification is correct; acquiring merging branch parameters and source branch parameters according to the code description specification;
initiating a code merging branch request according to the merging branch parameter and the source branch parameter; and returns the combined result.
3. The code processing method according to claim 2, wherein said confirming that the request format of the code description specification is correct specifically comprises:
acquiring a request format of the code description specification;
and if the request format comprises all the merging branch parameters and the source branch parameters, confirming that the request format of the service-oriented address is correct.
4. The code processing method according to claim 2, wherein the acquiring the merging-branch parameter and the source-branch parameter according to the code description specification specifically includes:
acquiring code auditors, target code merging branches and submitting code function descriptions as merging branch parameters according to the request format of the code description specification;
and acquiring the source code as a source branch parameter according to the request format of the code description specification.
5. The code processing method according to claim 1, wherein the receiving the code merging instruction triggers a callback function, specifically comprising:
setting a callback function based on Webhook of the Git platform;
webhook detects code merging instructions;
the code merging instruction triggers the callback function.
6. The code processing method according to claim 1, wherein the calling the service-oriented address in the callback function specifically comprises:
setting a URL address as a service pointing address based on the callback function; the URL address points to a code merging service;
and calling the URL address of the callback function.
7. The code processing method according to any one of claims 1 to 6, wherein after said calling the service-oriented address in the callback function, further comprising:
and rejecting the code merging instruction if the merging result returned by the service pointing address is the merging branch failure.
8. A Git-based code processing system, comprising:
an instruction acquisition unit: the method comprises the steps of receiving a code merging instruction, and triggering a callback function based on Git;
service callback unit: the service pointing address is used for calling the service pointing address in the callback function, and the service pointing address points to the code merging service;
code saving unit: the merging result returned by the service pointing address is confirmed to be successful merging branch; and saving the branch codes to be combined.
9. A code processing apparatus comprising:
a memory: for storing executable instructions; and
a processor for interfacing with a memory to execute executable instructions to perform the code processing method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon; computer program to be executed by a processor to implement the code processing method of any of claims 1-7.
CN202310166439.0A 2023-02-16 2023-02-16 Git-based code processing method, system, equipment and storage medium Pending CN116028064A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310166439.0A CN116028064A (en) 2023-02-16 2023-02-16 Git-based code processing method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310166439.0A CN116028064A (en) 2023-02-16 2023-02-16 Git-based code processing method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116028064A true CN116028064A (en) 2023-04-28

Family

ID=86081308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310166439.0A Pending CN116028064A (en) 2023-02-16 2023-02-16 Git-based code processing method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116028064A (en)

Similar Documents

Publication Publication Date Title
CN109951547B (en) Transaction request parallel processing method, device, equipment and medium
CN111144982B (en) Order state transition method and device, electronic equipment and storage medium
CN107436799B (en) Method and device for realizing consistency of distributed transactions
CN112783568B (en) Initialization method, device, equipment and storage medium of application program
CN110599341A (en) Transaction calling method and system
CN107861765B (en) Product configuration method, apparatus, and computer-readable storage medium
CN113296896B (en) Distributed transaction processing method, device and equipment
CN112463296B (en) Method and device for creating virtual machine
CN108346095B (en) Management and control method, device and equipment of combined system and computer readable storage medium
CN110532810B (en) Information processing method and device, electronic equipment and readable storage medium
CN116028064A (en) Git-based code processing method, system, equipment and storage medium
CN111209283A (en) Data processing method and device
CN116442214A (en) Service parallel processing method, device, equipment and medium for robot
CN112764897B (en) Task request processing method, device and system and computer readable storage medium
CN114816493A (en) Gray scale upgrading method and device for block chain service platform and electronic equipment
CN110765144B (en) Distributed heterogeneous database data processing method and device
CN112367205A (en) Processing method and scheduling system for HTTP scheduling request
CN110990278A (en) Test method and device
CN111061576A (en) Method and system for creating entity object
CN109670151A (en) File mergences method, apparatus and storage medium
CN113934476B (en) Logic calling method and device and electronic equipment
CN114021709B (en) Multi-FPGA data processing method and device, server and storage medium
CN109377177B (en) Flow processing method, device, equipment and computer readable storage medium
CN114116181B (en) Distributed data analysis task scheduling system and method
CN109857450B (en) Verification service arrangement method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination