A GIT branch archiving method, device, equipment and storage medium

By realizing automatic archiving and management of GIT branch code on the robot process automation platform, the problem of cumbersome manual archiving process in large software projects is solved, and development efficiency is improved and human resources is saved.

CN115390898BActive Publication Date: 2025-06-06PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211012806.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2025-06-06
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

In large-scale software projects, manual GIT branch archiving process is cumbersome, taking up a lot of development time, resulting in inefficiency.

Method used

Through the robot process automation platform, we obtain the address information of the requirements management platform and login user information, find the branch code version information that needs to be archived, generate archive reports, and generate target codes based on the report, and automatically archive branch codes on the GIT platform.

Benefits of technology

It realizes automatic archiving management of branch codes on GIT platform, improves development efficiency, saves human resources, and ensures the accuracy of archiving management of branch codes through the sending of failed archiving reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115390898B_ABST
    Figure CN115390898B_ABST
Patent Text Reader

Abstract

The present disclosure provides a GIT branch archiving method, device, equipment and storage medium, which is applied to a robotic process automation platform, including: obtaining the address information of a demand management platform and the user information for logging into the demand management platform, and the password information corresponding to the user information; based on the above information, logging into the demand management platform to find the version information of multiple branch codes that need to be archived; generating an archiving report based on the version information of multiple branch codes that need to be archived; generating a target code for archiving for each branch code based on the archiving method corresponding to each branch code in the archiving report; executing the target code generated for each branch code, and archiving each branch code on the GIT platform. In this way, the branch code of the GIT platform can be automatically archived, which improves development efficiency and saves human resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a GIT branch archiving method, device, equipment and storage medium. Background Art

[0002] With the development of computer technology, software has become an indispensable tool for people's life, entertainment, work and travel. Developers need to put the code in the version control system GIT to realize version management of software projects.

[0003] However, when writing software projects, developers set multiple requirements for each version, create different GIT branches according to each requirement, and each branch needs to be archived after production. For large software projects, each version involves multiple branches, and the manual archiving process is cumbersome, taking up a lot of development time and low work efficiency. Summary of the invention

[0004] The disclosed embodiments at least provide a GIT branch archiving method, device, equipment and storage medium, so that the branch code of the GIT platform can be automatically archived and managed, thereby improving development efficiency and saving human resources.

[0005] The present disclosure provides a method for archiving a GIT branch, which is applied to a robotic process automation platform. The method includes:

[0006] Acquire address information of a demand management platform, user information for logging into the demand management platform, and password information corresponding to the user information;

[0007] According to the user information of the demand management platform and the password information corresponding to the user information, log in to the demand management platform to search for version information of multiple branch codes that need to be archived;

[0008] Generate an archive report according to the version information of the multiple branch codes to be archived as needed; the archive report records the version information of the multiple branch codes and the archive methods corresponding to the multiple branch codes; the archive methods include deletion method, merging method, and backup method;

[0009] According to the archiving method corresponding to each branch code in the archiving report, generating a target code for archiving for each branch code;

[0010] Execute the target code generated for each branch code, and archive each branch code on the GIT platform.

[0011] In an optional implementation manner, the step of logging into the demand management platform and searching for version information of multiple branch codes that need to be archived based on user information of the demand management platform and password information corresponding to the user information includes:

[0012] Get the ID information of the target subsystem;

[0013] Log in to the demand management platform by calling a login command according to the user information of the demand management platform and the password information corresponding to the user information;

[0014] According to the ID information of the target subsystem, the version information of the multiple branch codes that need to be archived corresponding to the target subsystem is searched from the version information search interface of the demand management platform.

[0015] In an optional implementation manner, if the archiving mode is a deletion mode, then generating a target code for archiving for each branch code according to the archiving mode corresponding to each branch code in the archiving report includes:

[0016] Adding a name prefix to each of the branch codes corresponding to the deletion method, and generating an archived branch code name corresponding to each of the branch codes;

