GIT-based merged code message real-time pushing method

By injecting browser plug-ins into GIT's merge code application page, the merge code application link is automatically sent to the chat group, which solves the problems of manual redundant operations and approval processes during the traditional GIT code merging process, real-time message push and efficiency improvement are achieved.

CN120029659APending Publication Date: 2025-05-23BEIJING BAILONG MAYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510099524.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

There are many manual redundant operations during the traditional GIT code merging process, resulting in low automation and efficiency, and requires multiple people to approve it, making the process complicated.

Method used

By building a browser plug-in, use the plug-in to inject a send button on the GIT merge code application page, extract feature information and match project information, and automatically send the merge code application link to the chat group to reach the approver, and push the result to the chat group after the approval is successful.

Benefits of technology

Real-time message push is realized, reducing manual redundant operations, improving the degree of automation and efficiency, reducing costs and simplifying the process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029659A_ABST
    Figure CN120029659A_ABST
Patent Text Reader

Abstract

The invention provides a GIT-based merged code message real-time pushing method, which comprises the following steps of: constructing a browser plug-in, and adding the browser plug-in into a browser; opening plug-in configuration item information; displaying a sending button injected by the plug-in on a submission merging code application page of the GIT by using the plug-in; when the sending button is clicked, the browser plug-in extracts feature information of the current application merging code; according to the method, a browser plug-in mode is adopted, during GIT merging code application, a plug-in is used for sending a message to a chat group and touching an approver, the approver can directly enter an approval page by clicking an intra-group link, and after approval is completed, a result is sent to the chat group through the browser plug-in and touching an applicant, so that the chat group is directly approved. Therefore, real-time message pushing can be conveniently and rapidly achieved without cost, manual redundant operation is reduced, the automation degree and efficiency are improved, and the purchase cost of mails and user-defined servers is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a real-time message pushing method, in particular to a real-time pushing method for merged code messages based on GIT, and belongs to the technical field of data processing. Background Art

[0002] GIT: Globally Distributed Version Control System, is a distributed version control system that can handle project version management in an agile and efficient manner. A central server is used to store code repositories, and each user's computer is used as a personal server. When developing, the personal server obtains the mirror code from the central server. After the personal server modifies the project code, it must first be submitted to the personal server. Finally, it is pushed to the central server to achieve code version control.

[0003] In the traditional project development process, it is usually necessary to continuously push the code of the personal server to the central server; to ensure the stability of the central server code, each time the code is pushed and merged to the central server, it needs to be approved by multiple people before it can be pushed and merged. Therefore, for each push and merge, you need to apply for a push merge on the web page and describe the specific content. After successful submission. Then manually copy the approval link and description to the corresponding review group, and notify the reviewer to remind the reviewer to approve. After the review, the approver notifies the applicant again in the group. This process has multiple manual redundant operations, and the degree of automation and efficiency are low. For this reason, a real-time push method for merged code messages based on GIT is proposed. Summary of the invention

[0004] In view of this, the present invention provides a GIT-based merge code message real-time push method to solve or alleviate the technical problems existing in the prior art, and at least provide a beneficial choice.

[0005] The technical solution of the embodiment of the present invention is implemented as follows: a method for real-time push of merged code messages based on GIT, comprising the following steps:

[0006] Build browser plugins and add them to your browser;

[0007] Open the plug-in configuration project information;

[0008] Use the plug-in to display the send button injected by the plug-in on the GIT submission and merge code application page;

[0009] When the send button is clicked, the browser plug-in extracts the characteristic information of the current application merge code;

[0010] Use the feature information to match the configured project information, and send the merge code application link to the chat group based on the matching result to reach the approver;

[0011] The approver opens the link in the chat group, enters the browser approval page, and uses the plug-in to inject a successful approval button into the page;

[0012] When the approval success button is clicked, the browser plug-in sends the message to the chat group and reaches the applicant, completing the message push of the entire link.

[0013] Further preferably, the browser plug-in is developed using JavaScript, HTML and CSS technologies, and uses chrome.runtime and chrome.scripting of the Chrome extension API to control the behavior of the plug-in;

[0014] Among them, HTML is used to build the user interface of the plug-in;

[0015] CSS is used to set the user interface style and layout;

[0016] JavaScript is used to handle user interaction and plugin logic.

[0017] Further preferably, the browser plug-in is added to the browser by adding an extension program, and after the addition is completed, the plug-in is started.

[0018] Further preferably, the configuration project information includes project rule configuration, approval personnel configuration and chat group address configuration.

