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

Complement SCM URL with Scaladex #837

Closed
wants to merge 6 commits into from

Conversation

exoego
Copy link
Contributor

@exoego exoego commented Aug 16, 2019

Unfortuately, number of pom.xml without SCM URL are not small.
Therefore Scala Steward can not include URL/diff URL in PR for such artifacts.

Scaladex neatly know SCM URLs even if pom.xml lacks it.
So let's use Scaladex as a second resource.
Original idea: #82 (comment).

This is not perferct solution since Scaladex do not index non-Scala artifacts (e.g. aws-sdk-java), but definitely improve situations !!

Notes

Only artifact id is used as search query, since the below Scaladex issues.
scalacenter/scaladex#577
scalacenter/scaladex#578

Example PRs

Artifact Before (no URL or homepage) After (have SCM URL from Scaladex)
sbt-scalatra exoego/scala-steward-test-project#39 exoego/scala-steward-test-project#62
sbt-scalajs-crossproject exoego/scala-steward-test-project#37 exoego/scala-steward-test-project#59
scalatest exoego/scala-steward-test-project#56 exoego/scala-steward-test-project#61

@exoego exoego changed the title Url from scaladex Complement pom.xml from Scaladex Aug 16, 2019
@exoego exoego changed the title Complement pom.xml from Scaladex Complement SCM URL from Scaladex Aug 16, 2019
@codecov
Copy link

codecov bot commented Aug 16, 2019

Codecov Report

Merging #837 into master will increase coverage by 0.49%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #837      +/-   ##
==========================================
+ Coverage    66.3%   66.79%   +0.49%     
==========================================
  Files          87       92       +5     
  Lines        1279     1265      -14     
  Branches       29       36       +7     
==========================================
- Hits          848      845       -3     
+ Misses        431      420      -11
Impacted Files Coverage Δ
...la/org/scalasteward/core/application/Context.scala 0% <ø> (ø) ⬆️
...ala/org/scalasteward/core/nurture/NurtureAlg.scala 0% <0%> (ø) ⬆️
...calasteward/core/scaladex/HttpScaladexClient.scala 100% <100%> (ø)
...ain/scala/org/scalasteward/core/util/package.scala 100% <100%> (ø) ⬆️
.../org/scalasteward/core/nurture/UrlMappingAlg.scala 100% <100%> (ø)
...scala/org/scalasteward/core/scaladex/package.scala 100% <100%> (ø)
...a/org/scalasteward/core/scaladex/ScaladexAlg.scala 100% <100%> (ø)
...main/scala/org/scalasteward/core/vcs/package.scala 94.44% <50%> (+32.9%) ⬆️
.../core/repocache/json/JsonRepoCacheRepository.scala 0% <0%> (-45.46%) ⬇️
...main/scala/org/scalasteward/core/util/logger.scala 0% <0%> (-36.37%) ⬇️
... and 26 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 4b85e13...b3b7bdd. Read the comment docs.

@exoego exoego changed the title Complement SCM URL from Scaladex Complement SCM URL with Scaladex Aug 16, 2019
@exoego exoego force-pushed the url-from-scaladex branch 2 times, most recently from 29df383 to 7ae71f2 Compare August 16, 2019 06:27
@exoego
Copy link
Contributor Author

exoego commented Aug 16, 2019

29df383 attempted to fix "Regex DoS" issue found in Codacy quality review, but the issue remained (maybe false-positive).
So reverted to keep implementation simple.

@fthomas
Copy link
Member

fthomas commented Sep 12, 2019

I like the idea! One thing I'm wondering is if we could use Scaldex' API instead of using regexes on its HTML pages?

@exoego
Copy link
Contributor Author

exoego commented Sep 12, 2019

I also prefer using API but could not find API client nor document.
Do you know?

@fthomas
Copy link
Member

fthomas commented Sep 12, 2019

I've not seen an overview, but at least this endpoint exists: https://index.scala-lang.org/api/search?q=refined&target=JVM&scalaVersion=2.12
Maybe there are others which could be useful for our purpose.

@exoego exoego closed this Oct 15, 2019
@exoego exoego deleted the url-from-scaladex branch October 15, 2019 07:59
@exoego exoego restored the url-from-scaladex branch October 15, 2019 08:02
@exoego
Copy link
Contributor Author

exoego commented Oct 15, 2019

Oops, I wrongly deleted the branch.
I will revisit this feature using Scaladex API.

@fthomas
Copy link
Member

fthomas commented Oct 15, 2019

I think this would be useful even if we can't use the API. But if we add it, #941 will become more important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants