Code review methods, devices, equipment and media

By using the message card mechanism on communication software to automatically assemble and display code review messages, the problems of high communication costs and low efficiency in the code review process are solved, and an efficient automated code review process is achieved.

CN114924956BActive Publication Date: 2025-09-09BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210524645.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-13
Publication Date
2025-09-09
Estimated Expiration
2042-05-13

AI Technical Summary

Technical Problem

In the existing code review process, the communication cost between programmers and reviewers is high, the review efficiency is low, and manual switching between different platforms is required, resulting in low efficiency.

Method used

By using the message card mechanism on communication software, code review-related message cards are automatically assembled and displayed, enabling direct operations and notifications between submitters and reviewers, reducing additional communication, and supporting reviews on mobile devices.

Benefits of technology

It improves the efficiency of code review, reduces communication costs, realizes automated code review anytime and anywhere, and shortens the time from code submission to merging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114924956B_ABST
    Figure CN114924956B_ABST
Patent Text Reader

Abstract

The present disclosure provides a code review method, apparatus, device, medium and program product, which relate to the field of computer technology, and in particular to code review technology. The specific implementation scheme is: in response to the triggering operation of the initiation review button by the submitter of the target code on the preset communication software, the target reviewer selected by the submitter is obtained, wherein the initiation review button and the candidate list of reviewers are displayed on the initiation review message card, and the initiation review message card is displayed on the communication software; a request review message card is assembled, and the request review message card is sent to the target reviewer through the communication software, wherein a review button for the target code is displayed on the request review message card; in response to the triggering operation of the review button by the target reviewer, the code review page of the target code on the code platform is displayed. The present disclosure can improve the efficiency of code review and save labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to code review technology, and specifically to a code review method, apparatus, device, medium, and program product. Background Art

[0002] At present, the IT industry has become the hottest industry at home and abroad. It seems that every corner of life is filled with engineers' research and development and design. However, the basis for achieving all this comes from every line of code in the hands of engineers.

[0003] From writing code, submitting it, reviewing it, and merging it into the software development team, these are the most critical tasks. Code review is a crucial step and the first step in ensuring code quality. Therefore, improving the efficiency of code review is imperative. Summary of the Invention

[0004] The present disclosure provides a code review method, apparatus, device, medium, and program product.

[0005] According to one aspect of the present disclosure, a code review method is provided, comprising:

[0006] In response to a triggering operation of an initiate review button on a preset communication software by a submitter of the target code, obtaining a target reviewer selected by the submitter, wherein the initiate review button and the candidate list of reviewers are displayed on an initiate review message card, and the initiate review message card is displayed on the communication software;

[0007] Assembling a review request message card, and sending the review request message card to the target reviewer via the communication software, wherein the review request message card displays a review button for the target code;

[0008] In response to the target reviewer triggering the review button, a code review page of the target code on the code platform is displayed.

[0009] According to another aspect of the present disclosure, there is provided a code review apparatus, comprising:

[0010] a target reviewer acquisition module, configured to acquire target reviewers selected by a submitter of target code in response to a triggering operation of an initiate review button on a preset communication software, wherein the initiate review button and the candidate list of reviewers are displayed on an initiate review message card, and the initiate review message card is displayed on the communication software;

[0011] a request review message card assembly module, configured to assemble a request review message card and send the request review message card to the target reviewer via the communication software, wherein the request review message card displays a review button for the target code;

[0012] The code review page display module is used to display the code review page of the target code on the code platform in response to the target reviewer triggering the review button.

[0013] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the code review method described in any embodiment of the present disclosure.

[0017] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the code review method described in any embodiment of the present disclosure.

[0018] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements the code review method described in any embodiment of the present disclosure when executed by a processor.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.

[0021] Figure 1 is a flowchart of a code review method according to an embodiment of the present disclosure;

[0022] Figure 2 is a flowchart of a code review method according to an embodiment of the present disclosure;

[0023] Figure 3a is a flowchart of a code review method according to an embodiment of the present disclosure;

[0024] Figure 3bis a schematic diagram of initiating a review message card according to an embodiment of the present disclosure;

[0025] Figure 3c is a schematic diagram of a request for review message card according to an embodiment of the present disclosure;

[0026] Figure 3d is a schematic diagram of a review page according to an embodiment of the present disclosure;

[0027] Figure 3e is a schematic diagram of an evaluation result message card according to an embodiment of the present disclosure;

[0028] Figure 4 is a structural diagram of a code review device according to an embodiment of the present disclosure;

[0029] Figure 5 It is a block diagram of an electronic device used to implement the code review method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0031] Figure 1 This is a flowchart of a code review method according to an embodiment of the present disclosure. This embodiment is applicable to the review of software code and relates to the field of computer technology, particularly to code review technology. The method can be executed by a code review device, which is implemented in software and / or hardware, and is preferably configured in an electronic device, such as a mobile terminal or a computer device. Figure 1 As shown, the method specifically includes the following:

[0032] S101. In response to the triggering operation of the initiate review button on the preset communication software by the submitter of the target code, the target reviewer selected by the submitter is obtained, wherein the initiate review button and the candidate list of reviewers are displayed on the initiate review message card, and the initiate review message card is displayed on the communication software.

[0033] Among them, the communication software can be any software installed on an electronic device that can realize instant communication. The review initiation message card is a message card that can be displayed on the communication software and is assembled by the message notification platform based on the message card technology. The message notification platform can be an independent service running on the electronic device, or it can exist as a sub-service in the communication software. The embodiment of the present disclosure does not impose any restrictions on this. The review initiation message card can be displayed in the form of a pop-up window on the communication software, or it can be displayed in the form of a message window. The embodiment of the present disclosure does not impose any restrictions on the display form of the review initiation message card on the communication software.

[0034] The Initiate Review message card displays a Start Review button and a list of candidate reviewers. Once the Initiate Review message card is displayed in the messaging app, the submitter can select a target reviewer from the list and trigger the Initiate Review button to initiate a review request for the target reviewer.

[0035] S102: Assembling a review request message card, and sending the review request message card to a target reviewer via the communication software, wherein a review button for the target code is displayed on the review request message card.

[0036] When the submitter triggers the Initiate Review button on the Initiate Review message card, the message notification platform receives the Initiate Review request, assembles a Request Review message card based on the request, and sends it to the target reviewer through the communication software. A review button for the target code is displayed on the Request Review message card.

[0037] S103: In response to the target reviewer triggering the review button, displaying the code review page of the target code on the code platform.

[0038] The target reviewer receives a review request message card on the messaging app, notifying them of a review task for the target code. They then trigger the review button on the message card. The notification messaging platform responds to this trigger and displays the code review page for the target code on the platform's electronic device for the target reviewer to conduct.

[0039] It should be noted that in the prior art, programmer A typically writes the code and submits it to the code platform. Then, programmer A finds reviewer B and informs him of a code review task. Reviewer B logs into the code platform and finds the review page for the target code to begin the review. This process not only requires additional communication between programmer A and reviewer B, but also requires reviewer B to manually switch between the other platform and the code platform when he is working on other platforms, which is very inefficient. In the disclosed embodiment, code review is implemented based on a message card mechanism, eliminating the need for additional communication costs between the submitter and the target reviewer. The message notification platform is responsible for assembling the message cards required for the code review and directly displaying them in the communication software. Since communication software is a common communication tool used by people in daily work, no additional communication costs are incurred. When the submitter and target reviewer see the corresponding message card in the communication software, on the one hand, they can intuitively understand the current task and the stage of the code review. On the other hand, they can trigger the function buttons displayed on the message card to advance the code review process. In short, for the submitter and target reviewer, they only need to perform simple operations on the communication software based on the message card to complete the code review, improving the efficiency of the code review.

[0040] The technical solution of the disclosed embodiment is based on a message card mechanism, which allows notification messages and trigger operations of each node in the code review process to be displayed on a message card and sent to the submitter or reviewer through communication software, so that the submitter and reviewer can directly view the detailed content on the message card displayed on the communication software and trigger related operations of the code review, thereby realizing fully automated code review anytime and anywhere, and improving the efficiency of code review.

[0041] Figure 2 This is a flow chart of the code review method according to the embodiment of the present disclosure. This embodiment is further optimized based on the above embodiment. Figure 2 As shown, the method specifically includes the following:

[0042] S201. Obtain target code information and machine check results from a code platform, wherein the target code information includes a code library address of the target code, submitter information, and a candidate list of reviewers.

[0043] The submitter submits the target code to the code platform, which first performs a machine check on the target code, including coding standard scanning, defect scanning, security scanning, unit testing, and pipeline automation tasks. After the machine check, the code platform sends the target code information and the corresponding machine check results to the message notification platform.

[0044] S202: Assemble a review initiation message card based on the target code information and the machine inspection result, and send the review initiation message card to the submitter through the communication software.

[0045] After obtaining the target code information and machine check results, the message notification platform assembles a review initiation message card. This card displays a button to initiate review, a list of candidate reviewers, a summary of the machine check results, and a button to view the machine check result details. Furthermore, if the target code has a default reviewer, the default reviewer's information is also displayed directly on the review initiation message card.

[0046] S203: In response to the submitter's triggering operation on the machine inspection result detail viewing button, the detailed content of the machine inspection result is displayed.

[0047] When the target code fails the machine check, the relevant matters can be recorded in the detailed content of the machine check results so that the submitter can make modifications.

[0048] S204: In response to the target code submitter triggering the review initiation button on the communication software, obtaining the target reviewer selected by the submitter.

[0049] S205: Assemble a review request message card, and send the review request message card to the target reviewer via communication software.

[0050] Among them, the review request message card displays a review button for the target code. In addition, the code library address and submitter information of the target code can also be displayed for the target reviewer to view.

[0051] S206 : In response to the target reviewer triggering the review button, displaying the code review page of the target code on the code platform.

[0052] Specifically, the code review plug-in that is pre-installed can be used to display the target code on the code review page of the code platform. The code review plug-in and communication software are installed on the mobile terminal. In this way, even if the submitter and reviewer are not at the computer, they can complete the review through the mobile terminal, which improves the efficiency of the code review.

[0053] S207 : In response to the target reviewer triggering the review result publish button displayed on the code review page, the review result of the target code is obtained.

[0054] The target reviewer conducts the review according to the normal review procedures on the code review page. In addition, a button for publishing the review results is displayed on the code review page. When the review is completed, the target reviewer can trigger the button. The message notification platform responds to the target reviewer's triggering of the button and obtains the review results of the target code.

[0055] S208. Assemble an evaluation result message card according to the evaluation result, and send the evaluation result message card to the submitter via communication software.

[0056] The message notification platform assembles a review result message card according to the review result, and sends the review result message card to the submitter through the communication software to inform the submitter of the review result of the target code.

[0057] S209: In response to the submitter triggering the code merge button displayed on the review result message card, a request for merging the target code is sent to the code platform.

[0058] The review result message card displays a summary of the review results and a merge button. If the target code passes the review, the submitter can trigger the merge button. The message notification platform responds to the trigger and sends a merge request to the code platform. The code platform then merges the target code into the code repository, completing the entire code review process.

[0059] In addition, a button for viewing review results details can be displayed on the review result message card. If the target code fails the review, the submitter can trigger this button. The message notification platform responds to the trigger and displays the detailed review results for the submitter to view, allowing the submitter to modify the target code. If the submitter re-modifies the target code, the modified target code is re-uploaded to the code platform and reviewed again according to the method of the embodiment of the present disclosure.

[0060] According to the technical solution of the embodiment of the present disclosure, after the submitter submits the target code to the code platform, the code platform first performs a machine review. Then, based on the message card mechanism, the notification messages and trigger operations of each node in the code review process are displayed on the message card and sent to the submitter or reviewer through the communication software. The submitter and reviewer can directly view the detailed content on the message card displayed on the communication software and trigger related operations of the code review, thereby realizing fully automated code review anytime and anywhere, thereby improving the efficiency of code review.

[0061] Figure 3a This is a flow chart of the code review method according to the embodiment of the present disclosure. This embodiment is further optimized based on the above embodiment. Figure 3a As shown, steps 1-9 involved in this method are specifically:

[0062] Step 1: The code submitter submits the target code to the code repository (unreviewed code will be stored in the temporary storage area of ​​the code repository);

[0063] Step 2: The code platform performs machine checking on the target code;

[0064] Step 3: The code platform sends the machine inspection results and target code information to the message notification platform;

[0065] Step 4: The message notification platform sends the assembled review initiation message card to the code submitter via the communication software;

[0066] Step 5: The code submitter selects a code reviewer through the Initiate Review message card and triggers the Initiate Review button displayed on the Initiate Review message card;

[0067] Step 6: The message notification platform sends the assembled request review message card to the code reviewer;

[0068] Step 7: The code reviewer triggers the review button displayed on the review request message card, conducts the review on the review page, and then triggers the review result publish button displayed on the review page;

[0069] Step 8: The message notification platform sends the assembled review result message card to the code submitter;

[0070] In step 9, the code submitter triggers the merge button displayed on the review result message card, and the code platform merges the target code into the code repository.

[0071] For example, Figure 3b 、 Figure 3c 、 Figure 3d 、 Figure 3e They are schematic diagrams of the review initiation message card, review request message card, review page, and review result message card according to the embodiment of the present disclosure. Figure 3b 、 Figure 3c 、 Figure 3d 、 Figure 3e The contents shown in are examples only. The embodiments of the present disclosure do not limit the contents and layouts displayed on various types of message cards and review pages.

[0072] like Figure 3b In the review message card shown, area 31 displays the target code name, area 32 displays the machine inspection results, area 33 displays the default reviewer, area 34 displays the address book, and the submitter can select the designated target reviewer in this area. Area 35 is the launch button. If the submitter triggers this button, the reviewer can see the following information on the communication software: Figure 3c A request for review message card is shown.

[0073] like Figure 3c In the request review message card shown, the words "You have new code to review" are displayed to remind the reviewer that there is a new review task. Area 36 displays the name of the code to be reviewed, area 37 displays the submitter, area 38 displays the address of the code to be reviewed in the code library, and area 39 is a view details button. When the reviewer triggers this button, he will enter the following Figure 3d The review page is shown for review.

[0074] like Figure 3d In the review page shown, area 40 is the scoring area, and area 41 is the comment area. Reviewers can score and write comments in these two areas. After completing the review, the publish button displayed in area 42 is triggered, and the submitter can see the results on the communication software. Figure 3e The review result message card is shown.

[0075] like Figure 3e The review result message card shown displays "Code Review Result: +2," indicating the total review score for the current code. Area 43 displays the code repository address, area 44 displays the review topic, area 45 displays the number of comments, area 46 is a View Details button, and area 47 is a Merge button. If the submitter triggers the View Details button, they can view the code review details. If they trigger the Merge button, the code platform will merge the code into the code repository.

[0076] The technical solution of the disclosed embodiment, based on the message card mechanism, allows notification messages and trigger operations at each node in the code review process to be displayed on the message card and sent to the submitter or reviewer via the communication software. The submitter and reviewer can directly view the detailed content on the message card displayed in the communication software and trigger related code review operations, thus realizing fully automated code review anytime, anywhere, and improving the efficiency of code review. Specifically, the following effects can be achieved:

[0077] (1) When a submitter submits code, after all machine checks are completed, the submitter will be automatically notified in the form of a message card, without the submitter having to manually refresh the page to view the machine check results;

[0078] (2) The submitter clicks the message card in (1), selects the code reviewer (can select an individual or group chat) and sends the review card to the reviewer, without having to manually copy the review link and send it to the reviewer; the reviewer can see the message card clearly at a glance without any communication cost, and clicks the review button displayed on the card to jump to the review page for review;

[0079] (3) When the reviewer is not at the PC, he or she can also conduct code review on the mobile terminal through the pre-installed review plug-in, which is convenient and fast;

[0080] (4) After the reviewer has reviewed the code for the submitter, the message notification platform will immediately send the submitter a review result message card in a person-to-person dialogue mode. The message card has a [Merge] button. The submitter clicks the [Merge] button to merge the code after receiving the message card. The submitter will also be reminded to merge the code immediately after the code review is completed.

[0081] (5) Using the method of the embodiment of the present disclosure, with 3,000+ samples per day, the time from code submission to code merging can be shortened by an average of 13.6 hours each time.

[0082] Figure 4 This is a schematic diagram of the structure of a code review device according to an embodiment of the present disclosure. This embodiment is applicable to the situation of reviewing software code, and relates to the field of computer technology, and in particular to code review technology. The device can implement the code review method described in any embodiment of the present disclosure. Figure 4 As shown, the device 400 specifically includes:

[0083] Target reviewer acquisition module 401, configured to acquire target reviewers selected by a submitter of target code in response to a triggering operation of an initiate review button on a preset communication software, wherein the initiate review button and the candidate list of reviewers are displayed on an initiate review message card, and the initiate review message card is displayed on the communication software;

[0084] A review request message card assembly module 402 is configured to assemble a review request message card and send the review request message card to the target reviewer via the communication software, wherein the review request message card displays a review button for the target code;

[0085] The code review page display module 403 is configured to display the code review page of the target code on the code platform in response to the target reviewer triggering the review button.

[0086] Optionally, the apparatus further includes a review initiation message card assembly module configured to implement the following operations before the target reviewer acquisition module 401 acquires the target reviewer selected by the submitter in response to the submitter triggering the review initiation button on the preset communication software:

[0087] Acquire information of the target code and a machine check result from the code platform, wherein the target code information includes a code repository address of the target code, information of the submitter, and a candidate list of reviewers;

[0088] The review initiation message card is assembled according to the target code information and the machine inspection result, and the review initiation message card is sent to the submitter through the communication software.

[0089] Optionally, the review initiation message card further displays summary information of the machine inspection result and a button for viewing details of the machine inspection result; accordingly, the device further includes:

[0090] The machine inspection result display module is used to display the detailed content of the machine inspection result in response to the submitter triggering the machine inspection result detail viewing button.

[0091] Optionally, the request review message card also displays the code library address of the target code and the submitter information.

[0092] Optionally, the code review page display module 403 is specifically configured to:

[0093] The code review page of the target code on the code platform is displayed through a pre-installed code review plug-in, wherein the code review plug-in and the communication software are installed on the mobile terminal.

[0094] Optionally, a review result publishing button is displayed on the code review page; accordingly, the device further includes a review result message card assembly module, specifically configured to:

[0095] In response to the target reviewer triggering the operation of the review result publishing button, obtaining the review result of the target code;

[0096] Assemble an evaluation result message card according to the evaluation result, and send the evaluation result message card to the submitter through the communication software.

[0097] Optionally, a code integration button is displayed on the review result message card; accordingly, the device further includes:

[0098] The merge request sending module is used to send a merge request of the target code to the code platform in response to the triggering operation of the code merge button by the submitter.

[0099] Optionally, the review result message card displays summary information of the review result and a button for viewing review result details; accordingly, the device further includes:

[0100] The review result display module is used to display the detailed content of the review result in response to the submitter triggering the review result detail viewing button.

[0101] The above-mentioned product can execute the method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0102] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0103] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0104] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0105] like Figure 5 As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the device 500 can also be stored in the RAM 503. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0106] Various components in device 500 are connected to I / O interface 505, including: an input unit 506, such as a keyboard, mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, optical disk, etc.; and a communication unit 509, such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0107] The computing unit 501 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the code review method. For example, in some embodiments, the code review method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the code review method described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the code review method by any other appropriate means (e.g., by means of firmware).

[0108] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0109] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0110] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, 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 portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0111] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 can be received in any form (including acoustic input, voice input, or tactile input).

[0112] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, 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: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0113] A computer system may include a client and a server. The client and server are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services. The server may also be a server in a distributed system or a server integrated with blockchain.

[0114] Artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.

[0115] Cloud computing refers to a technology system that provides network access to elastically scalable shared pools of physical or virtual resources. These resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on-demand in a self-service manner. Cloud computing technology provides efficient and powerful data processing capabilities for the application of technologies such as artificial intelligence and blockchain, as well as for model training.

[0116] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions provided by this disclosure can be achieved. This is not limited herein.