[0017] The deletion commands are concatenated for the archived branch code names corresponding to the branch codes, and deletion codes are generated for the branch codes.

[0018] In an optional implementation manner, when the GIT platform archives each of the branch codes, the method further includes:

[0019] If it is detected that any of the branch codes fails to be archived, the branch code that fails to be archived is added to the archive failure report.

[0020] In an optional implementation manner, the version information of the branch code includes information of the person in charge. If it is detected that any of the branch codes fails to be archived, after adding the branch code that fails to be archived to the archive failure report, the method further includes:

[0021] According to the person-in-charge information corresponding to the branch code that failed to be archived, an archive failure report is sent to the person-in-charge through an email component.

[0022] The present disclosure also provides a GIT branch archiving device, the device comprising:

[0023] An acquisition module, used to acquire address information of a demand management platform, user information for logging into the demand management platform, and password information corresponding to the user information;

[0024] A search module, used to log in to the demand management platform and search for version information of multiple branch codes that need to be archived according to user information of the demand management platform and password information corresponding to the user information;

[0025] An archiving report generation module is used to generate an archiving report according to the version information of multiple branch codes to be archived as needed; the archiving report records the version information of multiple branch codes and the archiving methods corresponding to the multiple branch codes; the archiving methods include deletion method, merging method, and backup method;

[0026] A target code generation module, used for generating a target code for archiving for each branch code according to the archiving mode corresponding to each branch code in the archiving report;

[0027] The archiving module is used to execute the target code generated for each branch code and archive each branch code on the GIT platform.

[0028] In an optional implementation manner, the search module is specifically used to:

[0029] Get the ID information of the target subsystem;

[0030] Log in to the demand management platform by calling a login command according to the user information of the demand management platform and the password information corresponding to the user information;

[0031] According to the ID information of the target subsystem, the version information of the multiple branch codes that need to be archived corresponding to the target subsystem is searched from the version information search interface of the demand management platform.

[0032] In an optional implementation manner, if the archiving mode is a deletion mode, the target code generation module is specifically used to:

[0033] Adding a name prefix to each of the branch codes corresponding to the deletion method, and generating an archived branch code name corresponding to each of the branch codes;

[0034] The deletion commands are concatenated for the archived branch code names corresponding to the branch codes, and deletion codes are generated for the branch codes.

[0035] In an optional implementation manner, the device further includes an archiving failure report generating module, which is used to:

[0036] If it is detected that any of the branch codes fails to be archived, the branch code that fails to be archived is added to the archive failure report.

[0037] In an optional implementation manner, the method device further includes a sending module, configured to:

[0038] According to the person-in-charge information corresponding to the branch code that failed to be archived, an archive failure report is sent to the person-in-charge through an email component.

[0039] An embodiment of the present disclosure also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps in the above-mentioned implementation are performed.

[0040] The embodiment of the present disclosure further provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned embodiment are executed.

[0041] The present disclosure provides a GIT branch archiving method, device, equipment and storage medium, which is applied to a robotic process automation platform, including: obtaining address information of a demand management platform and user information for logging into the demand management platform, and password information corresponding to the user information; logging into the demand management platform according to the user information of the demand management platform and the password information corresponding to the user information to search for version information of multiple branch codes that need to be archived; generating an archiving report according to the version information of the multiple branch codes that need to be archived; generating a target code for archiving for each branch code according to the archiving method corresponding to each branch code in the archiving report; executing the target code generated for each branch code, and archiving each branch code on the GIT platform. Compared with the prior art, which is for large software projects, each version involves multiple branches, the manual archiving process is cumbersome, takes up a lot of development time, and has low work efficiency, it can automatically realize archiving management of branch codes on the GIT platform, improve development efficiency, and save human resources.

[0042] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0044] Figure 1 A flowchart of a GIT branch archiving method provided by an embodiment of the present disclosure is shown;

