-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip abandoned repos #3559
base: main
Are you sure you want to change the base?
Skip abandoned repos #3559
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3559 +/- ##
==========================================
+ Coverage 89.81% 89.84% +0.02%
==========================================
Files 171 171
Lines 4988 5011 +23
Branches 495 494 -1
==========================================
+ Hits 4480 4502 +22
- Misses 508 509 +1 ☔ View full report in Codecov by Sentry. |
2ea5470
to
969d2e7
Compare
969d2e7
to
fb06636
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a small change to add such a valuable feature 👍
Not sure where, but would be good to add a note about this feature.
Maybe a short above the value in default.scala-steward.conf
?
And 18 month of inactivity ? I think I would have choosen at most 12 month. But I have no clue if this would be too short.
Just checked, the public instance check uses 24 month: https://github.com/VirtusLab/scala-steward-repos/blob/main/scripts/test-repos.scala#L32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome.
I feel 540 days is very tolerant but fine.
It is common not to touch repo in maintenance-mode for months in work😌
Dependabot: 90 days
https://docs.github.com/en/code-security/dependabot/working-with-dependabot/managing-pull-requests-for-dependency-updates
This implements the idea proposed in #3554 to stop creating wasted PRs by skipping repos whose last commit is older than a configured threshold. The PR contains these changes:
GitAlg.getCommitDate
which returns the commit date asTimestamp
of a given SHA-1RepoCache.commitDate: Timestamp
field that contains the commit date that corresponds toRepoCache.sha1
RepoConfig.lastCommitMaxAge: Option[FiniteDuration]
field that contains the threshold for deciding if a repo should be skipped. A repo is skipped, if the last commit is greater than thisFiniteDuration
.lastCommitMaxAge
is added to the default Scala Steward config. Other Scala Steward instances and every repo can override this with a greater value. It is not possible to unset it or override it with a smaller value.RepoCache.checkCache
is modified such that after retrieving a fresh cache, the commit date is compared tolastCommitMaxAge
and an error is raised eventuallyNotes:
RepoCache
means that reading an old cache will log an error like this:Fortunately this is only a log message so that Scala Steward will recompute the
RepoCache
and proceed as normal then. Adding this field is therefore effectively invalidating allRepoCache
s out there.lastCommitMaxAge
was set to 2 days in this case.Closes: #3554