[0117] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A code review method, applied to an electronic device, wherein the electronic device runs a message notification platform, the message notification platform being an independent service running on the electronic device, the method comprising: Obtaining, through the message notification platform, information of the target code and machine check results sent by the code platform, wherein the target code information includes the code library address of the target code, submitter information, and a candidate list of reviewers; Assembling a review initiation message card based on the target code information and the machine inspection result through the message notification platform, and sending the review initiation message card to the submitter of the target code through the communication software running on the electronic device; In response to the submitter triggering an initiate review button on the communication software, obtaining target reviewers selected by the submitter through the message notification platform, wherein the initiate review button and the candidate list of reviewers are displayed on the initiate review message card, and the initiate review message card is displayed on the communication software; Assembling a review request message card through the message notification platform, and sending the review request message card to the target reviewer through the communication software, wherein a review button for the target code is displayed on the review request message card; In response to the target reviewer triggering the review button, the message notification platform displays a code review page of the target code on the code platform, wherein a review result publishing button is displayed on the code review page; In response to the target reviewer triggering the review result publishing button, obtaining the review result of the target code through the message notification platform; Assembling a review result message card according to the review result through the message notification platform, and sending the review result message card to the submitter through the communication software, wherein the review result message card displays a code merge button, summary information of the review result, and a review result detail viewing button; In response to the submitter triggering the code merge button, sending a merge request for the target code to the code platform through the message notification platform; In response to the submitter triggering the review result details viewing button, the detailed content of the review result is displayed through the message notification platform.

2. The method according to claim 1, wherein The review initiation message card also displays summary information of the machine inspection result and a button for viewing the details of the machine inspection result; accordingly, the method further includes: In response to the submitter triggering the view button for the machine inspection result details, the detailed content of the machine inspection result is displayed through the message notification platform.

3. The method according to claim 1, wherein The request review message card also displays the code library address of the target code and the submitter information.

4. The method according to claim 1, wherein The code review page displaying the target code on the code platform includes: The code review page of the target code on the code platform is displayed through a pre-installed code review plug-in, wherein the code review plug-in and the communication software are installed on the mobile terminal.

5. A code review device, configured on an electronic device, wherein a message notification platform is running on the electronic device, and the message notification platform is an independent service running on the electronic device, the device comprising: a target reviewer acquisition module, configured to, in response to a triggering operation of an initiate review button by a submitter of the target code on the communication software running on the electronic device, acquire target reviewers selected by the submitter through the message notification platform, wherein the initiate review button and the candidate list of reviewers are displayed on an initiate review message card assembled through the message notification platform, and the initiate review message card is displayed on the communication software; a request review message card assembly module, configured to assemble a request review message card through the message notification platform, and send the request review message card to the target reviewer through the communication software, wherein a review button for the target code is displayed on the request review message card; a code review page display module, configured to display a code review page of the target code on the code platform via the message notification platform in response to the target reviewer triggering the review button, wherein a review result publishing button is displayed on the code review page; The device further includes a review initiation message card assembly module configured to implement the following operations before the target reviewer acquisition module acquires the target reviewer selected by the submitter through the message notification platform in response to the submitter's triggering operation of the review initiation button on the communication software running on the electronic device: Obtaining, through the message notification platform, information of the target code and a machine check result sent by the code platform, wherein the target code information includes a code repository address of the target code, information of the submitter, and a candidate list of reviewers; Assembling the review initiation message card based on the target code information and the machine inspection result through the message notification platform, and sending the review initiation message card to the submitter through the communication software; The device also includes an evaluation result message card assembly module, which is specifically used to: In response to the target reviewer triggering the review result publishing button, obtaining the review result of the target code through the message notification platform; Assembling a review result message card according to the review result through the message notification platform, and sending the review result message card to the submitter through the communication software, wherein the review result message card displays a code merge button, summary information of the review result, and a review result detail viewing button; The device further comprises: a merge request sending module, configured to send a merge request of the target code to the code platform via the message notification platform in response to the submitter triggering the code merge button; The review result display module is used to display the detailed content of the review result through the message notification platform in response to the submitter triggering the review result detail viewing button.

6. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the code review method according to any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable a computer to execute the code review method according to any one of claims 1 to 4.

8. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the code review method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Code review data processing method and device, computer equipment and storage medium

    CN113992459A