CN115756575A - Submission record acquisition method, device, equipment and storage medium - Google Patents

Submission record acquisition method, device, equipment and storage medium Download PDF

Info

Publication number
CN115756575A
CN115756575A CN202210527813.0A CN202210527813A CN115756575A CN 115756575 A CN115756575 A CN 115756575A CN 202210527813 A CN202210527813 A CN 202210527813A CN 115756575 A CN115756575 A CN 115756575A
Authority
CN
China
Prior art keywords
target
code library
node
submission
name
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
CN202210527813.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.)
Huizhou Desay SV Automotive Co Ltd
Original Assignee
Huizhou Desay SV Automotive 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 Huizhou Desay SV Automotive Co Ltd filed Critical Huizhou Desay SV Automotive Co Ltd
Priority to CN202210527813.0A priority Critical patent/CN115756575A/en
Publication of CN115756575A publication Critical patent/CN115756575A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a submission record acquisition method, a submission record acquisition device, a submission record acquisition equipment and a submission record acquisition storage medium. The method comprises the following steps: after receiving a submitted record acquisition request, constructing a target tree according to a first manifest file, the submitted record acquisition request comprising: a first manifest file; analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, wherein the target dictionary comprises: at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library; the target dictionary is inquired to obtain the submission records corresponding to the branch names of each code base.

Description

Submission record acquisition method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a storage medium for acquiring a submitted record.
Background
A project that uses a code management tool to perform code management usually has a main line branch, that is, each software release is integrated based on the latest state of the main line branch, and in order to avoid the influence of the modification of a development engineer on the main line branch as much as possible, the modification of the development engineer needs to be subjected to code review if the modification of the development engineer needs to be submitted to the main line branch. Therefore, a merge request function is introduced, namely when a development engineer needs to submit modifications on the individual branch to the main line branch, a merge request needs to be submitted, the individual modification points are described in detail in the merge request, and related personnel are notified to carry out audit merging.
However, the code management tool does not provide an interface which can be directly derived from a webpage end for the merge request merged into the main line branch, so that it is troublesome when all the submission records merged onto the project main line branch within a certain period of time need to be summarized, especially for some projects of a code warehouse which relates to a plurality of code management tools, if the submission records need to be summarized, the submission records need to be individually identified and copied into the code warehouse of the code association tool. The submitted records cannot be exported at one time, errors may exist in the method for manually identifying, copying and summarizing, time is extremely consumed, and working efficiency is affected.
Disclosure of Invention
The embodiment of the invention provides a submission record acquiring method, a submission record acquiring device, submission record acquiring equipment and a storage medium, which are used for solving the problems that the submission records cannot be exported at one time because the submission records are identified and copied one by one in a code warehouse of a code association tool, and the method for manually identifying, copying and summarizing the submission records possibly has errors, consumes time extremely and influences the working efficiency, so that the working efficiency can be greatly improved, and the errors caused by manual summarization are effectively avoided.
According to an aspect of the present invention, there is provided a commit record acquiring method, including:
after receiving a submitted record acquisition request, constructing a target tree according to a first manifest file, the submitted record acquisition request comprising: a first manifest file;
analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, wherein the target dictionary comprises: at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library;
and querying the target dictionary to obtain a submission record corresponding to the branch name of each code base.
According to another aspect of the present invention, there is provided a commit record acquiring apparatus including:
a target tree construction module, configured to construct a target tree according to a first manifest file after receiving a submitted record acquisition request, where the submitted record acquisition request includes: a first manifest file;
a target dictionary determination module, configured to analyze each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, where the target dictionary includes: at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library;
and the submitted record acquisition module is used for inquiring the target dictionary to obtain the submitted records corresponding to the branch names of each code library.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform a commit record retrieval method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the commit record retrieving method according to any one of the embodiments of the present invention when executed.
According to the embodiment of the invention, after receiving a submitted record acquisition request, a target tree is constructed according to a first list file, wherein the submitted record acquisition request comprises: a first manifest file; analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, wherein the target dictionary comprises: at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library; the target dictionary is inquired to obtain the submission records corresponding to the branch names of each code library, so that the problems that the submission records cannot be exported at one time by manually copying the submission records in the code warehouse of the code association tool one by one, and errors possibly exist and time is extremely consumed in the method of manually identifying, copying and summarizing are solved, the working efficiency can be greatly improved, and the errors caused by manual summarizing are effectively avoided.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart of a commit record acquisition method in an embodiment of the present invention;
FIG. 2 is a flow chart of MergeRequest submission record acquisition in an embodiment of the present invention;
FIG. 3 is a diagrammatic illustration of the writing of a MergeRequest submission record to an Excel table in an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a submission record obtaining apparatus in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device in the embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in other sequences than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a submitted record obtaining method according to an embodiment of the present invention, where this embodiment is applicable to a case of obtaining a submitted record for a merge request, and the method may be executed by a submitted record obtaining apparatus according to an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, and as shown in fig. 1, the method specifically includes the following steps:
s110, after receiving a submitted record acquisition request, constructing a target tree according to a first manifest file, wherein the submitted record acquisition request comprises: a first manifest file.
Wherein submitting the record obtaining request may include: a first manifest file; the submitting a record request may further include: a first manifest file associated with at least one of a target time period, a target group, a start time, and an end time; for example, the submitting the record request may further include: a first manifest file and a target group; the submitting a record request may further include: a first manifest file, a target time period, and a target group; the submitting a record request may further include: first manifest file, start time, and target group, which are not limited in this embodiment of the present invention.
Specifically, after receiving the request for obtaining the submitted record, the method for constructing the target tree according to the first manifest file may be: after receiving the submit record get request, the first manifest file is loaded into the memory through the DOM (Document object model) to form a target tree. For example, the XML is read, and data in the manifest XML is loaded into the memory through DOM (Document object model) to form a target tree.
S120, analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, wherein the target dictionary comprises: at least one code library name, a server address corresponding to the at least one code library, and a branch name of the at least one code library.
Wherein the target tree comprises: the node comprises a first type node, a second type node and a third type node, wherein the attribute information corresponding to the first type node comprises: the server address corresponding to at least one code base, and the attribute information corresponding to the second type node includes: the branch name of at least one code base, and the attribute information corresponding to the third type node comprises: at least one code library name and at least one code library corresponding group name. The target tree may further include: the fourth type node, the attribute information corresponding to the fourth type node includes: identification information of the second manifest file.
Specifically, the method for analyzing each node in the target tree and the attribute information corresponding to the node to obtain the target dictionary may be as follows: calling a function provided by the DOM to obtain each node in the target tree and attribute information corresponding to the node, wherein if the target tree comprises: and analyzing the first class node, the attribute information corresponding to the first class node, the second class node, the attribute information corresponding to the second class node, and the attribute information corresponding to the third class node and the third class node to obtain a dictionary corresponding to the first class node, a dictionary corresponding to the second class node, and a dictionary corresponding to the third class node, and splicing the attribute information in the dictionary corresponding to the first class node, the dictionary corresponding to the second class node, and the dictionary corresponding to the third class node to obtain a target dictionary. Analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, wherein the method for obtaining the target dictionary can also be as follows: the target tree further comprises: the fourth type of node, the attribute information corresponding to the fourth type of node includes: identification information of the second manifest file. Acquiring a second manifest file according to the identification information of the second manifest file; constructing a first tree according to the second manifest file; analyzing each node in the first tree and attribute information corresponding to the node to obtain a first dictionary; analyzing each node in the target tree and attribute information corresponding to the node to obtain a second dictionary; and generating a target dictionary according to the first dictionary and the second dictionary.
In one specific example, the target tree includes: the method comprises the following steps of remote node, include node, default node and project node, wherein the attribute information corresponding to the include node comprises the following steps: the name of the second manifest file and the attribute information corresponding to the remote node include: the server address corresponding to the code base, and the attribute information corresponding to the default node comprises: the branch name of the code base, the attribute information corresponding to the project node includes: and obtaining a second manifest file according to the name of the second manifest file, obtaining a first dictionary according to the second manifest file, analyzing the remote node, the attribute information corresponding to the remote node, the default node, the attribute information corresponding to the default node, the project node and the attribute information corresponding to the project node to obtain a second dictionary, and generating a target dictionary according to the first dictionary and the second dictionary.
S130, inquiring the target dictionary to obtain a submission record corresponding to the branch name of each code library.
Specifically, the manner of querying the target dictionary to obtain the submission record corresponding to the branch name of each code library may be: acquiring a submission record corresponding to each code library according to the name of the at least one code library and the address of the server corresponding to the at least one code library; and screening the submission records corresponding to the branch names of each code library from the submission records corresponding to each code library according to the branch names of at least one code library. The manner of querying the target dictionary to obtain the submission record corresponding to the branch name of each code library may also be: acquiring a submission record corresponding to each code library according to the name of the at least one code library and the address of the server corresponding to the at least one code library; screening a submission record corresponding to the branch name of each code library from the submission records corresponding to each code library according to the branch name of at least one code library; the method for obtaining the submission record corresponding to the branch name of each code library by screening the submission record corresponding to the branch name of each code library in the target time period and querying the target dictionary may further include: acquiring a submission record corresponding to each code library according to the name of the at least one code library and the address of the server corresponding to the at least one code library; and screening a submission record corresponding to the branch name of each code library from the submission records corresponding to each code library according to the branch name of the code library belonging to the target group, which is not limited in the embodiment of the present invention.
Optionally, querying the target dictionary to obtain a submission record corresponding to the branch name of each code library, including:
acquiring a submission record corresponding to each code library according to the name of the at least one code library and the address of the server corresponding to the at least one code library;
and screening the submission records corresponding to the branch names of each code library from the submission records corresponding to each code library according to the branch names of at least one code library.
Specifically, the submission record corresponding to each code library is obtained according to at least one code library name and the server address corresponding to at least one code library. For example, the submission record corresponding to the code base a is obtained according to the server addresses corresponding to the code base a and the code base a, the submission record corresponding to the code base B is obtained according to the server addresses corresponding to the code base B and the code base B, and the submission record corresponding to the code base a is obtained according to the server addresses corresponding to the code base C and the code base C.
Specifically, a submission record corresponding to the branch name of each code library is screened from the submission records corresponding to each code library according to the branch name of at least one code library. For example, the submission records corresponding to the branch a1 are screened from the submission records corresponding to the code library a according to the branch a1 of the code library a, the submission records corresponding to the branch a2 are screened from the submission records corresponding to the code library a according to the branch a2 of the code library a, and the submission records corresponding to the branch a3 are screened from the submission records corresponding to the code library a according to the branch a3 of the code library a.
Optionally, the submitting the record obtaining request further includes: a target time period;
correspondingly, the method also comprises the following steps:
and screening the submission records corresponding to the branch names of each code base in the target time period from the submission records corresponding to the branch names of each code base.
It should be noted that the target time period includes: a start time and an end time.
Optionally, the submitting the obtaining request may further include: a target start time;
correspondingly, the method also comprises the following steps:
and screening the submission records with the starting time as the target starting time from the submission records corresponding to the branch names of each code library.
Optionally, the submitting the obtaining request may further include: a target end time;
correspondingly, the method also comprises the following steps:
and screening the submission records with the end time as the target end time from the submission records corresponding to the branch names of each code base.
Optionally, the target dictionary further includes: grouping names corresponding to at least one code base;
correspondingly, the step of screening the submission record corresponding to the branch name of each code library from the submission records corresponding to each code library according to the branch name of at least one code library comprises the following steps:
inquiring the target dictionary to judge whether each code base belongs to a corresponding group;
if the target dictionary comprises the grouping name corresponding to the target code library, acquiring the branch name of the target code library, and determining a submission record corresponding to the branch name of the target code library according to the branch name of the target code library and the submission record corresponding to the target code library.
The method for querying the target dictionary to determine whether each code base belongs to the corresponding group may be: and if the target dictionary does not comprise the group name corresponding to the target code library, determining that the target code library does not belong to the corresponding group.
Optionally, the submitting the record obtaining request further includes: grouping the targets;
correspondingly, the step of screening the submission record corresponding to the branch name of each code library from the submission records corresponding to each code library according to the branch name of at least one code library comprises the following steps:
acquiring at least one code base belonging to a target group;
and screening a submission record corresponding to the branch name of each code library from the submission records corresponding to each code library according to the branch name of at least one code library belonging to the target grouping.
The target groups can be multiple, that is, submission records on the Gitlab code library under multiple groups can be exported in batches.
Optionally, obtaining the submission record corresponding to each code library according to the name of the at least one code library and the address of the server corresponding to the at least one code library includes:
performing identity verification on the server address corresponding to the at least one code base;
acquiring a target code library name set corresponding to the server address passing the verification;
and acquiring a submission record corresponding to each target code library in the target code library name set according to the server address and the target code library name set which pass the verification.
The method for performing identity authentication on the server address corresponding to the at least one code base may be as follows: inquiring a target password corresponding to the server address corresponding to the at least one code base; and performing identity verification on the server address corresponding to the at least one code base according to the target password corresponding to the server address corresponding to the at least one code base.
Optionally, the target tree includes: the node comprises a first class node, a second class node and a third class node, wherein the attribute information corresponding to the first class node comprises: the server address corresponding to at least one code base, and the attribute information corresponding to the second type node includes: the branch name of at least one code base, and the attribute information corresponding to the third type node comprises: at least one code library name and at least one code library corresponding group name.
Optionally, the target tree further includes: the fourth type node, the attribute information corresponding to the fourth type node includes: identification information of the second manifest file;
correspondingly, analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, including:
acquiring a second manifest file according to the identification information of the second manifest file;
constructing a first tree according to the second manifest file;
analyzing each node in the first tree and attribute information corresponding to the node to obtain a first dictionary;
analyzing the first class node, the attribute information corresponding to the first class node, the second class node, the attribute information corresponding to the second class node, the third class node and the attribute information corresponding to the third class node to obtain a second dictionary;
and generating a target dictionary according to the first dictionary and the second dictionary.
The method for constructing the first tree according to the second manifest file may be: and loading the second manifest file into the memory through the DOM to form a first tree.
Specifically, the manner of analyzing each node in the first tree and the attribute information corresponding to the node to obtain the first dictionary may be: and calling a function provided by the DOM to acquire each node in the first tree and attribute information corresponding to the node.
Wherein the first dictionary comprises: the system comprises at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library.
Optionally, performing identity verification on the server address corresponding to the at least one code base, includes:
inquiring a target password corresponding to the server address corresponding to the at least one code base;
and performing identity verification on the server address corresponding to the at least one code base according to the target password corresponding to the server address corresponding to the at least one code base.
The method for querying the target password corresponding to the server address corresponding to the at least one code library may be: and pre-establishing a database of the corresponding relation between the server address and the password, and inquiring the database to obtain a target password corresponding to the server address corresponding to at least one code library.
In a specific example, as shown in fig. 2, a manifest XML corresponding to a first manifest file is read, the manifest XML is loaded into a memory through a DOM (Document object model) to form a target tree, a function provided by the DOM is called to obtain each node and attribute information thereof in the target tree, whether an include node exists is determined, if so, the attribute information of the include node is obtained, and the attribute information of the include node includes: reading a manifest XML corresponding to the second manifest file, and storing the node attribute information to a Python dictionary, wherein the second manifest file comprises the following steps:
remote={{‘fetch’:’ssh://git@scm-git/alg’,’name’:’origin’},
{‘fetch’:’ssh://git@scm-git/app’,’name’:’app’},…}
default={‘remote’:’origin’,’revision’:’master’}
project={{‘name’:’namespace_1’,’path’:’path_1’,’groups’:’test’},
{‘remote’:’app’,‘name’:’namespace_2’,’path’:’path_2’,’groups’:’release,test’},…}
and splicing and filling the attribute information in the remote dictionary, the default dictionary and the project dictionary. Splicing the catch attribute in the dictionary remote with the name attribute in the dictionary project to obtain a complete URL address of the Gitlab code library; and for the attributes which are missing in the dictionary project, such as 'remote' and 'provision', directly taking values from the dictionary default to fill the values, setting each Gitlab code library to be defaulted to belong to an 'all' group, and finally obtaining the target dictionary. The target dictionary is as follows:
XMLProjects={'git_url_1':{'remote':'origin','revision':'master','groups':['all','test']},'git_url_2':{'remote':'app','revision':'master','groups':['all','release','test']},…}。
judging servers to which the Gitlab code libraries in the XMLProjects belong, calling a Gitlab API (application program interface) respectively to perform identity authentication, if the identity authentication fails, performing identity authentication failure reminding, if the identity authentication succeeds, starting traversing the Gitlab code libraries in the XMLProjects, judging whether the Git addresses exist on the servers, if not, performing Git address non-existence reminding, if so, judging whether the Git addresses belong to designated Groups (Groups), and if not, traversing other Git addresses; if the Git address belongs to the appointed Groups, calling a Gitlab API to acquire all merged MergeRequests on the attribute branch of the Gitlab code library 'provision' and storing the merged MergeRequests in allMRs; traversing all-MRs, judging whether the merged MergeRequest is merged in a specified time period, if so, acquiring MergeRequest information and storing the MergeRequest information into the MRs, if not, judging whether all-MRs complete traversing, and if so, judging that the Git warehouse in the XML completes traversing. If yes, writing an information list in the MRs into the Excel, and if not, returning to judge whether the Git address exists.
In another specific example, as shown in fig. 3, a Jenkins task triggers, parses XML, obtains a list of item Git warehouses stored in list P, connects to a GitLab server, if the connection fails, prints error information, if the connection succeeds, i =0, MRs = [ ], determines i < len (P), if i < len (P), i = i +1, determines that Git warehouse P [ i ] exists, if not, prints a P [ i ] address, if yes, obtains P [ i ], obtains a mergerest in a specified time period in P [ i ], and stores the mergerest in list MRs. If i is larger than or equal to len (P), writing MRs information into an Excel table, judging whether the writing is successful, if so, saving the table, and archiving Jenkins; if not, printing error information.
According to the embodiment of the invention, all submission records on all main line branches of the Gitlab code library in the XML can be derived by referring to the designated manifest XML, and the submitted records are stored in the Excel table; according to the embodiment of the invention, submission records of all Gitlab code base main line branches from the StartDate to the current date in the XML can be derived by referring to the specified manifest XML and the start date StartDate, and the submission records are stored in an Excel table; in the embodiment of the invention, submission records from the StartDate to the UntilDate on all Gitlab code library main line branches in the XML can be derived by referring to the specified Manifest XML, the start date StartDate and the expiration date UntilDate, and the submission records are stored in the Excel table; according to the embodiment of the invention, submission records from the StartDate to the UntilDate on the main line branch of the Gitlab code library belonging to the group in the XML can be derived by referring to the specified Manifest XML, the start date StartDate, the deadline date and the group to which the Gitlab code library belongs, and the submission records are stored in the Excel table.
According to the technical scheme of the embodiment, after receiving a submitted record acquisition request, a target tree is constructed according to a first manifest file, wherein the submitted record acquisition request comprises: a first manifest file; analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, wherein the target dictionary comprises: at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library; the target dictionary is inquired to obtain the submission records corresponding to the branch names of each code library, so that the problems that the submission records cannot be exported at one time by manually copying the submission records in the code warehouse of the code association tool one by one, errors may exist in the method for manually identifying, copying and summarizing, and time is extremely consumed are solved, the working efficiency can be greatly improved, and the errors caused by manual summarizing are effectively avoided.
Example two
Fig. 4 is a schematic structural diagram of a submission-record obtaining apparatus according to an embodiment of the present invention. The present embodiment may be applicable to a case of obtaining a submitted record for a merge request, where the apparatus may be implemented in a software and/or hardware manner, and the submitted record obtaining apparatus may be integrated in any device providing a function of obtaining a submitted record, as shown in fig. 4, where the submitted record obtaining apparatus specifically includes: a target tree building module 210, a target dictionary determination module 220, and a submitted records acquisition module 230.
The target tree building module 210 is configured to, after receiving a submitted record obtaining request, build a target tree according to the first manifest file, where the submitted record obtaining request includes: a first manifest file;
a target dictionary determining module 220, configured to analyze each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, where the target dictionary includes: at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library;
the submitted record obtaining module 230 is configured to query the target dictionary to obtain a submitted record corresponding to the branch name of each code library.
Optionally, the submission-record obtaining module is specifically configured to:
acquiring a submission record corresponding to each code library according to the name of the at least one code library and the address of the server corresponding to the at least one code library;
and screening the submission records corresponding to the branch names of each code library from the submission records corresponding to each code library according to the branch names of at least one code library.
Optionally, the submitting the record obtaining request further includes: a target time period;
correspondingly, the submission record obtaining module is further configured to:
and screening the submission records corresponding to the branch names of each code base in the target time period from the submission records corresponding to the branch names of each code base.
Optionally, the target dictionary further includes: grouping names corresponding to at least one code base;
correspondingly, the submission record obtaining module is further configured to:
querying a target dictionary to judge whether each code base belongs to a corresponding group;
if the target dictionary comprises the grouping name corresponding to the target code library, acquiring the branch name of the target code library, and determining a submission record corresponding to the branch name of the target code library according to the branch name of the target code library and the submission record corresponding to the target code library.
Optionally, the submission-record obtaining module is further configured to:
performing identity verification on the server address corresponding to the at least one code base;
acquiring a target code library name set corresponding to the server address passing the verification;
and acquiring a submission record corresponding to each target code library in the target code library name set according to the server address and the target code library name set which pass the verification.
Optionally, the target tree includes: the node comprises a first class node, a second class node and a third class node, wherein the attribute information corresponding to the first class node comprises: the server address corresponding to at least one code base, and the attribute information corresponding to the second type node includes: the branch name of at least one code base, and the attribute information corresponding to the third type node comprises: at least one code library name and a group name corresponding to the at least one code library.
Optionally, the target tree further includes: the fourth type node, the attribute information corresponding to the fourth type node includes: identification information of the second manifest file;
correspondingly, analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, including:
acquiring a second manifest file according to the identification information of the second manifest file;
constructing a first tree according to the second manifest file;
analyzing each node in the first tree and attribute information corresponding to the node to obtain a first dictionary;
analyzing the first class node, the attribute information corresponding to the first class node, the second class node, the attribute information corresponding to the second class node, the third class node and the attribute information corresponding to the third class node to obtain a second dictionary;
and generating a target dictionary according to the first dictionary and the second dictionary.
The product can execute the method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
According to the technical scheme of the embodiment, after a submitted record acquisition request is received, a target tree is constructed according to a first manifest file, wherein the submitted record acquisition request comprises: a first manifest file; analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, wherein the target dictionary comprises: at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library; the target dictionary is inquired to obtain the submission records corresponding to the branch names of each code library, so that the problems that the submission records cannot be exported at one time by manually copying the submission records in the code warehouse of the code association tool one by one, errors may exist in the method for manually identifying, copying and summarizing, and time is extremely consumed are solved, the working efficiency can be greatly improved, and the errors caused by manual summarizing are effectively avoided.
EXAMPLE III
FIG. 5 illustrates a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as the commit record acquisition method.
In some embodiments, the commit record acquisition method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the commit record obtaining method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured by any other suitable means (e.g., by means of firmware) to perform the commit record acquisition method:
after receiving a submitted record acquisition request, constructing a target tree according to a first manifest file, the submitted record acquisition request comprising: a first manifest file;
analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, wherein the target dictionary comprises: at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library;
and querying the target dictionary to obtain a submission record corresponding to the branch name of each code library.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the Internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A submission record acquiring method, comprising:
after receiving a submitted record acquisition request, constructing a target tree according to a first manifest file, the submitted record acquisition request comprising: a first manifest file;
analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, wherein the target dictionary comprises: at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library;
and querying the target dictionary to obtain a submission record corresponding to the branch name of each code base.
2. The method of claim 1, wherein querying the target dictionary to obtain a submission record corresponding to a branch name of each codebase comprises:
acquiring a submission record corresponding to each code library according to the name of the at least one code library and the address of the server corresponding to the at least one code library;
and screening the submission records corresponding to the branch names of each code library from the submission records corresponding to each code library according to the branch names of at least one code library.
3. The method of claim 2, wherein submitting a record retrieval request further comprises: a target time period;
correspondingly, the method also comprises the following steps:
and screening the submission records corresponding to the branch names of each code base in the target time period from the submission records corresponding to the branch names of each code base.
4. The method of claim 2, wherein the target dictionary further comprises: grouping names corresponding to at least one code base;
correspondingly, the step of screening the submission record corresponding to the branch name of each code library from the submission records corresponding to each code library according to the branch name of at least one code library comprises the following steps:
querying a target dictionary to judge whether each code base belongs to a corresponding group;
if the target dictionary comprises the grouping name corresponding to the target code library, acquiring the branch name of the target code library, and determining a submission record corresponding to the branch name of the target code library according to the branch name of the target code library and the submission record corresponding to the target code library.
5. The method of claim 4, wherein obtaining the submission record corresponding to each codebase according to the at least one codebase name and the server address corresponding to the at least one codebase comprises:
performing identity verification on a server address corresponding to the at least one code base;
acquiring a target code library name set corresponding to the server address passing the verification;
and acquiring a submission record corresponding to each target code library in the target code library name set according to the server address and the target code library name set which pass the verification.
6. The method of claim 1, wherein the target tree comprises: the node comprises a first type node, a second type node and a third type node, wherein the attribute information corresponding to the first type node comprises: the server address corresponding to at least one code base, and the attribute information corresponding to the second type node includes: the branch name of at least one code base, and the attribute information corresponding to the third type node comprises: at least one code library name and a group name corresponding to the at least one code library.
7. The method of claim 6, wherein the target tree further comprises: the fourth type of node, the attribute information corresponding to the fourth type of node includes: identification information of the second manifest file;
correspondingly, analyzing each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, including:
acquiring a second manifest file according to the identification information of the second manifest file;
constructing a first tree according to the second manifest file;
analyzing each node in the first tree and attribute information corresponding to the node to obtain a first dictionary;
analyzing the first class node, the attribute information corresponding to the first class node, the second class node, the attribute information corresponding to the second class node, the third class node and the attribute information corresponding to the third class node to obtain a second dictionary;
and generating a target dictionary according to the first dictionary and the second dictionary.
8. A submission-record obtaining apparatus, comprising:
a target tree construction module, configured to construct a target tree according to a first manifest file after receiving a submitted record acquisition request, where the submitted record acquisition request includes: a first manifest file;
a target dictionary determining module, configured to analyze each node in the target tree and attribute information corresponding to the node to obtain a target dictionary, where the target dictionary includes: at least one code library name, a server address corresponding to the at least one code library and a branch name of the at least one code library;
and the submitted record acquisition module is used for inquiring the target dictionary to obtain the submitted records corresponding to the branch names of each code library.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the commit record acquisition method of any of claims 1-7.
10. A computer-readable storage medium having stored thereon computer instructions for causing a processor to execute a commit record capture method of any one of claims 1 to 7.
CN202210527813.0A 2022-05-16 2022-05-16 Submission record acquisition method, device, equipment and storage medium Pending CN115756575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210527813.0A CN115756575A (en) 2022-05-16 2022-05-16 Submission record acquisition method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210527813.0A CN115756575A (en) 2022-05-16 2022-05-16 Submission record acquisition method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115756575A true CN115756575A (en) 2023-03-07

Family

ID=85349939

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210527813.0A Pending CN115756575A (en) 2022-05-16 2022-05-16 Submission record acquisition method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115756575A (en)

Similar Documents

Publication Publication Date Title
CN108628748B (en) Automatic test management method and automatic test management system
CN108255620B (en) Service logic processing method, device, service server and system
CN113326247B (en) Cloud data migration method and device and electronic equipment
CN110895472A (en) Method and device for identifying service change
CN111694612A (en) Configuration checking method, device, computer system and storage medium
CN116881156A (en) Automatic test method, device, equipment and storage medium
CN115599769A (en) Data migration method and device, electronic equipment and storage medium
CN115048352B (en) Log field extraction method, device, equipment and storage medium
CN116167860A (en) Account checking processing method and device, electronic equipment and storage medium
CN115454971A (en) Data migration method and device, electronic equipment and storage medium
CN114676054A (en) Test data generation method, device, equipment, medium and product
CN115756575A (en) Submission record acquisition method, device, equipment and storage medium
CN115017047A (en) Test method, system, equipment and medium based on B/S architecture
CN114693116A (en) Method and device for detecting code review validity and electronic equipment
CN113238940A (en) Interface test result comparison method, device, equipment and storage medium
CN112765188A (en) Configuration information processing method, configuration management system, electronic device, and storage medium
CN111045983A (en) Nuclear power station electronic file management method and device, terminal equipment and medium
CN116483735B (en) Method, device, storage medium and equipment for analyzing influence of code change
CN115983222A (en) EasyExcel-based file data reading method, device, equipment and medium
CN117453747A (en) Data quality detection method and device, electronic equipment and storage medium
CN115063109A (en) Data processing method, device, equipment and medium
CN117112354A (en) Early warning method, device, equipment and storage medium of application program
CN115599422A (en) Component processing method and device, electronic equipment and storage medium
CN115203158A (en) Data comparison method, device, equipment and storage medium
CN115629943A (en) Information monitoring method, device, equipment and storage medium based on Zabbix

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