[0045] Figure 2 A flowchart of another GIT branch archiving method provided by an embodiment of the present disclosure is shown;

[0046] Figure 3 A schematic diagram showing version information of multiple branch codes that need to be archived provided by an embodiment of the present disclosure;

[0047] Figure 4 One of the schematic diagrams of a GIT branch archiving device provided by an embodiment of the present disclosure is shown;

[0048] Figure 5 A second schematic diagram of a GIT branch archiving device provided by an embodiment of the present disclosure is shown;

[0049] Figure 6 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0051] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0052] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0053] Research has found that with the development of computer technology, software has become an indispensable tool for people's life, entertainment, work, and travel. Developers need to put the code in the version control system GIT to achieve version management of software projects.

[0054] However, when writing software projects, developers set multiple requirements for each version, create different GIT branches according to each requirement, and each branch needs to be archived after production. For large software projects, each version involves multiple branches, and the manual archiving process is cumbersome, taking up a lot of development time and low work efficiency.

[0055] Based on the above research, the present disclosure provides a GIT branch archiving method, device, equipment and storage medium, which is applied to a robotic process automation platform, including: obtaining the address information of a demand management platform and the user information for logging into the demand management platform, and the password information corresponding to the user information; logging into the demand management platform to search for the version information of multiple branch codes that need to be archived according to the user information of the demand management platform and the password information corresponding to the user information; generating an archiving report according to the version information of the multiple branch codes that need to be archived; generating a target code for archiving for each branch code according to the archiving method corresponding to each branch code in the archiving report; executing the target code generated for each branch code, and archiving each branch code on the GIT platform. In this way, the branch code of the GIT platform can be automatically archived, which improves development efficiency and saves human resources.

[0056] To facilitate understanding of this embodiment, a GIT branch archiving method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the GIT branch archiving method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a computing device, etc. In some possible implementations, the GIT branch archiving method can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0057] See also Figure 1 FIG. 1 is a flowchart of a GIT branch archiving method provided by an embodiment of the present disclosure, wherein the method includes steps S101 to S105, wherein:

[0058] S101: Acquire address information of a demand management platform, user information for logging into the demand management platform, and password information corresponding to the user information.

[0059] Here, the demand management platform can generate a branch code number for the GIT platform based on the business needs of the subsystem. First, obtain the address information of the demand management platform, such as the URL address, and the user information that can log in to the demand management platform, such as the user name, and the password information corresponding to the user information, so that the demand management platform can be automatically logged in.

[0060] Among them, the demand management platform can be selected according to actual needs. There is no specific limitation here. The financial demand management platform Starlink is preferred.

[0061] The required platform address information may include URL address, domain name address, IP address, etc.

[0062] Among them, the user information of the demand management platform may include user name, user mobile phone number, user ID number, etc.

[0063] S102: Log in to the demand management platform according to the user information of the demand management platform and the password information corresponding to the user information to search for version information of multiple branch codes that need to be archived.

[0064] Here, according to the address information of the demand management platform, find the login interface of the demand management platform, enter the acquired user information of the demand management platform and the password information corresponding to the user information into the login interface of the demand management platform, automatically log in to the demand management platform, and select the version information search interface in the version management interface of the demand management platform to find the version information of the branch code that needs to be archived corresponding to the subsystem.

[0065] Among them, according to the user information of the demand management platform and the password information corresponding to the user information, logging into the demand management platform to search for version information of multiple branch codes that need to be archived can realize automatic login to the demand management platform based on a tool with robotic process automation (RPA) technology.

[0066] Among them, RPA tools can be selected according to actual needs, and no specific restrictions are made here.

[0067] Further, in an optional implementation manner, the step of logging into the demand management platform to search for version information of multiple branch codes that need to be archived based on user information of the demand management platform and password information corresponding to the user information includes:

[0068] Get the ID information of the target subsystem;

[0069] Log in to the demand management platform by calling a login command according to the user information of the demand management platform and the password information corresponding to the user information;

[0070] According to the ID information of the target subsystem, the version information of the multiple branch codes that need to be archived corresponding to the target subsystem is searched from the version information search interface of the demand management platform.

[0071] Here, first, obtain the ID information of the target subsystem, and then find the login interface of the demand management platform according to the address information of the demand management platform, enter the obtained user information of the demand management platform and the password information corresponding to the user information into the login interface of the demand management platform, automatically log in to the demand management platform by calling the login command, and select the version information search interface in the version management interface of the demand management platform, automatically enter the ID information of the target subsystem, and filter out the version information of multiple branch codes that need to be archived corresponding to the target subsystem in the version information search interface, that is, the information corresponding to the target subsystem that has been put into production and displayed on the demand management platform.

[0072] Among them, each branch code corresponds to multiple story branches. Therefore, the version information of the branch code may include: serial number, story ID, story name, story status, person in charge information, etc.

[0073] For example, the sequence number is 1, the story ID is CC251-2271GIT, the story name is error interface upgrade, the story status is smoke test, and the story developer is A.

[0074] Further, in an optional implementation, the ID information of the target subsystem is obtained according to the following steps: obtaining target information of the target subsystem;

[0075] The ID information of the target subsystem is filtered out from the target information of the target subsystem.

[0076] Here, the target information of the target subsystem is obtained, and the ID information of the target subsystem is filtered out from the target information of the target subsystem using a filtering function.

[0077] The target information of the target subsystem may include ID information, version number, system English code, production time, etc.

[0078] S103: Generate an archive report according to the version information of the multiple branch codes that need to be archived.

[0079] Here, according to the version information of the multiple branch codes that need to be archived and the preset archiving method for the multiple branch codes, statistics are collected on the multiple branch codes to generate an archiving report.

[0080] The archive report records the version information of multiple branch codes and the archive methods corresponding to the multiple branch codes; the archive methods include deletion method, merging method and backup method.

[0081] S104: According to the archiving method corresponding to each branch code in the archiving report, generate a target code for archiving for each branch code.

[0082] Here, in an optional implementation manner, after generating a target code for archiving for each branch code according to the archiving mode corresponding to each branch code in the archiving report, the method further includes:

[0083] Generate query codes for viewing and recording archive status.

[0084] The archiving status may include: an archiving status, and the archiving status may include a success status and a failure status, wherein each of the archiving statuses corresponds to a scene information.

[0085] In an optional implementation manner, after generating the viewing and recording code for viewing and recording the archiving situation, the method further includes:

[0086] The query code is added to the target code to obtain the target code with viewing and recording archiving conditions.

[0087] Here, when generating the target code, multiple command codes can be combined and then executed for the combined command code, which facilitates improving the efficiency of branch code archiving.

[0088] Further, in an optional implementation manner, if the archiving mode is a deletion mode, then generating a target code for archiving for each branch code according to the archiving mode corresponding to each branch code in the archiving report includes:

[0089] Adding a name prefix to each of the branch codes corresponding to the deletion method, and generating an archived branch code name corresponding to each of the branch codes;

[0090] The deletion commands are concatenated for the archived branch code names corresponding to the branch codes, and deletion codes are generated for the branch codes.

[0091] For example, the branch name is paces-dispute-3.7.1_20220707. Delete the CC251-2271 GIT story branch information. Step 1: Concatenate the story branch GIT branch name, add the prefix Feature to cc251 to form the story branch name Feature_CC251-2271; Step 2: Concatenate the command to delete the remote story branch, git push dispute–d remoteFeature_CC251-2271; Step 3: Check the deleted story branch information git branch–a to record the scene information of successful and failed deletion.

[0092] Further, in an optional implementation manner, if the archiving method is a merging method, then generating a target code for archiving for each branch code according to the archiving method corresponding to each branch code in the archiving report includes:

