简体   繁体   English

如何获取存储库中在过去 6 个月内未更新/更改的文件列表

[英]How to get the list of files in a repository that have not been updated/changed in the last 6 months

I want to create a report which will contain the name & location of files that have not been updated/changed in the last 6 months.我想创建一个报告,其中包含过去 6 个月内未更新/更改的文件的名称和位置。 I am thinking of writing a script to achieve the report that shall run as scheduled pipeline in gitlab ci.我正在考虑编写一个脚本来实现报告,该报告应在 gitlab ci 中按计划的管道运行。

 - git fetch origin master - git checkout -b master - find python -type f -mtime -2 | tee python.txt

I used the above snippet in the Gitlab CI runner, it returned the files that were not even edited in the last 2 days.我在 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM