CN108563570A - Method, readable storage medium storing program for executing and the electronic equipment of code process record is automatically stored - Google Patents

Method, readable storage medium storing program for executing and the electronic equipment of code process record is automatically stored Download PDF

Info

Publication number
CN108563570A
CN108563570A CN201810319858.2A CN201810319858A CN108563570A CN 108563570 A CN108563570 A CN 108563570A CN 201810319858 A CN201810319858 A CN 201810319858A CN 108563570 A CN108563570 A CN 108563570A
Authority
CN
China
Prior art keywords
code
information
message
address
time
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.)
Granted
Application number
CN201810319858.2A
Other languages
Chinese (zh)
Other versions
CN108563570B (en
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810319858.2A priority Critical patent/CN108563570B/en
Publication of CN108563570A publication Critical patent/CN108563570A/en
Application granted granted Critical
Publication of CN108563570B publication Critical patent/CN108563570B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a kind of method that code is automatically stored and submits processing record, includes the following steps:Code storage is selected in code management tools, and the trigger event type of code storage is set, and setting information captures the address of transmission service in time;Trigger event associated with the input of operating personnel is received, code storage is triggered, the message comprising code process information is sent to information by address captures transmission service in time;Message is handled;And message is submitted to schedule management tool by treated.The invention further relates to relevant computer readable storage medium and associated electronic devices.

Description

Method, readable storage medium storing program for executing and the electronic equipment of code process record is automatically stored
Technical field
The present invention relates to computer software technical field more particularly to it is a kind of be automatically stored code process record method, And relevant computer readable storage medium and electronic equipment.
Background technology
During software development, the exploitation dimensions such as person works' situation and efficiency are carried out for the ease of administrative staff Assessment, it usually needs developer submits daily paper, weekly or even monthly magazine or annual summary to reflect working condition.But in reality In the operation of border, since program development needs to spend a large amount of energy, so that developer has no time to attend to filling report forms and carries It hands over work, when project demands are more urgent, such case is particularly evident, and certain others odjective causes may also cause Developer's working report is filled in not in time or is failed to fill in, fails to write.Result caused by this way be exactly afterwards hand in process retroactively In, developer can not recall accurate data record, lead to that the report finally summarized can not accurately reflect and measurement is opened The working condition of hair personnel, while administrative staff can not also make developer accurately assessment and weigh.
Therefore, urgent need is a kind of to be collected, handle, record and show to the work detailed content of developer automatically Method.
Invention content
In order to overcome at least one aspect of the above problem, the embodiment of the present invention to provide one kind and code process note is automatically stored Method, computer readable storage medium and the electronic equipment of record.
According to an aspect of the present invention, a kind of method that code process record is automatically stored is provided, is included the following steps:
Select code storage in code management tools, the trigger event type of code storage be set, and setting information and When crawl transmission service address;
Trigger event associated with the input of operating personnel is received, code storage is triggered, will include code process information Message by described address be sent to information in time capture transmission service;
Message is handled;
By treated, message is submitted to schedule management tool.
It is further comprising the steps of after the address that setting information captures transmission service in time according to some embodiments:Root The address for capturing transmission service in time to set information by code management tools according to the trigger event type of setting is sent Network request.
According to some embodiments, recalls information captures transmission service in time when triggering code storage by the trigger event Address.
According to some embodiments, carrying out processing to message includes:
It is filtered to being not required to information to be processed in the message;And
Format conversion is carried out to filtered message.
According to some embodiments, it includes the lattice that will be exported by code management tools to carry out format conversion to filtered message Formula is converted into the acceptable format of schedule management tool.
It, will treated that message is submitted to schedule management tool includes according to some embodiments:
By treated message transformation at the object for meeting format needs, object includes the original attribute letter for submitting information Breath;And
It is inserted objects into according to attribute information in the corresponding position of schedule management tool.
According to some embodiments, code management tools include Gitlab application tools, and information captures transmission services package in time Include Webhook services.
According to some embodiments, schedule management tool includes Google Calendar.
According to another aspect of the present invention, a kind of computer readable storage medium is provided, executable finger is stored thereon with It enables, instruction when executed by the processor, may be implemented that code process note is automatically stored according to any one of above-described embodiment The step of method of record.
According to a further aspect of the invention, a kind of electronic equipment is provided comprising:
Memory, for storing executable instruction;And
Processor, for executing the executable instruction stored in memory, to realize according to any in above-described embodiment The step of method that code process record is automatically stored of item.
Compared with prior art, the present invention has the following advantages:Trigger event type, energy are set in code management tools It is enough that code has been carried out to be notified after specific operation in developer, code process record is automatically stored, subtracts significantly The workload of developer is lacked;And use schedule management tool that can be more convenient and intuitively check and induction data.
Description of the drawings
By the description made for the present invention of below with reference to attached drawing, other objects and advantages of the present invention will be aobvious and easy See, and can help that complete understanding of the invention will be obtained.
Fig. 1 is the overall flow figure for implementing the method according to the ... of the embodiment of the present invention that code process record is automatically stored;
Fig. 2 is the structural schematic diagram of computer readable storage medium according to the ... of the embodiment of the present invention;
Fig. 3 is the structural schematic diagram of electronic equipment according to the ... of the embodiment of the present invention.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art The every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
The term used in embodiments of the present invention is the purpose only merely for description specific embodiment, is not intended to be limiting The present invention.Unless otherwise defined, the technical term or scientific terminology that the present invention uses should be tool in fields of the present invention There is the ordinary meaning that the personage of general technical ability is understood.
The present invention provides a kind of method that code process record is automatically stored, and according to Fig. 1, this method includes following step Suddenly:
S101 selectes code storage in code management tools, the trigger event type of code storage is arranged, and letter is arranged The address of the breath service of crawl transmission in time.
Git and Gitlab is that the code management tools being widely used, especially Gitlab are widely deployed in difference In the internal server of company.In Gitlab, an account can establish multiple projects, for the ease of management code, to every One project all establishes a code storage, in these warehouses, the selected warehouse for needing to track and record code.
Then, setting can trigger the event type in the warehouse in this warehouse, for example, in certain possible embodiments In, the event type for triggering the warehouse may include:Push event (Push events), label event (Tag events), hair Cloth event (Issues events), annotation event (Comment events) and merging request event (Merge request events).Certainly, trigger event type is not limited to above-mentioned event.In this way, when user pushes content to GitLab, can touch Send out push event;When user creates in GitLab or deletes label, label event can be triggered;When user creates new publication Or existing publication can trigger publication event when being updated, close or reopening;When user is in the new annotation of establishment, meeting Trigger annotation event;When user is in the new merging request of establishment, merging request event can be triggered.Other trigger events are also divided It Ju You not corresponding function.
Event type provided with triggering code storage, it is also necessary to which setting information captures the address of transmission service, letter in time The address of the breath service of crawl transmission in time is the notice for receiving event.Here information captures transmission service in time webhook.The webhook functions of Gitlab allow that specific address of service is arranged in specific warehouse, such as can be URL, URL is the abbreviation of uniform resource locator (Uniform Resource Locator), and URL is made of two main parts: Agreement and destination." agreement " is partly the type for illustrating Internet resources.One of the most common agreement is Hyper text transfer Agreement (http), what it indicated to fetch from webpage (Web) is html document.Other agreements also have gopher, ftp and telnet Deng." destination " can be the title of some filename, directory name or certain computer.Here destination can be arranged to Address of service.
In certain possible embodiments, since http defines the distinct methods that software is interacted with server, After capturing transmission address of service in time provided with information, Gitlab can send network request according to the trigger event type of setting The address for capturing transmission service in time to the information of setting, in order to realize the function of URL services.In general, network request Including two ways, one is based on GET request mode, one is based on POST request mode.As its name suggests, GET request side Formula is that data are obtained from server, and POST request mode is to server transmissioning data.For GET request mode, client It needs to submit data, and transmitted data amount at most only 1024 bytes by URL, and the information that GET request is sent is with URL It sends in plain text, parameter can be saved on browser history or web page server, and such information just will produce security risk. And for POST request mode, transmitted data amount is big, even up to 2M, and will not be left on browser or web page server Any trace.Therefore, from the perspective of the safety of the size of transmitted data amount and information, POST request is undoubtedly best Selection.So network request can select POST request.
Gitlab provides abundant trigger event so that geo-statistic developer as detailed as possible is on selected warehouse Operation, thus can be by assessing the development of developer from multiple dimensions.Meanwhile Gitlab Webhook and the URL for receiving event are completely independent, it is only necessary to realize URL services function can, reality entire in this way It is now just relatively sharp and succinct.
S102 receives trigger event associated with the input of operating personnel, triggers code storage, will include code process The message of information is sent to information by address and captures transmission service in time.
Gitlab can real-time reception event, when event arrives, Gitlab can first determine whether the event whether be and operation The associated trigger event of input of personnel, " sending out event with the input associated touch of operating personnel " here is step S101 In the trigger event mentioned, certainly, it is not limited to above-mentioned event type.If not associated with the input of operating personnel Trigger event, Gitlab will abandon it, once and this event is exactly the trigger event class being already provided in step S101 One in type or other meet the event of " associated with the input of operating personnel ", it will trigger selected code storage. In numerous events, most important is exactly code push event, this is also the event that developer most pays close attention to.When selected generation When code warehouse is triggered, the message transmission that information is submitted comprising code can be captured the ground of transmission service in time by Gitlab to information The corresponding service in location that is to say that post messages to the corresponding information of URL captures transmission service in time.In certain possible implementations In example, meeting recalls information captures the address of transmission service in time when event triggers code storage.
The submission information of Gitlab is JSON formats, since the programming language of mainstream supports operation JSON formats, It can select and be familiar with the subsequent processing of ground programming language progress and exploitation.For example, the developer for being familiar with Java can select Java carries out subsequent operation, it is not necessary to be restrained by programming language, to substantially increase the efficiency of project development.
S103 handles message.
The purpose handled message is so that message is succinct and be easy to read.Here, can in time be captured in information The inside for transmitting service carries out respective handling to message, or can also be by subsequent processing routine to being captured in time from information The message of transmission service output is handled.In some possible embodiments, carrying out processing to message includes:To the message In be not required to information to be processed and be filtered;And format conversion is carried out to filtered message." being not required to be processed here Information " refers to the information unrelated with code process, may also be the letter of non-submitter in certain possible embodiments The processing procedure of message is described in detail to filter the information citing of non-submitter below in breath.Include mainly to carry in message The information of friendship person, but since project is frequently not that a people is handled, submitter may be pressed from both sides when submitting information The miscellaneous information of other non-submitters.Due to finally show submission record be about submitter, The information filtering by non-submitter is needed to fall.Commits fields in message have recorded the information of submission in detail, including Content, address, timestamp and the name of submitter of information, mailbox and some other attribute for showing submitter's identity, In commit fields, what is recorded in an author field is the identity information of a particular user, so, it is only necessary to it traverses Commits arrays find the author fields for belonging to submitter, and will be not belonging to submitter's in array element The relevant information of author fields filters out.Certainly, in certain other embodiments, non-submission can not also be filtered out The information of person, but the code process of project record is all put together, it is only necessary to it will be unrelated with code process Information filtering fall.
Since the Gitlab data for passing to by Webhook service are not easy to read, therefore, it is necessary to data into Row processing.Gitlab, which transmits data, a set of rule of oneself, and data processing here is exactly to turn format as defined in Gitlab The format for being easy reading is changed into, consequently facilitating reading.Due to needing to pass data to schedule management tool, thus need by Format conversion as defined in Gitlab is at the acceptable format of schedule management tool.Because the commits fields in message are detailed Ground has recorded the information of submission, therefore only needs commits fields being converted into the acceptable format of schedule management tool.One A typical git submits record as follows:
Author:Try Git < try_git@github.com>
Date:Sat Oct 1008:30:002020-0500
Added cute octocat story
Include the name information and temporal information of submitter in this submission record, and convenient for reading, therefore, It is exactly that commit fields are converted to the similar format convenient for reading in practical operation, for example, it may be string format.
Webhook information is converted to processing mode as the historical record of Git to consult convenient for developer, mistake The submission information for filtering non-submitter can be to avoid the interference of redundancy.
S104, by treated, message is submitted to schedule management tool.
The message that above-mentioned steps are handled well is submitted to schedule management tool, convenient for checking submission on schedule management tool Record, at the same can also on schedule management tool induction data.Here schedule management tool can be analogous to be all kinds of Programming language provides the Google Calendar (Google Calendar) of easy-to-use application programming interfaces, is not limited thereto certainly.
Illustrate that the message that will be handled well is submitted to the detailed process of schedule management tool by taking Google Calendar as an example below.
Because the content added defined in Google Calendar is event, if it is desired to record will be submitted to be added to Google day In going through, it is necessary to record will be submitted to be added to Google Calendar events.In certain possible embodiments, remember submitting Record is added to Google Calendar events and may include steps of:Will treated message transformation at meeting call format Object, object includes the original message submitted after time of message, processing and some other attribute information;Further according to category Property information, such as can be submit message time, insert objects into the corresponding position of calendar.
Google Calendar are the more extensive schedule management tools of purposes, while GoogleCalendar is provided It supports the application programming interfaces of numerous development languages, can thus carry out the docking and extension of function well, utilize simultaneously The form of calendar submits information to show code, extremely can significantly improve the inquiry reading efficiency of data in this way.It will processing Record is submitted to the storage that can also be realized in Google Calendar to data.
Based on same inventive concept, refering to what is shown in Fig. 2, the present invention also provides a kind of computer readable storage medium 201, On be stored with executable instruction 202, executable instruction 202 when executed by the processor, may be implemented according in above-described embodiment Any one of them be automatically stored code process record method the step of.
Based on same inventive concept, refering to what is shown in Fig. 3, the present invention also provides a kind of electronic equipment 301, the electronic equipment 301 include:
Memory 310 is used to store executable instruction 311;And
Processor 320 is used to execute the executable instruction 311 stored in memory 310, to realize such as above-described embodiment Any one of described in be automatically stored code process record method the step of.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, it will be understood by those of ordinary skill in the art that:It still may be used With technical scheme described in the above embodiments is modified or equivalent replacement of some of the technical features; And these modifications or replacements, various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of method that code process record is automatically stored, which is characterized in that include the following steps:
Code storage is selected in code management tools, and the trigger event type of code storage is set, and setting information is grabbed in time The address for taking transmission to service;
Trigger event associated with the input of operating personnel is received, the code storage is triggered, will include code process information Message by described address be sent to described information in time capture transmission service;
The message is handled;And
By treated, the message is submitted to schedule management tool.
2. according to the method described in claim 1, it is characterized in that, after the address that setting information captures transmission service in time It is further comprising the steps of:It is grabbed in time to set information by the code management tools according to the trigger event type of setting The address that transmission services is taken to send network request.
3. according to the method described in claim 1, it is characterized in that, passing through tune when the trigger event triggering code storage Capture the address of transmission service in time with described information.
4. according to the method described in claim 1, it is characterized in that, to the message carry out processing include:
It is filtered to being not required to information to be processed in the message;And
Format conversion is carried out to filtered message.
5. according to the method described in claim 4, it is characterized in that, to filtered message carry out format conversion include will be by institute The format conversion of code management tools output is stated into the acceptable format of schedule management tool.
6. according to the method described in claim 1, it is characterized in that, the message is submitted to schedule management tool by treated Including:
By treated message transformation at the object for meeting format needs, the object includes the original attribute letter for submitting information Breath;And
The object is inserted into the corresponding position of schedule management tool according to the attribute information.
7. according to the method described in claim 1, it is characterized in that, the code management tools include Gitlab application tools, It includes Webhook services that described information captures transmission service in time.
8. according to the method described in claim 1, it is characterized in that, the schedule management tool includes Google Calendar.
9. a kind of computer readable storage medium, is stored thereon with executable instruction, described instruction is when executed by the processor, real Now according to any one of claim 1-8 be automatically stored code process record method the step of.
10. a kind of electronic equipment, including:
Memory, for storing executable instruction;And
Processor, for executing the executable instruction stored in the memory, to realize according to any one of claim 1-8 The step of described method that code process record is automatically stored.
CN201810319858.2A 2018-04-10 2018-04-10 Method for automatically storing code processing record, readable storage medium and electronic device Active CN108563570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810319858.2A CN108563570B (en) 2018-04-10 2018-04-10 Method for automatically storing code processing record, readable storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810319858.2A CN108563570B (en) 2018-04-10 2018-04-10 Method for automatically storing code processing record, readable storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN108563570A true CN108563570A (en) 2018-09-21
CN108563570B CN108563570B (en) 2022-02-08

Family

ID=63534746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810319858.2A Active CN108563570B (en) 2018-04-10 2018-04-10 Method for automatically storing code processing record, readable storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN108563570B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109976800A (en) * 2019-03-28 2019-07-05 北京字节跳动网络技术有限公司 Message informing method, device, equipment and storage medium based on Gitlab
CN110674035A (en) * 2019-09-12 2020-01-10 上海麦克风文化传媒有限公司 Automatic code scanning method, system, device and storage medium
CN111326035A (en) * 2018-12-13 2020-06-23 腾讯科技(深圳)有限公司 Task synchronization method and remote teaching system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461671A (en) * 2014-12-05 2015-03-25 闻泰通讯股份有限公司 Method and system for periodically managing code modification report
US20150094150A1 (en) * 2013-09-30 2015-04-02 Zynga Inc. Operation of a browser-incompatible application within a browser
CN107025112A (en) * 2017-04-10 2017-08-08 丹露成都网络技术有限公司 A kind of supervision and tracking based on git hooks and bug management tool
US20180084086A1 (en) * 2016-09-19 2018-03-22 Palantir Technologies Inc. Version control machine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150094150A1 (en) * 2013-09-30 2015-04-02 Zynga Inc. Operation of a browser-incompatible application within a browser
CN104461671A (en) * 2014-12-05 2015-03-25 闻泰通讯股份有限公司 Method and system for periodically managing code modification report
US20180084086A1 (en) * 2016-09-19 2018-03-22 Palantir Technologies Inc. Version control machine
CN107025112A (en) * 2017-04-10 2017-08-08 丹露成都网络技术有限公司 A kind of supervision and tracking based on git hooks and bug management tool

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
MIRACLEDAN: ""使用Git webhook来展示项目提交记录"", 《SEGMENTFAULT思否 HTTPS://SEGMENTFAULT.COM/A/1190000003803848》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111326035A (en) * 2018-12-13 2020-06-23 腾讯科技(深圳)有限公司 Task synchronization method and remote teaching system
CN109976800A (en) * 2019-03-28 2019-07-05 北京字节跳动网络技术有限公司 Message informing method, device, equipment and storage medium based on Gitlab
CN110674035A (en) * 2019-09-12 2020-01-10 上海麦克风文化传媒有限公司 Automatic code scanning method, system, device and storage medium

Also Published As

Publication number Publication date
CN108563570B (en) 2022-02-08

Similar Documents

Publication Publication Date Title
CN101651707B (en) Method for automatically acquiring user behavior log of network
CN105243159B (en) A kind of distributed network crawler system based on visualization script editing machine
US8769432B1 (en) Method and system for a browser module
US8566358B2 (en) Framework to populate and maintain a service oriented architecture industry model repository
CN106126648B (en) It is a kind of based on the distributed merchandise news crawler method redo log
CN108563570A (en) Method, readable storage medium storing program for executing and the electronic equipment of code process record is automatically stored
US8838627B2 (en) Systems and methods for providing template based output management
CN101821709A (en) System, method and graphical user interface for workflow generation, deployment and/or execution
CN101821710A (en) System, method and graphical user interface for workflow generation, deployment and/or execution
CN101986292A (en) Method and system for processing forms based on an image
US10169037B2 (en) Identifying equivalent JavaScript events
CN108765113A (en) A kind of examination of invoice, reimbursement, management system
US20230376621A1 (en) Transaction Document Management System And Method
Winckler et al. An approach and tool support for assisting users to fill-in web forms with personal information
Zuzak et al. A finite-state machine approach for modeling and analyzing restful systems
CN109241384A (en) A kind of method for visualizing and device of scientific research information
CN110222253A (en) A kind of collecting method, equipment and computer readable storage medium
CN112395485A (en) Policy big data mining method and device, computer equipment and storage medium
CN111797297A (en) Page data processing method and device, computer equipment and storage medium
CA2428240A1 (en) System and method for interfacing a data processing system to a business-to-business integration system
CN110516185A (en) The processing method and processing device of dynamic website
US7590634B2 (en) Detection of inaccessible resources
CN110020050B (en) Method for realizing intelligent capture rule configuration technology based on standard documents
Hansson et al. An application for the tracking and administration of work tools
Morales et al. Crawling Based Data Collection and Data Pre-processing

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
GR01 Patent grant
GR01 Patent grant