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

Support reading a default repo config from this repository #2337

Merged
merged 13 commits into from
Nov 10, 2021

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Nov 9, 2021

This adds support for reading a defaultl repo config from this repository. Multiple repo configs can be loaded per Scala Steward installation with the --repo-config command-line option and are merged into one effective global repo config. Loading the default repo config from this repository can be disabled with --disable-default-repo-config. This is similar to the handling of Scalafix and artifact migrations config files.

The purpose of this change is to allow library maintainers to tell Scala Steward to ignore updates until a new version is announced (#1104). They can do this by adding new entries to the updates.ignore list of the default repo config. All (public and private) Scala Steward installations that do not opt-out of loading the default repo config will then ignore the added updates until the default repo config is changed again.

The default repo config also contains ignored updates that were previously removed by FilterAlg.removeBadVersions. So this function was just a default updates.ignore list in disguise.

Note also that this is a breaking change for users that are using the old --default-repo-conf option. --repo-config is a drop-in replacement for that option.

@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Merging #2337 (8d3bfbd) into master (c2b9977) will increase coverage by 0.48%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2337      +/-   ##
==========================================
+ Coverage   79.71%   80.19%   +0.48%     
==========================================
  Files         137      138       +1     
  Lines        2406     2404       -2     
  Branches       56       57       +1     
==========================================
+ Hits         1918     1928      +10     
+ Misses        488      476      -12     
Impacted Files Coverage Δ
.../scala/org/scalasteward/core/application/Cli.scala 96.15% <ø> (ø)
...org/scalasteward/core/repocache/RepoCacheAlg.scala 0.00% <0.00%> (ø)
...ala/org/scalasteward/core/application/Config.scala 97.67% <100.00%> (+0.11%) ⬆️
...la/org/scalasteward/core/application/Context.scala 73.84% <100.00%> (+0.83%) ⬆️
...ain/scala/org/scalasteward/core/data/package.scala 100.00% <100.00%> (ø)
.../core/edit/scalafix/ScalafixMigrationsLoader.scala 100.00% <100.00%> (ø)
.../org/scalasteward/core/repoconfig/RepoConfig.scala 100.00% <100.00%> (ø)
...g/scalasteward/core/repoconfig/RepoConfigAlg.scala 100.00% <100.00%> (ø)
...calasteward/core/repoconfig/RepoConfigLoader.scala 100.00% <100.00%> (ø)
...g/scalasteward/core/repoconfig/UpdatePattern.scala 100.00% <100.00%> (ø)
... and 2 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 aee53fe...8d3bfbd. Read the comment docs.

@fthomas fthomas linked an issue Nov 9, 2021 that may be closed by this pull request
@fthomas fthomas added this to the 0.14.0 milestone Nov 9, 2021
@fthomas fthomas added the enhancement New feature or request label Nov 9, 2021
@fthomas fthomas changed the title Support reading a global repo config Support reading a default repo config from this repo Nov 10, 2021
@fthomas fthomas changed the title Support reading a default repo config from this repo Support reading a default repo config from this repository Nov 10, 2021
@fthomas fthomas marked this pull request as ready for review November 10, 2021 04:21
@fthomas fthomas merged commit 788ff27 into master Nov 10, 2021
@fthomas fthomas deleted the topic/global-repo-config branch November 10, 2021 12:35
@eugeniyk
Copy link
Contributor

Is there a way to disable fetching default configuration from github? With on-prem & firewall rules new version can't be run

@fthomas
Copy link
Member Author

fthomas commented Nov 16, 2021

@eugeniyk Yes, with --disable-default-repo-config Scala Steward should not fetch the default config from GitHub.

@eugeniyk
Copy link
Contributor

ah ok, thanks!

rtyley added a commit to rtyley/scala-steward that referenced this pull request Feb 14, 2024
We're already seeing Scala Steward raise PRs for Scala 3.4.0, this might be unintentional?

guardian/play-secret-rotation#432

See also scala-steward-org#2337 & scala-steward-org#1104
mzuehlke pushed a commit that referenced this pull request Feb 14, 2024
We're already seeing Scala Steward raise PRs for Scala 3.4.0, this might be unintentional?

guardian/play-secret-rotation#432

See also #2337 & #1104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wait for release announcement before creating PRs
3 participants