[0093] A merge command is generated for each archived branch code name corresponding to each branch code, and a merge code is generated for each branch code.

[0094] For example, the branch name is paces-dispute-3.7.1_20220707. The splicing command is gitmerge paces-dispute-3.7.1_20220707master; git push master, which merges the branch into the trunk master.

[0095] Further, in an optional implementation manner, if the archiving method is a backup method, then generating a target code for archiving for each branch code according to the archiving method corresponding to each branch code in the archiving report includes:

[0096] The backup commands are concatenated for the archived branch code names corresponding to the branch codes, and backup codes are generated for the branch codes.

[0097] For example, the branch name is paces-dispute-3.7.1_20220707, and the backup commands are spliced ​​to obtain gittag-a paces-dispute-3.7.1_20220707-m paces-dispute-3.7.1_20220707_tag; gitpush paces-dispute-3.7.1_20220707_tag to back up the branch code.

[0098] S105: Execute the target code generated for each branch code, and archive each branch code on the GIT platform.

[0099] Here, when the target code does not have a lookup code, the target code generated for each story branch in each branch code is executed by the RPA tool, and each story branch in each branch code is archived on the GIT platform. When the target code has a lookup code, the target code generated for each story branch in each branch code is executed by the RPA tool, and each story branch in each branch code is archived on the GIT platform, and the archive status is checked and recorded.

[0100] For example, if the target code contains a query code, the branch name is paces-dispute-3.7.1_20220707, and the CC251-2271 GIT story branch information is deleted. The first step is to concatenate the story branch GIT branch name, add the prefix Feature to cc251, and form the story branch name Feature_CC251-2271; the second step is to concatenate the remote story branch deletion command, git push dispute–d remote Feature_CC251-2271; the third step is to count and view the deleted story branch information git branch–a to record the deletion success and failure scenario information. After the command assembly is completed, the deletion command is automatically called through RPA, and the deletion success and failure scenario information is recorded.

[0101] The GIT branch archiving method disclosed in this embodiment is applied to a robotic process automation platform through the method, including: obtaining the address information of a demand management platform and the user information for logging into the demand management platform and the password information corresponding to the user information; logging into the demand management platform to search for the version information of multiple branch codes that need to be archived according to the user information of the demand management platform and the password information corresponding to the user information; generating an archiving report according to the version information of the multiple branch codes that need to be archived; generating a target code for archiving for each branch code according to the archiving method corresponding to each branch code in the archiving report; executing the target code generated for each branch code, and archiving each branch code on the GIT platform. In this way, the branch code of the GIT platform can be automatically archived, which improves development efficiency and saves human resources.

[0102] See also Figure 2 FIG. 2 is a flowchart of another GIT branch archiving method provided by an embodiment of the present disclosure, wherein the method includes steps S201 to S207, wherein:

[0103] S201: Acquire address information of a demand management platform, user information for logging into the demand management platform, and password information corresponding to the user information.

[0104] S202: Log in to the demand management platform according to the user information of the demand management platform and the password information corresponding to the user information to search for version information of multiple branch codes that need to be archived.

[0105] S203: Generate an archive report according to the version information of the multiple branch codes that need to be archived.

[0106] S204: Generate a target code for archiving for each branch code according to the archiving mode corresponding to each branch code in the archiving report.

[0107] S205: Execute the target code generated for each branch code, and archive each branch code on the GIT platform.

[0108] S206: If it is detected that any of the branch codes fails to be archived, the branch code that fails to be archived is added to the archive failure report.

[0109] Here, a detection function is used to detect the archiving status of each story branch in each branch code. If it is detected that any story branch in any branch code fails to be archived, the story branch in the branch code that fails to be archived is added to the archiving failure report.

[0110] S207: According to the person-in-charge information corresponding to the branch code that failed to be archived, a filing failure report is sent to the person-in-charge through an email component.

[0111] Here, since each branch code corresponds to multiple story branches, and each story branch corresponds to a person in charge, the email component is called through the RPA tool to send an archiving failure report to the person in charge.

[0112] The person in charge information may include: name, phone number, email address, etc.

[0113] Among them, the description of step S201 to step S205 can refer to the description of step S101 to step S105, and can achieve the same technical effects and solve the same technical problems, so they are not repeated here.

[0114] See also Figure 3 , which is a schematic diagram of version information of multiple branch codes that need to be archived provided by an embodiment of the present disclosure.

[0115] This application first obtains the address information of the demand management platform and the user information for logging into the demand management platform, and the password information corresponding to the user information. According to the obtained address information of the demand management platform and the user information for logging into the demand management platform, and the password information corresponding to the user information, the demand management platform is logged in through the RPA tool, and the version information search interface of the demand management platform is used to search for the version information of multiple branch codes that need to be archived corresponding to the target subsystem according to the ID information of the obtained target subsystem. Since each branch code corresponds to multiple story branches, the following is obtained: Figure 3 The version information of each story branch is shown. According to the version information of each story branch in each branch code, an archiving report is generated, and a target code for archiving is generated for each story branch in each branch code. The target code can be executed to realize the archiving of each story branch and the recording of the archiving status. When any story branch fails to be archived, the story branch that failed to be archived is added to the archiving failure report, and the archiving failure report is sent to the person in charge of the story branch.

[0116] The archiving method of GIT branch disclosed in this embodiment obtains the address information of the demand management platform and the user information for logging into the demand management platform and the password information corresponding to the user information; logs into the demand management platform according to the user information of the demand management platform and the password information corresponding to the user information to search for the version information of multiple branch codes that need to be archived; generates an archiving report according to the version information of multiple branch codes that need to be archived; generates a target code for archiving for each branch code according to the archiving method corresponding to each branch code in the archiving report; executes the target code generated for each branch code, and archives each branch code on the GIT platform; if it is detected that any branch code fails to be archived, the branch code that fails to be archived is added to the archiving failure report; according to the person in charge information corresponding to the branch code that fails to be archived, the archiving failure report is sent to the person in charge through the mail component. In this way, the branch code of the GIT platform can be automatically archived, the development efficiency is improved, and human resources are saved. It can also realize the monitoring of the branch code that fails to be archived, and send the archiving failure report to the person in charge of the branch code, so as to manually manage the branch code that fails to be archived, and further improve the accuracy of the archiving management of the branch code.

[0117] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0118] Based on the same inventive concept, an archiving device for a GIT branch corresponding to the archiving method for a GIT branch is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned archiving method for a GIT branch in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0119] See also Figures 4 to 5 , Figure 4 This is one of the schematic diagrams of a GIT branch archiving device provided in an embodiment of the present disclosure, Figure 5 The second schematic diagram of archiving a GIT branch provided by the embodiment of the present disclosure. Figure 4 As shown in , the GIT branch archiving device 400 provided by the embodiment of the present disclosure includes:

[0120] The acquisition module 410 is used to acquire the address information of the demand management platform, the user information for logging into the demand management platform, and the password information corresponding to the user information;

[0121] A search module 420 is used to log in to the demand management platform and search for version information of multiple branch codes that need to be archived according to user information of the demand management platform and password information corresponding to the user information;

[0122] The archiving report generation module 430 is used to generate an archiving report according to the version information of the multiple branch codes to be archived as needed; the archiving report records the version information of the multiple branch codes and the archiving methods corresponding to the multiple branch codes; the archiving methods include deletion method, merging method, and backup method;

[0123] The target code generating module 440 is used to generate a target code for archiving for each branch code according to the archiving mode corresponding to each branch code in the archiving report;

[0124] The archiving module is used to execute the target code generated for each branch code and archive each branch code on the GIT platform.

[0125] In an optional implementation manner, the search module 420 is specifically configured to:

