[英]How to get the list of files in a repository that have not been updated/changed in the last 6 months
我想創建一個報告,其中包含過去 6 個月內未更新/更改的文件的名稱和位置。 我正在考慮編寫一個腳本來實現報告,該報告應在 gitlab ci 中按計划的管道運行。
- git fetch origin master - git checkout -b master - find python -type f -mtime -2 | tee python.txt
我在 Gitlab CI 運行器中使用了上面的代碼片段,它返回了過去 2 天甚至沒有編輯過的文件。
create-depreciated-report: script: - git fetch --unshallow - yum -y install git-tools - git restore-mtime - find. -type f -mtime +180 | tee report.txt artifacts: name: Deprecated files paths: - 'report.txt'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.