[0019] Further preferably, the characteristic information of the current application merge code includes project name, description information and approval link.

[0020] Further preferably, the feature information is matched with the configured project information by using the extracted project name to match the configured project information in the plug-in to obtain the corresponding project rules, approval personnel and chat group address information.

[0021] Further preferably, the sending of the merged code application link to the chat group is performed by using an API provided by the chat group using HTTP request and JavaScript's fetch API.

[0022] Further preferably, the send button is a browser plug-in injected using JavaScript, which is used to add a click event listener to the merge code application page;

[0023] The approval success button is a browser plug-in injected using JavaScript, and is used to add a click event listener to the approval page.

[0024] Further preferably, when the approval success button is clicked and triggered, the approval result information is extracted through the browser plug-in, and a message is sent to the chat group using the API provided by the chat group according to the extracted information;

[0025] Among them, the approval result information includes the approver, approval status and approval opinion.

[0026] The embodiment of the present invention has the following advantages due to the adoption of the above technical solution:

[0027] The present invention adopts a browser plug-in mode. When applying for GIT merge code, the plug-in is used to send a message to the chat group and reach the approver. The approver can directly enter the approval page by clicking a link in the group. After the approval is completed, the result is sent to the chat group through the browser plug-in and reaches the applicant, so as to realize real-time message push conveniently, quickly and cost-free, reduce manual redundant operations, improve the degree of automation and efficiency, and reduce the purchase cost of emails and custom servers.

[0028] The above summary is for illustrative purposes only and is not limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0030] Figure 1 is a flow chart of the steps of the present invention;

[0031] Figure 2 It is the overall operation flow chart of the present invention. DETAILED DESCRIPTION

[0032] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.

[0033] It should be noted that the terms "first", "second", "symmetrical", "array", etc. are only used to distinguish between description and position description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the definition of "first", "symmetrical", etc. can explicitly or implicitly include one or more of these features; similarly, when the number of certain features is not limited in the form of words such as "two" or "three", it should be noted that this feature also explicitly or implicitly includes one or more feature quantities.

[0034] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0035] like Figure 1 and Figure 2 As shown, the embodiment of the present invention provides a method for real-time push of merged code messages based on GITS, comprising the following steps:

[0036] S1. Build a browser plug-in and add it to the browser;

[0037] Browser plug-ins are developed using JavaScript, HTML, and CSS technologies, and use the Chrome extension API's chrome.runtime and chrome.scripting to control the behavior of the plug-in;

[0038] Among them, HTML is used to build the user interface of the plug-in;

[0039] CSS is used to set the user interface style and layout;

[0040] JavaScript is used to handle user interaction and plugin logic;

[0041] Use HTML to build a simple plug-in user interface structure, as shown below:

[0042]

[0043]

[0044] Then use CSS to set the user interface style and layout, as shown below:

[0045]

[0046]

[0047] Then use JavaScript to handle user interaction and plugin logic, as shown below:

[0048]

[0049]

[0050] This example shows a simple pop-up window with a button. When the button is clicked, a script is executed to send a request. This is just a starting point. In actual applications, more complex functions and logic can be added according to actual needs.

[0051] S2. Open the plug-in configuration project information;

[0052] Configuration of project information includes project rule configuration, approval personnel configuration and chat group address configuration;

[0053] Different project rules, approver configurations and chat group addresses can be configured for each project so that plug-ins can be used to serve multiple different projects.

[0054] S3. Use the plug-in to display the send button injected by the plug-in on the GIT submission and merge code application page;

[0055] The send button is a browser plug-in that uses JavaScript injection to add a click event listener to the merge code application page;

[0056] By adding a click event listener, the browser plug-in can be triggered by clicking to execute the corresponding program.

[0057] S4. When the send button is clicked, the browser plug-in extracts the characteristic information of the current application merge code;

[0058] S5. Use the feature information to match the configured project information, and send the merge code application link to the chat group according to the matching result to reach the approver;

[0059] Using the feature information to match the configured project information is to use the extracted project name to match the configured project information in the plug-in to obtain the corresponding project rules, approvers and chat group address information;

[0060] By extracting feature information and matching it with project information, the plug-in can quickly determine the corresponding project, and then obtain the corresponding project rules, approvers and chat group address information based on the determined project. Then, based on the obtained information, the merged code application link is sent to the corresponding chat group, and the approver is @ed to complete the operation of reaching the approver.

[0061] S6. The approver opens the link address in the chat group, enters the browser approval page, and uses the plug-in to inject an approval success button into the page;

[0062] The approval success button is injected by the browser plug-in using JavaScript, which is used to add a click event listener to the approval page;

[0063] By adding a click event listener, the browser plug-in can be triggered by clicking to execute the corresponding program;

[0064] S7. When the approval success button is clicked, the browser plug-in sends the message to the chat group and reaches the applicant, completing the message push of the entire link;

[0065] When the approval success button is clicked, the approval result information is extracted through the browser plug-in, and the message is sent to the chat group using the API provided by the chat group based on the extracted information;

[0066] By using the approval success button to trigger the browser plug-in to extract the approval result information, and construct a message including the application information and approval result based on the application information, and @ the applicant in the message, and then use the API interface provided by the chat group to send the message to the designated chat group to ensure that the applicant can receive the approval result notification in time.

[0067] In one embodiment, the browser plug-in is added to the browser by adding an extension program, and after the addition is completed, the plug-in is started;

[0068] Open the browser settings, add extensions, add the built browser plug-in to the browser, and activate the plug-in.

[0069] In one embodiment, the characteristic information of the current application merge code includes a project name, description information, and an approval link.

[0070] In one embodiment, the merge code application link is sent to the chat group by using an API provided by the chat group using HTTP request and JavaScript fetch API;

[0071] The API provided by the chat group is used to send HTTP requests and JavaScript's fetch API. The specific sample code is as follows:

[0072]

[0073]

[0074] In actual applications, the parameters and format of the request may also be adjusted according to the specific requirements of the chat group API. In one embodiment, the approval result information includes the approver, the approval status and the approval opinion.

[0075] The present invention builds a browser plug-in, adds a developed plug-in to the browser, and injects a send button into the GIT merge code application submission page. Clicking the send button directly sends the corresponding chat application through the browser plug-in, without the need for additional server costs, and can quickly reach approval.

[0076] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of various changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for real-time push of merge code messages based on GIT, characterized in that: The following steps are involved: Build browser plugins and add them to your browser; Open the plug-in configuration project information; Use the plug-in to display the send button injected by the plug-in on the GIT submission and merge code application page; When the send button is clicked, the browser plug-in extracts the characteristic information of the current application merge code; Use the feature information to match the configured project information, and send the merge code application link to the chat group based on the matching result to reach the approver; The approver opens the link in the chat group, enters the browser approval page, and uses the plug-in to inject a successful approval button into the page; When the approval success button is clicked, the browser plug-in sends the message to the chat group and reaches the applicant, completing the message push of the entire link.

2. The method for real-time push of merged code messages based on GIT according to claim 1, characterized in that: The browser plug-in is developed using JavaScript, HTML and CSS technologies, and uses the chrome.runtime and chrome.scripting of the Chrome extension API to control the behavior of the plug-in; Among them, HTML is used to build the user interface of the plug-in; CSS is used to set the user interface style and layout; JavaScript is used to handle user interaction and plugin logic.

3. The method for real-time push of merged code messages based on GIT according to claim 1, characterized in that: The browser plug-in is added to the browser in the manner of adding an extension program, and after the addition is completed, the plug-in is started.

4. The method for real-time push of merged code messages based on GIT according to claim 1, characterized in that: The configuration project information includes project rule configuration, approval personnel configuration and chat group address configuration.

5. The method for real-time push of merged code messages based on GIT according to claim 4, characterized in that: The characteristic information of the current application merge code includes project name, description information and approval link.

6. The method for real-time push of merged code messages based on GIT according to claim 5, characterized in that: The feature information is used to match the configured project information, and the extracted project name is used to match the configured project information in the plug-in to obtain the corresponding project rules, approval personnel and chat group address information.

7. The method for real-time push of merged code messages based on GIT according to claim 1, characterized in that: The merged code application link is sent to the chat group by using the API provided by the chat group and utilizing HTTP request and JavaScript fetch API.

8. The method for real-time push of merged code messages based on GIT according to claim 1, characterized in that: The send button is a browser plug-in injected with JavaScript, which is used to add a click event listener to the merge code application page; The approval success button is a browser plug-in injected using JavaScript, and is used to add a click event listener to the approval page.

9. The method for real-time push of merged code messages based on GIT according to claim 1, characterized in that: When the approval success button is clicked and triggered, the approval result information is extracted through the browser plug-in, and a message is sent to the chat group using the API provided by the chat group based on the extracted information; Among them, the approval result information includes the approver, approval status and approval opinion.