[0126] Get the ID information of the target subsystem;

[0127] Log in to the demand management platform by calling a login command according to the user information of the demand management platform and the password information corresponding to the user information;

[0128] According to the ID information of the target subsystem, the version information of the multiple branch codes that need to be archived corresponding to the target subsystem is searched from the version information search interface of the demand management platform.

[0129] In an optional implementation manner, if the archiving mode is a deletion mode, the target code generation module 440 is specifically used to:

[0130] Adding a name prefix to each of the branch codes corresponding to the deletion method, and generating an archived branch code name corresponding to each of the branch codes;

[0131] The deletion commands are concatenated for the archived branch code names corresponding to the branch codes, and deletion codes are generated for the branch codes.

[0132] In an optional implementation, the device further includes an archiving failure report generating module 450, which is used to:

[0133] If it is detected that any of the branch codes fails to be archived, the branch code that fails to be archived is added to the archive failure report.

[0134] In an optional implementation manner, the method device further includes a sending module 460, which is used to:

[0135] According to the person-in-charge information corresponding to the branch code that failed to be archived, an archive failure report is sent to the person-in-charge through an email component.

[0136] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0137] The GIT branch archiving device disclosed in the embodiment of the present disclosure is used to obtain the address information of the demand management platform and the user information for logging into the demand management platform and the password information corresponding to the user information through an acquisition module; a search module is used to log into the demand management platform according to the user information of the demand management platform and the password information corresponding to the user information to search for the version information of multiple branch codes that need to be archived; an archive report generation module is used to generate an archive report according to the version information of multiple branch codes that need to be archived; the archive report records the version information of multiple branch codes and the archiving methods corresponding to the multiple branch codes; the archiving methods include deletion methods, merging methods, and backup methods; a target code generation module is used to generate a target code for archiving for each branch code according to the archiving method corresponding to each branch code in the archive report; an archive module is used to execute the target code generated for each branch code, and archive each branch code on the GIT platform. In this way, the branch code of the GIT platform can be automatically archived and managed, which improves development efficiency and saves human resources.

[0138] An embodiment of the present application also provides an archiving system for GIT branches, the system comprising a demand management platform, an RPA tool, and a GIT platform; the RPA tool logs in to the demand management platform based on the acquired address information of the demand management platform, user information for logging in to the demand management platform, and password information corresponding to the user information, and searches for version information of multiple branch codes that need to be archived on the demand management platform; the RPA tool controls the demand management platform to generate an archiving report based on the version information of multiple branch codes that need to be archived; the RPA tool generates a target code for archiving for each branch code based on the archiving method corresponding to each branch code in the archiving report; the RPA tool executes the target code generated for each branch code on the GIT platform, and archives each branch code.

[0139] Based on the same technical concept, the embodiment of the present application also provides an electronic device. The embodiment of the present disclosure also provides an electronic device 600, such as Figure 6 FIG. 6 is a schematic diagram of the structure of an electronic device 600 provided in an embodiment of the present disclosure, including:

[0140] Processor 610, memory 620, and bus 630; memory 620 is used to store execution instructions, including internal memory 621 and external memory 622; the internal memory 621 here is also called internal memory, which is used to temporarily store the calculation data in the processor 610, as well as the data exchanged with the external memory 622 such as the hard disk. The processor 610 exchanges data with the external memory 622 through the internal memory 621. When the electronic device 600 is running, the processor 610 communicates with the memory 620 through the bus 630, so that the processor 610 can execute the steps of the GIT branch archiving method shown in the above method embodiment.

[0141] The present disclosure also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the GIT branch archiving method described in the above method embodiment are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.

