当前位置:网站首页>git 提交规范
git 提交规范
2020-11-06 23:23:00 【lemos】
格式
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
type
- feat: 新增/修改功能 (feature)。
- fix: 修補 bug (bug fix)。
- docs: 文件 (documentation)。
- style: 格式 (不影響程式碼運行的變動 white-space, formatting, missing semi colons, etc)。
- refactor: 重構 (既不是新增功能,也不是修補 bug 的程式碼變動)。
- perf: 改善效能 (A code change that improves performance)。
- test: 增加測試 (when adding missing tests)。
- chore: 建構程序或輔助工具的變動 (maintain)。
- revert: 撤銷回覆先前的 commit 例如:revert: type(scope): subject (回覆版本:xxxx)。
示例一:
① docs
docs: 新增註解
docs: 修正型別註解
讓 IDE 可以讀取到正確的類別
docs: 移除過期的註解
issue #1229
② style
style: message 頁面,對 Component 做 Beautifier
經 IE 瀏覽器測試後發現 Component 裡面仍然夾帶 ES6 語法,
但是目前 Component 的程式碼都被壓縮成一行,
為了日後修改程式方便,故先對所有被壓縮的程式碼做 Beautifier
調整項目:
1. 針對所有被壓縮的程式碼做 Beautifier
2. 移除被註解的程式碼,原本被註解的程式碼應該是壓縮前的程式碼,但是經測試後發現這些被註解的程式碼都是舊 Code,故移除。
issue #1219
issue #1028
style: 統一換行符號 CRLF to LF
統一換行符號
style: 調整 HTML 縮排
issue #964
③ chore
chore: 更新 testing 環境
更新 ci-phpunit-test 套件 0.16 => 0.17
for Request GET 帶參數功能。
chore:調整單元測試環境
調整項目:
1. MX/Modules
將客製化 Testing 的邏輯移除,否則在測試環境中無法正確存取檔案。
2. 加入 tests/unit 與 tests/integration 目錄,並將測試檔案移至合宜的位置。
3. AdminTestCase.php,繼承 TestCase,實作登入邏輯、setUp 與 tearDown,供其他測試案例繼承使用。
4. Bootstrap.php,引入 AdminTestCase.php 共測試案例繼承用。
5. Login.php,因測試案例中不能有 header 的設定,更動系統登入邏輯,在測試環境中改用 redirect 轉址。
6. phpunit.xml,取消嚴謹宣告覆蓋模式,避免造成測試不通過(若需知道你的測試案例覆蓋了哪些類別或邏輯,可自行打開)。
## 備註: unit 與 integration 目錄
分別為「單元測試目錄」與「整合測試目錄」,單元測試目錄負責測試 Api 與 Model,整合測試目錄則負責測試 Controller。
issue #709
④ perf
perf: 評核表單列表,優化取得受評者速度
原本取得受評者的邏輯會造成載入頁面緩慢(開發機約 52 秒),故做優化。
調整方式:
原程式碼每個表單迴圈進入 DB 取得受評者資料。
改成
進 DB 一次撈取全部受評者資料,再回到 PHP 分配資料。
結果:
開發機載入頁面時間 52 秒 => 5秒
issue #1272
⑤ refacotr
refactor: 每日通知信件,重構程式結構
考量將來可能會需要寄送多種資訊給使用者,
故重構程式結構,讓未來擴充功能時比較方便。
調整內容:
1. Send_today_notify_mail:
- 把取得「系統通知」邏輯搬移至 System_notify_handler.php
- 把取得「站內訊息」邏輯搬移至 Message_handler.php
- 引入 Pipeline,把取得各種系統資訊的邏輯注入進 Pipeline。
- 透過 Pipeline 取得每日通知信件內容,並建立信件 HTML
2. Daily_email 介面:
- 定義 每日信件處理器 Xxx_handler 的方法
- 之後要擴充新的功能,必須按照 Daily_email 介面的定義,實作方法。
3. message.php、system_notify.php:
- 將「系統通知」與「站內訊息」的 Email 頁面獨立出來。
issue #1308
⑥ feat
feat: 表單統計,多顯示計畫名稱欄位
因應需求做調整:
1. 列表資訊多加「計畫名稱」欄位,以利後續匯出資料處理。
調整項目:
1. Assessment_form.php,匯出表單統計時,新增訓練計畫名欄位。
2. customize.php,表單統計查詢時,多顯示訓練計畫名欄位。
3. Complex_assessment_form_api.php、Complex_assessment_form_model_api.php:
- 取得表單統計資料時,多取得計畫名稱。
issue #1200
⑦ fix
fix: 意見反應,信件看不到圖片問題
問題:
1. 客戶反應:意見反應的信件都看不到圖片。
原因:
1. 目前程式碼都會要求先登入後才可查看使用者上傳的檔案,
造成在信件上會看不見圖片的問題。
調整項目:
1. File.php,經討論後,開放讓意見反應頁面上傳的檔案,不用登入就可以查看/下載。
issue #1229
示例二:
① 文档调整
docs: correct spelling of CHANGELOG
② 包含作用域
feat(lang): add polish language
③ 为 fix 编写的提交说明,包含(可选的) issue 编号
fix: correct minor typos in code
see the issue for details on the typos fixed
closes issue #12
④ 包含了可选的 ! 字符以提醒注意破坏性变更的提交说明
chore!: drop Node 6 from testing matrix
BREAKING CHANGE: dropping Node 6 which hits end of life in April
版权声明
本文为[lemos]所创,转载请带上原文链接,感谢
https://my.oschina.net/lemos/blog/4706955
边栏推荐
- Interviewer: how about shardingsphere
- 高速公路二维码定位报警系统
- Win7 AppCrash (solution)
- Do you really know how to use search engines?
- [graffiti Internet of things footprints] panoramic introduction of graffiti cloud platform
- How to deploy Gantt chart quickly and correctly
- QT audio and video development 46 video transmission UDP version
- PHP后门隐藏技巧
- Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
- Win7 how to quickly type CMD and get to the required directory
猜你喜欢

