[英]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.