[0142] The embodiment of the present disclosure also provides a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the GIT branch archiving method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0143] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0144] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working processes of the above-described devices, storage media and apparatuses can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed devices, storage media, apparatuses and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0145] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0146] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0147] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0148] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A GIT branch archiving method, It is characterized in that Applied in a robotic process automation platform, the method includes: Acquire address information of a demand management platform, user information for logging into the demand management platform, and password information corresponding to the user information; According to the user information of the demand management platform and the password information corresponding to the user information, log in to the demand management platform to search for version information of multiple branch codes that need to be archived; Generate an archive report according to the version information of the multiple branch codes to be archived as needed; the archive report records the version information of the multiple branch codes and the archive methods corresponding to the multiple branch codes; the archive methods include deletion method, merging method, and backup method; According to the archiving method corresponding to each branch code in the archiving report, generating a target code for archiving for each branch code; Execute the target code generated for each branch code, and archive each branch code on the GIT platform; If the archiving mode is a deletion mode, then generating a target code for archiving for each branch code according to the archiving mode corresponding to each branch code in the archiving report includes: Adding a name prefix to each of the branch codes corresponding to the deletion method, and generating an archived branch code name corresponding to each of the branch codes; The deletion commands are concatenated for the archived branch code names corresponding to the branch codes, and deletion codes are generated for the branch codes.

2. The method according to claim 1, It is characterized in that The step of logging into the demand management platform to search for version information of multiple branch codes that need to be archived according to user information of the demand management platform and password information corresponding to the user information includes: Get the ID information of the target subsystem; Log in to the demand management platform by calling a login command according to the user information of the demand management platform and the password information corresponding to the user information; According to the ID information of the target subsystem, the version information of the multiple branch codes that need to be archived corresponding to the target subsystem is searched from the version information search interface of the demand management platform.

3. The method according to claim 1, It is characterized in that When the GIT platform archives each branch code, the method further includes: If it is detected that any of the branch codes fails to be archived, the branch code that fails to be archived is added to the archive failure report.

4. The method according to claim 3, It is characterized in that The version information of the branch code includes information of the person in charge. If it is detected that any of the branch codes fails to be archived, after adding the branch code that fails to be archived to an archive failure report, the method further includes: According to the person-in-charge information corresponding to the branch code that failed to be archived, an archive failure report is sent to the person-in-charge through an email component.

5. An archiving device for GIT branches, It is characterized in that The device comprises: An acquisition module, used to acquire address information of a demand management platform, user information for logging into the demand management platform, and password information corresponding to the user information; A search module, used to log in to the demand management platform and search for version information of multiple branch codes that need to be archived according to user information of the demand management platform and password information corresponding to the user information; An archiving report generation module is used to generate an archiving report according to the version information of multiple branch codes to be archived as needed; the archiving report records the version information of multiple branch codes and the archiving methods corresponding to the multiple branch codes; the archiving methods include deletion method, merging method, and backup method; A target code generation module, configured to generate a target code for archiving for each branch code according to the archiving mode corresponding to each branch code in the archiving report; An archiving module, used for executing the target code generated for each branch code, and archiving each branch code on the GIT platform; If the archiving mode is the deletion mode, the target code generation module is specifically used to: Adding a name prefix to each of the branch codes corresponding to the deletion method, and generating an archived branch code name corresponding to each of the branch codes; The deletion commands are concatenated for the archived branch code names corresponding to the branch codes, and deletion codes are generated for the branch codes.

6. The device according to claim 5, It is characterized in that The search module is specifically used for: Get the ID information of the target subsystem; Log in to the demand management platform by calling a login command according to the user information of the demand management platform and the password information corresponding to the user information; According to the ID information of the target subsystem, the version information of the multiple branch codes that need to be archived corresponding to the target subsystem is searched from the version information search interface of the demand management platform.

7. An electronic device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the GIT branch archiving method as described in any one of claims 1 to 4 are performed.

8. A computer storage medium, It is characterized in that The computer storage medium stores a computer program, which, when executed by a processor, executes the steps of the GIT branch archiving method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Software version management system and method

    CN105893026A

  • Method and device for pulling CBS flow list by RPA

    CN113486046A