A good thing for working people -- to temper the will of iron and steel requires such an efficient computer

The 4th China BIM (digital construction) manager Summit Forum will be held in Hangzhou in 2020

Python 3 operates the Jenkins module API

Qt音视频开发46-视频传输UDP版

FreeSWITCH视频会议“标准”解决方案

Windows 10 Bluetooth management page 'add Bluetooth or other devices' option click no response solution

Exclusive interview of guests at | 2020 PostgreSQL Asia Conference: Wang Tao

The Interpreter pattern of behavior pattern

Nonvolatile MRAM memory used in all levels of cache

Python3 operating gitlab
随机推荐
Js数组-数组的用法全在这里(数组方法的重构、数组的遍历、数组的去重,数组的判断与转换)
The isolation level of transaction and its problems
图像处理工具包ImagXpress使用教程,如何查看事件
轻量型 GPU 应用首选 京东智联云推出 NVIDIA vGPU 实例
Three steps to understand Kerberos Protocol easily
2020-08-17: how to solve data skew in detail?
The 4th China BIM (digital construction) manager Summit Forum will be held in Hangzhou in 2020
移动端像素适配方案
Windows 10 Bluetooth management page 'add Bluetooth or other devices' option click no response solution
Stm32f030f4p6 compatible with smart micro mm32f031f4p6
pc端与移动端适配解决方案之rem
image operating system windows cannot be used on this platform
应用层软件开发教父教你如何重构,资深程序员必备专业技能
How does LeadTools detect, read and write barcodes
JS string - string string object method
Stm32f030c6t6 compatible to replace mm32spin05pf
Method of code refactoring -- Analysis of method refactoring
How does varhart xgantt represent working days on a calendar
关于DevOps的七大误解,99%的人都曾中过招!
Git SSH bad permissions