Skip to content
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

Introduce EditAttempt enum #2242

Merged
merged 5 commits into from
Sep 23, 2021
Merged

Introduce EditAttempt enum #2242

merged 5 commits into from
Sep 23, 2021

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Sep 22, 2021

This introduces the EditAttempt enum for the different types of edits Scala Steward can do in a PR: version bumps, Scalafix changes, and post-update hooks changes. The purpose of this change is that we can in the future use the list of EditAttempts returned by EditAlg to create more faithful PR bodies that better reflect what Scala Steward did: for example only mention Scalafix migrations if they result in changes, indicate if a Scalafix migration failed, or add labels for post-update hooks., etc.

@fthomas fthomas added this to the 0.11.0 milestone Sep 22, 2021
@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #2242 (5b3e881) into master (4c9c1a0) will increase coverage by 0.08%.
The diff coverage is 57.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2242      +/-   ##
==========================================
+ Coverage   78.23%   78.31%   +0.08%     
==========================================
  Files         131      132       +1     
  Lines        2265     2283      +18     
  Branches       48       57       +9     
==========================================
+ Hits         1772     1788      +16     
- Misses        493      495       +2     
Impacted Files Coverage Δ
...scala/org/scalasteward/core/edit/EditAttempt.scala 0.00% <0.00%> (ø)
...ala/org/scalasteward/core/nurture/NurtureAlg.scala 0.00% <0.00%> (ø)
...ain/scala/org/scalasteward/core/edit/EditAlg.scala 59.37% <75.00%> (+0.75%) ⬆️
...rg/scalasteward/core/edit/hooks/HookExecutor.scala 93.10% <100.00%> (ø)
...calasteward/core/vcs/data/NewPullRequestData.scala 100.00% <100.00%> (ø)
.../main/scala/org/scalasteward/core/io/package.scala 100.00% <0.00%> (ø)
...scala/org/scalasteward/core/scalafmt/package.scala 100.00% <0.00%> (ø)
...a/org/scalasteward/core/edit/UpdateHeuristic.scala 98.87% <0.00%> (+0.03%) ⬆️
...org/scalasteward/core/buildtool/mill/MillAlg.scala 86.95% <0.00%> (+0.59%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c9c1a0...5b3e881. Read the comment docs.

@@ -42,7 +41,6 @@ final class NurtureAlg[F[_]](config: Config)(implicit
gitAlg: GitAlg[F],
logger: Logger[F],
pullRequestRepository: PullRequestRepository[F],
scalafixMigrationsFinder: ScalafixMigrationsFinder,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That we can get rid of ScalafixMigrationsFinder in NurtureAlg is what I like most about this change.

@fthomas fthomas merged commit a890c3d into master Sep 23, 2021
@fthomas fthomas deleted the topic/EditCommit branch September 23, 2021 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant