Giter Site home page Giter Site logo

scala-steward-org / scala-steward-action Goto Github PK

View Code? Open in Web Editor NEW
136.0 136.0 44.0 17.22 MB

A Github Action to launch Scala Steward in your repository

License: Apache License 2.0

TypeScript 100.00%
actions dependency-updates github-actions scala scala-steward

scala-steward-action's People

Contributors

alejandrohdezma avatar anatoliykmetyuk avatar arashi01 avatar armanbilge avatar bpg avatar ckipp01 avatar counter2015 avatar dependabot-preview[bot] avatar dependabot[bot] avatar ewouth avatar exoego avatar fabiopinheiro avatar fthomas avatar github-actions[bot] avatar jeffboutotte avatar laughedelic avatar lgmyrek avatar mdedetrich avatar mpv avatar mzuehlke avatar regadas avatar rtyley avatar ryota0624 avatar specialthing44 avatar toniogela avatar tovbinm avatar wunderk1nd-e avatar xuwei-k avatar ybasket avatar yokra9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scala-steward-action's Issues

Github entreprise repository url

Hi,

I'm facing an issue when executing scala steward action in github enterprise. I have set the github-api-url parameter to the correct one but by the end the final url generated is:
${github-repository}/repos/${github-repository} instead of ${github-repository}/${github-repository}
Why "repos" is added ?
I found no parameter in the documentation to remove "repos"
Is there any solution for this ?

Can't find repos.md

# This workflow will launch at 00:00 every Sunday
name: ScalaSteward

on:
  schedule:
    - cron: '0 0 * * 0'
  workflow_dispatch:

jobs:
  scala-steward:
    runs-on: ubuntu-latest
    name: Launch Scala Steward
    steps:
      - name: Launch Scala Steward
        uses: scala-steward-org/scala-steward-action@v2
        with:
          github-token: ${{ secrets.REPO_GITHUB_TOKEN }}
          repos-file: 'repos.md'
          author-email: ${{ secrets.EMAIL }}
Error:  ✕ The path indicated in `repos-file` (repos.md) does not exist

repo link:
https://github.com/bilal-fazlani/scala-steward-repo

GPG commit signing fails with java.io.IOException

I've set up a scala-steward workflow to sign commits but I am getting the below error and am unable to debug. All the keys are found and loaded correctly but it is unable to sign and errors out with java.io.IOException

Run scala-steward-org/scala-steward-action@v2
  with:
    github-token: ***
    signing-key: ...
    sign-commits: true
    author-email: ...
    author-name: Affine Health
    ignore-opts-files: true
    cache-ttl: 2hours
    coursier-cli-url: https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz
    github-api-url: https://api.github.com
    github-app-auth-only: false
    github-repository: affinehealth/ProviderData
    mill-version: 0.10.9
    repo-config: .github/.scala-steward.conf
    timeout: 20min
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/11.0.17-8/x64
    JAVA_HOME_11_X64: /opt/hostedtoolcache/Java_Adopt_jdk/11.0.17-8/x64

... 

Launching scala-steward
 2023-01-16 21:45:00,425 INFO   
   ____            _         ____  _                             _
  / ___|  ___ __ _| | __ _  / ___|| |_ _____      ____ _ _ __ __| |
  \___ \ / __/ _` | |/ _` | \___ \| __/ _ \ \ /\ / / _` | '__/ _` |
   ___) | (_| (_| | | (_| |  ___) | ||  __/\ V  V / (_| | | | (_| |
  |____/ \___\__,_|_|\__,_| |____/ \__\___| \_/\_/ \__,_|_|  \__,_|
  v0.20.0
  
 2023-01-16 21:45:01,710 INFO  Loaded 101 artifact migration(s)
 2023-01-16 21:45:01,902 INFO  Loaded 30 Scalafix migration(s)
 2023-01-16 21:45:02,005 INFO  Loaded 1 repo config(s)
 2023-01-16 21:45:02,335 INFO  Run self checks
 2023-01-16 21:45:02,349 INFO  Using git version 2.39.0
 2023-01-16 21:45:03,031 INFO  Using scalafix 0.10.4
 2023-01-16 21:45:03,770 INFO  Using scalafmt 3.6.1
 2023-01-16 21:45:04,124 INFO  Clean /home/runner/scala-steward/workspace/repos
 2023-01-16 21:45:04,172 INFO  ──────────── Steward affinehealth/ProviderData ────────────
 2023-01-16 21:45:04,175 INFO  Check cache of affinehealth/ProviderData
 2023-01-16 21:45:04,729 INFO  Find updates for affinehealth/ProviderData
 2023-01-16 21:45:06,323 INFO  Ignore com.typesafe.slick:(slick, slick_2.12) : 3.4.1 -> 3.5.0-M1 (reason: no suitable next version)
 2023-01-16 21:45:06,324 INFO  Ignore com.typesafe.slick:(slick-hikaricp, slick-hikaricp_2.12) : 3.4.1 -> 3.5.0-M1 (reason: no suitable next version)
 2023-01-16 21:45:06,441 INFO  Found 12 updates:
   io.netty:netty-all : 4.1.50.Final -> 4.1.87.Final
   org.scalactic:(scalactic, scalactic_2.12) : 3.2.14 -> 3.2.15
   org.scalatest:(scalatest, scalatest_2.12) : 3.2.14 -> 3.2.15
   org.wartremover:sbt-wartremover : 3.0.6 -> 3.0.9
   org.wartremover:(wartremover, wartremover_2.12.17) : 3.0.6 -> 3.0.9
   com.eed3si9n:sbt-assembly : 2.0.0 -> 2.1.0
   org.apache.spark:(spark-core, spark-core_2.12) : 3.2.2 -> 3.2.3
   org.apache.spark:(spark-sql, spark-sql_2.12) : 3.2.2 -> 3.2.3
   org.apache.spark:(spark-streaming, spark-streaming_2.12) : 3.2.2 -> 3.2.3
   org.scala-lang:scala-library : 2.12.17 -> 2.13.10
   org.scala-sbt:sbt : 1.7.2 -> 1.7.3
   org.scalameta:sbt-scalafmt : 2.4.5 -> 2.5.0
 2023-01-16 21:45:06,458 INFO  affinehealth/ProviderData is outdated:
   new version: io.netty:netty-all : 4.1.50.Final -> 4.1.87.Final
   new version: org.scalactic:(scalactic, scalactic_2.12) : 3.2.14 -> 3.2.15
   new version: org.scalatest:(scalatest, scalatest_2.12) : 3.2.14 -> 3.2.15
   new version: org.wartremover:(wartremover, wartremover_2.12.17) : 3.0.6 -> 3.0.9
   new version: org.wartremover:sbt-wartremover : 3.0.6 -> 3.0.9
 2023-01-16 21:45:06,461 INFO  Nurture affinehealth/ProviderData
 2023-01-16 21:45:06,467 INFO  Clone affinehealth/ProviderData
 2023-01-16 21:45:06,979 INFO  Found 4 updates:
   io.netty:netty-all : 4.1.50.Final -> 4.1.87.Final
   org.scalactic:(scalactic, scalactic_2.12) : 3.2.14 -> 3.2.15
   org.scalatest:(scalatest, scalatest_2.12) : 3.2.14 -> 3.2.15
   org.wartremover:{sbt-wartremover, (wartremover, wartremover_2.12.17)} : 3.0.6 -> 3.0.9
 2023-01-16 21:45:06,994 INFO  Process update io.netty:netty-all : 4.1.50.Final -> 4.1.87.Final
 2023-01-16 21:45:07,364 INFO  Create branch update/netty-all-4.1.87.Final
 2023-01-16 21:45:08,590 ERROR Steward affinehealth/ProviderData failed
 java.io.IOException: 'GIT_ASKPASS=/home/runner/scala-steward/askpass.sh "SBT_OPTS=-Xmx2048m -Xss8m -XX:MaxMetaspaceSize=512m" git -c core.hooksPath=/dev/null commit --all --gpg-sign -m Update netty-all to 4.1.87.Final' exited with code 128
 error: gpg failed to sign the data
 fatal: failed to write commit object
 
  at org.scalasteward.core.io.process$.$anonfun$slurp$9(process.scala:54)
  at org.scalasteward.core.io.process$.$anonfun$slurp$9$adapted(process.scala:50)
  at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
  at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
  at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
  at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
  at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
  at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
  at modify @ fs2.internal.Scope.close(Scope.scala:262)
  at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
  at rethrow$extension @ fs2.Compiler$Target.$anonfun$compile$1(Compiler.scala:157)
  at get @ fs2.internal.Scope.openScope(Scope.scala:281)
  at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
  at flatMap @ fs2.Pull$.$anonfun$compile$21(Pull.scala:1209)
  at update @ fs2.internal.Scope.releaseChildScope(Scope.scala:224)
  at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
 2023-01-16 21:45:08,594 INFO  ──────────── Total time: Steward affinehealth/ProviderData: 4s 421ms ────────────
 2023-01-16 21:45:08,596 INFO  ──────────── Total time: run: 6s 264ms ────────────
✕ Launching scala-steward failed

Workflow

name: Launch Scala Steward

# This workflow will run Scala Steward and determine if any dependencies need to be updated.
# Because we want all workflows to also run on PRs submitted by Scala Steward a Personal Access Token MUST be used.
# Beware that using the Personal Access Token will make it look like it's you who submitted all the PRs.
# The workaround for this is to create a separate GitHub account for the Action and give it the Collaborator
# permission in the repository or repositories you wish to update.

on:
  pull_request:
    paths:
      - "**.sbt"
      - ".github/workflows/scala-steward.yml"
  schedule:
    # This workflow will launch at 00:00 every Sunday
           # ┌───────────── minute (0 - 59)
           # │ ┌───────────── hour (0 - 23)
           # │ │ ┌───────────── day of the month (1 - 31)
           # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
           # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
           # │ │ │ │ │
           # │ │ │ │ │
           # │ │ │ │ │
           # * * * * *
    - cron: '0 0 * * 0'
  workflow_dispatch:

jobs:
  scala-steward:
    runs-on: ubuntu-latest
    name: Launch Scala Steward
    steps:
      - uses: actions/checkout@v3
      - name: Set up JDK
        uses: actions/setup-java@v3
        with:
          distribution: adopt
          java-version: 11
          cache: sbt
      - name: Import GPG key
        id: import_gpg
        uses: crazy-max/ghaction-import-gpg@v5
        with:
          gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
          passphrase: ${{ secrets.PASSPHRASE }}
          git_user_signingkey: true
      - name: Launch Scala Steward
        uses: scala-steward-org/scala-steward-action@v2
        with:
          github-token: ${{ secrets.REPO_GITHUB_TOKEN }}
          signing-key: ${{ steps.import_gpg.outputs.keyid }}
          sign-commits: true
          # By default, Scala Steward will use the email/name of the user that created the token added
          # in github-token, override that behavior and use author-email/author-name inputs from GPG key
          author-email: ${{ steps.import_gpg.outputs.email }}
          author-name:  ${{ steps.import_gpg.outputs.name }}
          # By default, Scala Steward will ignore "opts" files (such as .jvmopts or .sbtopts)
          # when found on repositories, to disable this feature set ignore-opts-files: false.
          # This is placed here with the default value as not to forget about it when
          # using (.jvmopts or .sbtopts)
          ignore-opts-files: true

Define multiple project subdirectories

Hey,

I have a repo that contains several sbt projects in multiple subdirectories. This action currently fails with:

plugins;stewardDependencies' exited with code 1
  /root/scala-steward/workspace/repos/myorg/myrepo doesn't appear to be an sbt project.
  If you want to start sbt anyway, run:
    /root/bin/sbt -sbt-create

Is it possible to make scala steward run in each one of the subdirectory independent projects?

Cheers, and thanks for the great project!

pre script fails on runners without pre-installed JVM

It seems like #427 broke running Scala Steward on runners where no JVM is pre-installed, but only installed during the job itself, like in this workflow:

jobs:
  scala-steward:
    runs-on: [self-hosted, dev]
    name: Launch Scala Steward
    steps:
      - name: Checkout project
        uses: actions/checkout@v3
        with:
          token: ${{ secrets.GH_BOT_PAT }}
      - name: Setup JDK & Scala
        uses: olafurpg/setup-scala@v13
        with:
          java-version: temurin@17
      - name: Launch Scala Steward
        uses: scala-steward-org/scala-steward-action@v2
        with:
          ...

Is there a way to opt-out of having pre requiring coursier already or could one reasonably be added? I see no (easy) way to run something before that pre script and the runners are shared across an enterprise, getting a JVM installed there has some drawbacks.

Create a proper GitHub App?

(This is more a question than an issue)

Currently, the setup instructions tell you to create either a GitHub App or a personal GitHub token. When using a personal token, Scala Steward submits pull requests on behalf of your account, which is not great. This issue is solved with the GitHub App approach, however that approach is a bit cumbersome (the users have to follow the full process for creating the app and store the private key somewhere to be able to reuse it on every repository they want to apply the action to).

It seems possible to create a “global” Scala Steward app that everyone could install on their repositories. With this approach, the users would not have to create tokens or apps, they would only install the app on their repositories, and then create a workflow that uses it, and the workflow would submit the PRs on behalf of the app. This is for instance what is done in this example app: probot/example-github-action#1 (comment). The comment has been posted by the workflow, on behalf of the “github-actions” app.

Would you be interested in giving a try to this approach?

Action failing with "java.lang.NoClassDefFoundError: scala/Serializable"

Hi,

I just added the following action to a private Github repo:

---
name: Launch Scala Steward

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]
  schedule:
    - cron: '0 0 * * 0'

jobs:
  scala-steward:
    runs-on: ubuntu-latest
    name: Launch Scala Steward
    steps:
      - name: Launch Scala Steward
        uses: scala-steward-org/scala-steward-action@v2
        with:
          github-token: ${{ github.token }}

The action fails as below:

  2021-05-03 10:22:07,921 ERROR Steward XXX/YYY failed
  java.io.IOException: '"SBT_OPTS=-Xmx2048m -Xss8m -XX:MaxMetaspaceSize=512m" sbt -Dsbt.color=false -Dsbt.log.noformat=true -Dsbt.supershell=false ;+ stewardDependencies;reload plugins;stewardDependencies' exited with code 1
  copying runtime jar...
  [info] [launcher] getting org.scala-sbt sbt 1.4.2  (this may take some time)...
  [info] [launcher] getting Scala 2.13.3 (for sbt)...
  java.lang.NoClassDefFoundError: scala/Serializable
  	at sbt.internal.ClassLoaderWarmup$.warmup(XMainConfiguration.scala:31)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  	at sbt.internal.XMainConfiguration.run(XMainConfiguration.scala:82)
  	at sbt.xMain.run(Main.scala:46)
  	at xsbt.boot.Launch$.$anonfun$run$1(Launch.scala:149)
  	at xsbt.boot.Launch$.withContextLoader(Launch.scala:176)
  	at xsbt.boot.Launch$.run(Launch.scala:149)
  	at xsbt.boot.Launch$.$anonfun$apply$1(Launch.scala:44)
  	at xsbt.boot.Launch$.launch(Launch.scala:159)
  	at xsbt.boot.Launch$.apply(Launch.scala:44)
  	at xsbt.boot.Launch$.apply(Launch.scala:21)
  	at xsbt.boot.Boot$.runImpl(Boot.scala:78)
  	at xsbt.boot.Boot$.run(Boot.scala:73)
  	at xsbt.boot.Boot$.main(Boot.scala:21)
  	at xsbt.boot.Boot.main(Boot.scala)
  Caused by: java.lang.ClassNotFoundException: scala.Serializable
  	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
  	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
  	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
  	... 18 more
  Error:  [launcher] error during sbt launcher: java.lang.NoClassDefFoundError: scala/Serializable

I can see from the logs the version of scala-steward running is 0.9.1.
I tried specifying the JDK version, first setting it to 11 then to 8, but getting the same result.
Does anyone have any idea/suggestion on how to fix this problem?
Many thanks

[FEATURE REQUEST] Pr labels

I don't know if this is the correct way to asking it, but it would be nice having a setting like labels that instructs scala-steward to add the listed labels to the PR it opens. I don't know if the label has to be previously created in the repository.

I'm asking it in order to be able to write a mergify configuration that checks for the presence of a label like [dependency-update] before merging, since relying on the username and build status is a thing that triggers both scala-steward and standard pull requests.

Feel free to close it if this is not the way to ask for a feature. Thanks!

File not found: dist/main.js

Since last night our scala steward builds fail with

0s
Run scala-steward-org/scala-steward-action@v2
  with:
    repos-file: repos.md
    github-token: ***
    scala-steward-version: 0.16.0
    coursier-cli-url: https://git.io/coursier-cli-linux
    ignore-opts-files: true
    sign-commits: false
    timeout: 20min
    cache-ttl: 2hours
    github-api-url: https://api.github.com/
    repo-config: .github/.scala-steward.conf
Error: File not found: '/home/runner/work/_actions/scala-steward-org/scala-steward-action/v2/dist/main.js'

scala-steward-action version 2.13.2 keeps failing not able to download the dependencies

Any ideas on what's wrong? Thanks in advance.

  java.io.IOException: '"SBT_OPTS=-Xmx2048m -Xss8m -XX:MaxMetaspaceSize=512m" sbt -Dsbt.color=false -Dsbt.log.noformat=true -Dsbt.supershell=false ;+ stewardDependencies;reload plugins;stewardDependencies' exited with code 1
  copying runtime jar...
  [info] [launcher] getting org.scala-sbt sbt 1.5.0  (this may take some time)...
  [info] [launcher] getting Scala 2.12.13 (for sbt)...
  [info] welcome to sbt 1.5.0 (Azul Systems, Inc. Java 11.0.10)
  [info] loading global plugins from /home/runner/.sbt/1.0/plugins
  [info] compiling 1 Scala source to /home/runner/.sbt/1.0/plugins/target/scala-2.12/sbt-1.0/classes ...
  [info] Non-compiled module 'compiler-bridge_2.12' for Scala 2.12.13. Compiling...
  [info]   Compilation completed in 10.825s.
  [info] done compiling
  [info] loading settings for project poseidon-build from plugins.sbt ...
  [info] loading project definition from /home/runner/scala-steward/workspace/repos/faros-ai/poseidon/project
  [warn] 
  [warn] 	Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
  [warn] 		com.simplytyped:sbt-antlr4:0.8.3 (sbtVersion=1.0, scalaVersion=2.12)
  [warn] 		com.typesafe.sbt:sbt-native-packager:1.8.1 (sbtVersion=1.0, scalaVersion=2.12)
  [warn] 		com.typesafe.sbt:sbt-git:1.0.0 (sbtVersion=1.0, scalaVersion=2.12)
  [warn] 		com.github.cb372:sbt-explicit-dependencies:0.2.16 (sbtVersion=1.0, scalaVersion=2.12)
  [warn] 
  [warn] 	Note: Unresolved dependencies path:
  Error:  sbt.librarymanagement.ResolveException: Error downloading com.simplytyped:sbt-antlr4;sbtVersion=1.0;scalaVersion=2.12:0.8.3
  Error:    Not found
  Error:    Not found
  Error:    not found: repo1.maven.org/maven2/com/simplytyped/sbt-antlr4_2.12_1.0/0.8.3/sbt-antlr4-0.8.3.pom
  Error:    not found: /home/runner/.ivy2/localcom.simplytyped/sbt-antlr4/scala_2.12/sbt_1.0/0.8.3/ivys/ivy.xml
  Error:    forbidden: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.simplytyped/sbt-antlr4/scala_2.12/sbt_1.0/0.8.3/ivys/ivy.xml
  Error:    forbidden: repo.typesafe.com/typesafe/ivy-releases/com.simplytyped/sbt-antlr4/scala_2.12/sbt_1.0/0.8.3/ivys/ivy.xml
  Error:  Error downloading com.typesafe.sbt:sbt-native-packager;sbtVersion=1.0;scalaVersion=2.12:1.8.1
  Error:    Not found
  Error:    Not found
  Error:    not found: repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.12_1.0/1.8.1/sbt-native-packager-1.8.1.pom
  Error:    not found: /home/runner/.ivy2/localcom.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.8.1/ivys/ivy.xml
  Error:    forbidden: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.8.1/ivys/ivy.xml
  Error:    forbidden: repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.8.1/ivys/ivy.xml
  Error:  Error downloading com.typesafe.sbt:sbt-git;sbtVersion=1.0;scalaVersion=2.12:1.0.0
  Error:    Not found
  Error:    Not found
  Error:    not found: repo1.maven.org/maven2/com/typesafe/sbt/sbt-git_2.12_1.0/1.0.0/sbt-git-1.0.0.pom
  Error:    not found: /home/runner/.ivy2/localcom.typesafe.sbt/sbt-git/scala_2.12/sbt_1.0/1.0.0/ivys/ivy.xml
  Error:    forbidden: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-git/scala_2.12/sbt_1.0/1.0.0/ivys/ivy.xml
  Error:    forbidden: repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-git/scala_2.12/sbt_1.0/1.0.0/ivys/ivy.xml
  Error:  Error downloading com.github.cb372:sbt-explicit-dependencies;sbtVersion=1.0;scalaVersion=2.12:0.2.16
  Error:    Not found
  Error:    Not found
  Error:    not found: repo1.maven.org/maven2/com/github/cb372/sbt-explicit-dependencies_2.12_1.0/0.2.16/sbt-explicit-dependencies-0.2.16.pom
  Error:    not found: /home/runner/.ivy2/localcom.github.cb372/sbt-explicit-dependencies/scala_2.12/sbt_1.0/0.2.16/ivys/ivy.xml
  Error:    forbidden: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.github.cb372/sbt-explicit-dependencies/scala_2.12/sbt_1.0/0.2.16/ivys/ivy.xml
  Error:    forbidden: repo.typesafe.com/typesafe/ivy-releases/com.github.cb372/sbt-explicit-dependencies/scala_2.12/sbt_1.0/0.2.16/ivys/ivy.xml
  Error:  	at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:258)
  Error:  	at lmcoursier.CoursierDependencyResolution.$anonfun$update$38(CoursierDependencyResolution.scala:227)
  Error:  	at scala.util.Either$LeftProjection.map(Either.scala:573)
  Error:  	at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:227)
  Error:  	at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
  Error:  	at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:59)
  Error:  	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:133)
  Error:  	at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:73)
  Error:  	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:146)
  Error:  	at scala.util.control.Exception$Catch.apply(Exception.scala:228)
  Error:  	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:146)
  Error:  	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:127)
  Error:  	at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
  Error:  	at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:160)
  Error:  	at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3670)
  Error:  	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
  Error:  	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
  Error:  	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
  Error:  	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
  Error:  	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
  Error:  	at sbt.Execute.work(Execute.scala:291)
  Error:  	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
  Error:  	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
  Error:  	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
  Error:  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  Error:  	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
  Error:  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  Error:  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  Error:  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  Error:  	at java.base/java.lang.Thread.run(Thread.java:834)
  Error:  (update) sbt.librarymanagement.ResolveException: Error downloading com.simplytyped:sbt-antlr4;sbtVersion=1.0;scalaVersion=2.12:0.8.3
  Error:    Not found
  Error:    Not found
  Error:    not found: repo1.maven.org/maven2/com/simplytyped/sbt-antlr4_2.12_1.0/0.8.3/sbt-antlr4-0.8.3.pom
  Error:    not found: /home/runner/.ivy2/localcom.simplytyped/sbt-antlr4/scala_2.12/sbt_1.0/0.8.3/ivys/ivy.xml
  Error:    forbidden: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.simplytyped/sbt-antlr4/scala_2.12/sbt_1.0/0.8.3/ivys/ivy.xml
  Error:    forbidden: repo.typesafe.com/typesafe/ivy-releases/com.simplytyped/sbt-antlr4/scala_2.12/sbt_1.0/0.8.3/ivys/ivy.xml
  Error:  Error downloading com.typesafe.sbt:sbt-native-packager;sbtVersion=1.0;scalaVersion=2.12:1.8.1
  Error:    Not found
  Error:    Not found
  Error:    not found: repo1.maven.org/maven2/com/typesafe/sbt/sbt-native-packager_2.12_1.0/1.8.1/sbt-native-packager-1.8.1.pom
  Error:    not found: /home/runner/.ivy2/localcom.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.8.1/ivys/ivy.xml
  Error:    forbidden: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.8.1/ivys/ivy.xml
  Error:    forbidden: repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-native-packager/scala_2.12/sbt_1.0/1.8.1/ivys/ivy.xml
  Error:  Error downloading com.typesafe.sbt:sbt-git;sbtVersion=1.0;scalaVersion=2.12:1.0.0
  Error:    Not found
  Error:    Not found
  Error:    not found: repo1.maven.org/maven2/com/typesafe/sbt/sbt-git_2.12_1.0/1.0.0/sbt-git-1.0.0.pom
  Error:    not found: /home/runner/.ivy2/localcom.typesafe.sbt/sbt-git/scala_2.12/sbt_1.0/1.0.0/ivys/ivy.xml
  Error:    forbidden: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-git/scala_2.12/sbt_1.0/1.0.0/ivys/ivy.xml
  Error:    forbidden: repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbt/sbt-git/scala_2.12/sbt_1.0/1.0.0/ivys/ivy.xml
  Error:  Error downloading com.github.cb372:sbt-explicit-dependencies;sbtVersion=1.0;scalaVersion=2.12:0.2.16
  Error:    Not found
  Error:    Not found
  Error:    not found: repo1.maven.org/maven2/com/github/cb372/sbt-explicit-dependencies_2.12_1.0/0.2.16/sbt-explicit-dependencies-0.2.16.pom
  Error:    not found: /home/runner/.ivy2/localcom.github.cb372/sbt-explicit-dependencies/scala_2.12/sbt_1.0/0.2.16/ivys/ivy.xml
  Error:    forbidden: repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.github.cb372/sbt-explicit-dependencies/scala_2.12/sbt_1.0/0.2.16/ivys/ivy.xml
  Error:    forbidden: repo.typesafe.com/typesafe/ivy-releases/com.github.cb372/sbt-explicit-dependencies/scala_2.12/sbt_1.0/0.2.16/ivys/ivy.xml
  [warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
  
  	at org.scalasteward.core.io.process$.$anonfun$slurp$9(process.scala:58)
  	at org.scalasteward.core.io.process$.$anonfun$slurp$9$adapted(process.scala:54)
  	at delay$extension @ fs2.io.package$.readBytesFromInputStream(io.scala:95)
  	at map @ fs2.internal.CompileScope.$anonfun$close$9(CompileScope.scala:246)
  	at flatMap @ fs2.internal.CompileScope.$anonfun$close$6(CompileScope.scala:245)
  	at map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:222)
  	at flatMap @ fs2.internal.CompileScope.$anonfun$close$4(CompileScope.scala:244)
  	at map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:222)
  	at flatMap @ fs2.internal.CompileScope.$anonfun$close$2(CompileScope.scala:242)
  	at flatMap @ fs2.internal.CompileScope.close(CompileScope.scala:241)
  	at main$ @ org.scalasteward.core.Main$.main(Main.scala:22)
  	at flatMap @ fs2.internal.FreeC$.interruptGuard$1(Algebra.scala:436)
  	at flatMap @ fs2.internal.CompileScope.$anonfun$openAncestor$2(CompileScope.scala:261)
  	at flatMap @ fs2.internal.FreeC$.$anonfun$compile$17(Algebra.scala:545)
  	at map @ fs2.internal.CompileScope.$anonfun$close$9(CompileScope.scala:246)
  2021-04-12 17:24:52,344 INFO  ──────────── Total time: Steward faros-ai/poseidon: 42s 799ms ────────────
  2021-04-12 17:24:52,346 INFO  ──────────── Total time: run: 43s 874ms ────────────
Error:  ✕ Launching org.scala-steward:scala-steward-core_2.13:0.9.1 failed

Scala-steward execution hangs at refresh cache of target repo

When I try to run scala-steward against another repo, GHA execution always hangs at the following spot. I have seen a similar closed issue, where there is a problem with cache in self-hosted runners, but this is happening even though the runner is not self hosted. Action logs are as follows:

✓ Coursier installed, version: 2.0.16
✓ Github Token provided as input
✓ User information retrieved from Github
✓ Github Repository set to: myreponame.
✓ Scala Steward workspace created
✓ scalafmt installed, version: scalafmt 3.0.7
Launching org.scala-steward:scala-steward-core_2.13:0.12.0
2021-10-27 09:43:12,963 INFO
____ _ ____ _ _
/ | ___ __ _| | __ _ / || | _____ ____ _ _ __ | |
_ \ / _/ | |/ _ | _ | __/ _ \ \ /\ / / | '__/ _ |
) | (| (| | | (| | ) | || __/\ V V / (| | | | (| |
|
/ _
_
,||_,| |/ ____| _/_/ _,|| _,|
v0.12.0

2021-10-27 09:43:14,661 INFO Loaded 43 artifact migrations
2021-10-27 09:43:15,063 INFO Loaded 24 Scalafix migrations
2021-10-27 09:43:15,558 INFO Run self checks
2021-10-27 09:43:15,573 INFO Using git version 2.33.1
2021-10-27 09:43:16,821 INFO Using scalafmt 3.0.7
2021-10-27 09:43:17,770 INFO Clean workspace /home/runner/scala-steward/workspace
2021-10-27 09:43:17,781 INFO Add global sbt plugins
2021-10-27 09:43:17,883 INFO ──────────── Steward myreponame ────────────
2021-10-27 09:43:17,885 INFO Check cache of myreponame
2021-10-27 09:43:18,566 INFO Clone myreponame
2021-10-27 09:43:24,331 INFO Refresh cache of myreponame

and from here on, it keeps on running indefinitely, without any progress. I need to cancel the runner for the Action to stop. When I don't set github-repository then it's running against the repo where scala-steward action is installed, and it's working, but when target is different repo, it hangs. Here is my workflow file:

jobs:
  scala-steward:
    name: scala-steward
    runs-on: ubuntu-latest
    steps:
      # This is necessary to ensure that the most up-to-date version of
      # REPOSITORIES.md is used.
      - uses: actions/[email protected]
        with:
          ref: main
          fetch-depth: 0
      - name: Execute Scala Steward
        uses: scala-steward-org/scala-steward-action@v2
        with:
          # A GitHub personal access token tied to a user that will create
          # pull requests against your projects to update dependencies. More
          # on this under the YAML snippet.
          github-token: ${{ secrets.AWSINFRA_PAT }}
          # A Markdown file with a literal Markdown list of repositories
          # Scala Steward should monitor.
          github-repository: myreponame
          #repos-file: REPOSITORIES.md
          author-email: [email protected]
          author-name: Scala Steward
          cache-ttl: 0s

Update releases

Hi! Could you update the tags to release the latest master as v2.13.4/v2? It includes the default Scala Steward version update.

Crashing with "Converting circular structure to JSON"

I'm trying out scala-steward-action on one of my private personal projects and following the README with the default configuration doesn't appear to be working.

Contents of .github/workflows/scala-steward.yml

# This workflow will launch at 00:00 every Sunday
on:
  schedule:
    - cron: '0 0 * * 0'
  repository_dispatch:
    types: [scala-steward]

jobs:
  scala-steward:
    runs-on: ubuntu-latest
    name: Launch Scala Steward
    steps:
      - name: Launch Scala Steward
        uses: scala-steward-org/scala-steward-action@v2
        with:
          github-token: ${{ secrets.SCALA_STEWARD }}

Github Actions output

> Launch Scala Steward
Run scala-steward-org/scala-steward-action@v2
  with:
    github-token: ***
    scala-steward-version: 0.6.0
    ignore-opts-files: true
    sign-commits: false
✓ Connected to Maven Central
✓ Coursier installed, version: 2.0.0-RC6-23
✓ Github Token provided as input
✓ Github Repository set to: harpocrates/hermes-ci
##[error] ✕ Converting circular structure to JSON
    --> starting at object with constructor 'TLSSocket'
    |     property 'parser' -> object with constructor 'HTTPParser'
    --- property 'socket' closes the circle

That error seems to be coming from some failing JSON.stringify, which makes me think the issue is somewhere is the typescript/JS of the action and not in Scala Steward.

Need to handle rate limits

If you use Scala Steward with a number of repos all running at the same time you may this rate limit:

You have exceeded a secondary rate limit and have been temporarily blocked from content creation

It's an identical issue to that seen here and they have a fix that could be applied as well.

Unable to install coursier

Hi,

First of all, thanks for building this GitHub action, this is great!

I've been having problems when running it though. I'm literally copying and pasting the example from https://github.com/scala-steward-org/scala-steward-action#usage and the action is failing with: Unable to install coursier

Here is the output of the step:

Launch scala-steward-org/scala-steward-action@v2
  with:
    github-token: ***
    scala-steward-version: 0.5.0-385-e5e4789c-SNAPSHOT
    ignore-opts-files: true
    sign-commits: false
✓ Connected to Maven Central
##[error] ✕ Unable to install coursier

Also tried fixing the version to v2.1.0 and v2.0.0 and it also fails.

Is anyone else experiencing the same?

Improve handling of git author email

Currently, the author name and email used by Scala Steward to make a PR are taken from a GitHub user liked to the authentication token:

const octokit = new github.GitHub(token)
try {
const {login, email, name} = (await octokit.users.getAuthenticated()).data

['--git-author-email', `${user.email}"`],
['--git-author-name', `${user.name}"`],

However, if the GitHub user has the email privacy feature enabled, the email address returned in the auth response is always null. As the result, commits made by Scala Steward don't have a valid identity, and also can not be GPG-signed.

Proposed improvements:

  • Explain in the documentation requirements to the user account referenced by the auth token: the full name and email address are going to be used to identify PRs made by Scala Steward.
  • Add new action configuration parameter to specify overrides for author's email and username

2.13[.1] no longer appears to scan the current repo

Morning folks. I'm afraid we've seeing problems with 2.13* where the scan no longer appears to run on the current repo (setting github-repository manually likewise doesn't appear to work). We've seen this on all applicable pipelines, and because the action succeeds it appears everything is working unless you go spelunking in the logs.


Launching org.scala-steward:scala-steward-core_2.13:0.9.1
  2021-03-16 08:36:43,042 INFO   
    ____            _         ____  _                             _
   / ___|  ___ __ _| | __ _  / ___|| |_ _____      ____ _ _ __ __| |
   \___ \ / __/ _` | |/ _` | \___ \| __/ _ \ \ /\ / / _` | '__/ _` |
    ___) | (_| (_| | | (_| |  ___) | ||  __/\ V  V / (_| | | | (_| |
   |____/ \___\__,_|_|\__,_| |____/ \__\___| \_/\_/ \__,_|_|  \__,_|
   v0.9.1
   
  2021-03-16 08:36:43,650 INFO  Loaded 19 Scalafix migrations
  2021-03-16 08:36:43,984 INFO  Run self checks
  2021-03-16 08:36:43,992 INFO  Using git version 2.25.1
  2021-03-16 08:36:44,503 INFO  Using scalafmt 2.7.5
  2021-03-16 08:36:44,898 INFO  Clean workspace /github/home/scala-steward/workspace
  2021-03-16 08:36:44,905 INFO  Add global sbt plugins
  2021-03-16 08:36:44,960 INFO  ──────────── Total time: run: 974ms ────────────
Saving workspace to cache...

With builds run before the release of 2.13.0, and if we manually force the action to 2.12.0, we get the expected behaviour:

2021-03-16 08:53:18,728 INFO  Loaded 19 Scalafix migrations
  2021-03-16 08:53:19,037 INFO  Run self checks
  2021-03-16 08:53:19,046 INFO  Using git version 2.25.1
  2021-03-16 08:53:19,606 INFO  Using scalafmt 2.7.5
  2021-03-16 08:53:19,974 INFO  Clean workspace /github/home/scala-steward/workspace
  2021-03-16 08:53:19,981 INFO  Add global sbt plugins
  2021-03-16 08:53:20,028 INFO  ──────────── Steward ***/*** ────────────
  2021-03-16 08:53:20,030 INFO  Check cache of ***/***
  2021-03-16 08:53:20,616 INFO  Clone ***/***
  // snipped
  2021-03-16 08:56:28,581 INFO  Created PR https://github.com/***/***/pull/77
  2021-03-16 08:56:28,727 INFO  ──────────── Total time: Steward ***/***: 3m 8s 698ms ────────────
  2021-03-16 08:56:28,728 INFO  ──────────── Total time: run: 3m 9s 693ms ────────────
Saving workspace to cache...

Thanks very much!

Detect home directory (it's not always /home/runner)

Could we detect the home directory path when installing Coursier etc?

This action assumes that my runner has /home/runner as home directory.

I'm currently using a self-hosted runner that has /runner as home directory:
https://github.com/evryfs/github-actions-runner/blob/master/Dockerfile#L5

Hence I'm getting this kind of issues when trying to run this action:

##[debug]Finishing: Launch Scala Steward
##[debug]Evaluating condition for step: 'Launch Scala Steward'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Launch Scala Steward
##[debug]Loading inputs
##[debug]Evaluating: secrets.PAGERO_CI_GITHUB_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'PAGERO_CI_GITHUB_TOKEN'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run scala-steward-org/scala-steward-action@v2
✓ Connected to Maven Central
##[debug]Downloading https://git.io/coursier-cli-linux
##[debug]Destination /runner/_work/_temp/304597f7-6a09-4b22-ae1b-91df41196df0
##[debug]download complete
##[debug]EACCES: permission denied, mkdir '/home/runner'
##[error] ✕ Unable to install coursier
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Launch Scala Steward

Could we do something like this instead to not assume the path of the home dir?

const homedir = require("os").homedir();
const bin = path.join(homedir, "bin");

Based on for example how olafurpg/setup-scala does this.

Mill installation fails workflow

Since the merge of #414 our Scala Steward runs are failing as Mill installation fails on our runners (which are private to our GH organisation). As we're not using Mill, it would be cool if it was installed if necessary and/or could be opted-out.

Error:

##[debug]Debug mode activated for Scala Steward
##[debug]Wrote scalafmt
✓ scalafmt installed, version: scalafmt 3.6.1
##[debug]Wrote scalafix
✓ scalafix installed, version: 0.10.4
##[debug]isExplicit: 0.10.9
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/mill/0.10.9/x64
##[debug]not found
##[debug]Attempting to install Mill from https://github.com/lihaoyi/mill/releases/download/0.10.9/0.10.9
##[debug]Downloading https://github.com/lihaoyi/mill/releases/download/0.10.9/0.10.9
##[debug]Destination /runner/_work/_temp/9b722d14-6935-45f9-ab1a-526911088cbe
##[debug]download complete
Error: EXDEV: cross-device link not permitted, rename '/runner/_work/_temp/9b722d14-6935-45f9-ab1a-526911088cbe' -> '/home/runner/bin/mill'
Error:  ✕ Unable to install Mill

Failed to load artifact migrations: DecodingFailure

Run scala-steward-org/scala-steward-action@v2
✓ Connected to Maven Central
✓ Coursier installed, version: 2.0.16
✓ Github Token provided as input
✓ User information retrieved from Github
✓ Github Repository set to: priceloop/nocode.
✓ Scala Steward workspace created
Trying to restore workspace contents from cache...
✓ scalafmt installed, version: scalafmt 3.5.8
✓ scalafix installed, version: 0.10.0
Launching org.scala-steward:scala-steward-core_2.13:0.14.0
  2022-06-01 22:24:09,486 INFO   
    ____            _         ____  _                             _
   / ___|  ___ __ _| | __ _  / ___|| |_ _____      ____ _ _ __ __| |
   \___ \ / __/ _` | |/ _` | \___ \| __/ _ \ \ /\ / / _` | '__/ _` |
    ___) | (_| (_| | | (_| |  ___) | ||  __/\ V  V / (_| | | | (_| |
   |____/ \___\__,_|_|\__,_| |____/ \__\___| \_/\_/ \__,_|_|  \__,_|
   v0.14.0
   
  Error: java.lang.Throwable: Failed to load artifact migrations from https://raw.githubusercontent.com/scala-steward-org/scala-steward/master/modules/core/src/main/resources/artifact-migrations.v2.conf
  Error: 	at org.scalasteward.core.update.artifact.ArtifactMigrationsLoader$$anonfun$decodeMigrations$1.applyOrElse(ArtifactMigrationsLoader.scala:50)
  Error: 	at org.scalasteward.core.update.artifact.ArtifactMigrationsLoader$$anonfun$decodeMigrations$1.applyOrElse(ArtifactMigrationsLoader.scala:50)
  Error: 	at scala.PartialFunction$AndThen.applyOrElse(PartialFunction.scala:288)
  Error: 	at cats.ApplicativeError.$anonfun$recoverWith$1(ApplicativeError.scala:130)
  Error: 	at recoverWith$extension @ org.scalasteward.core.io.process$.$anonfun$slurp$3(process.scala:63)
  Error: 	at blocking @ org.scalasteward.core.io.FileAlg$$anon$1.ensureExists(FileAlg.scala:100)
  Error: 	at blocking @ org.scalasteward.core.io.FileAlg$$anon$1.ensureExists(FileAlg.scala:100)
  Error: 	at blocking @ org.scalasteward.core.io.FileAlg$$anon$1.ensureExists(FileAlg.scala:100)
  Error: 	at make @ org.http4s.okhttp.client.OkHttpBuilder$.defaultOkHttpClient(OkHttpBuilder.scala:202)
  Error: 	at make @ org.http4s.okhttp.client.OkHttpBuilder$.defaultOkHttpClient(OkHttpBuilder.scala:202)
  Error: 	at flatMap @ org.scalasteward.core.update.artifact.ArtifactMigrationsLoader.$anonfun$loadMigrations$2(ArtifactMigrationsLoader.scala:46)
  Error: 	at map @ org.scalasteward.core.update.artifact.ArtifactMigrationsLoader.$anonfun$loadMigrations$2(ArtifactMigrationsLoader.scala:46)
  Error: Caused by: DecodingFailure(Attempt to decode value on failed cursor, List(DownField(artifactIdAfter), MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, MoveRight, DownArray, DownField(changes)))
Error:  ✕ Launching org.scala-steward:scala-steward-core_2.13:0.14.0 failed

How do I create a a default config for multiple repositories?

Hello!

I am trying to add a default config to the repo that runs scala-steward but have so far failed in achieving it. My goal is to collect a common set of scala-steward configurations so I don't have to have the same .scala-steward.conf file in each repo.

Here is the workflow file in my scala-steward repo.

name: Scala-steward workflow

on:
  schedule:
    - cron: '0 22 * * FRI'
  workflow_dispatch:

jobs:

  scala-steward:
    runs-on: ["self-hosted", "default"]
    name: ${{ matrix.repos }}

    strategy:
      fail-fast: false
      max-parallel: 1
      matrix:
        repos:
          - repo1
          - repo2
          - repo3
    steps:
      - uses: actions/checkout@v1
      - uses: olafurpg/setup-scala@v11
      - name: ${{ matrix.repos }}-update-dependencies
        uses: scala-steward-org/scala-steward-action@v2
        with:
          github-token: ${{ secrets.BOT_TOKEN }}
          author-email: "[email protected]"
          author-name: "Robot"
          cache-ttl: "0s"
          ignore-opts-files: true
          github-repository: myorg/${{ matrix.repos }}
          repo-config: ".github/.scala-steward.conf"

From my understanding, repo-config should be the configuration needed to make this happen, but it seems to me that it doesn't get picked up. Here is the content of the .github/.scala-steward.conf file:

scalafmt.runAfterUpgrading = true
updates.pin = [ { groupId = "org.scala-lang", version = "2.12." } ]

The way I have checked what config is being picked up is by looking at the logs of the workflow. When I don't have a config file in my local repo (e.g. repo1), but one in my scala-steward repo then the logs look like this:

Launching org.scala-steward:scala-steward-core_2.13:0.14.0
  2022-05-05 14:19:03,416 INFO   
    ____            _         ____  _                             _
   / ___|  ___ __ _| | __ _  / ___|| |_ _____      ____ _ _ __ __| |
   \___ \ / __/ _` | |/ _` | \___ \| __/ _ \ \ /\ / / _` | '__/ _` |
    ___) | (_| (_| | | (_| |  ___) | ||  __/\ V  V / (_| | | | (_| |
   |____/ \___\__,_|_|\__,_| |____/ \__\___| \_/\_/ \__,_|_|  \__,_|
   v0.14.0
   
  2022-05-05 14:19:04,201 INFO  Loaded 58 artifact migration(s)
  2022-05-05 14:19:04,523 INFO  Loaded 26 Scalafix migration(s)
  2022-05-05 14:19:04,799 INFO  Loaded 2 repo config(s)
  2022-05-05 14:19:04,991 INFO  Run self checks
  2022-05-05 14:19:04,998 INFO  Using git version 2.35.1
  2022-05-05 14:19:05,467 INFO  Using scalafix 0.10.0
  2022-05-05 14:19:06,064 INFO  Using scalafmt 3.5.2
  2022-05-05 14:19:06,780 INFO  Clean workspace /home/runner/scala-steward/workspace
  2022-05-05 14:19:06,786 INFO  Add global sbt plugins
  2022-05-05 14:19:06,819 INFO  ──────────── Steward myorg/repo1:scala-steward-test ────────────
  2022-05-05 14:19:06,820 INFO  Check cache of myorg/repo1:scala-steward-test
  2022-05-05 14:19:07,544 INFO  Find updates for myorg/repo1:scala-steward-test
  2022-05-05 14:19:10,483 INFO  Ignore org.scala-sbt:sbt : 1.6.2 -> 1.7.0-M1 -> 1.7.0-M2 -> 1.7.0-M2-6810fix (reason: no suitable next version)
  2022-05-05 14:19:10,484 INFO  Ignore org.scala-sbt:(scripted-plugin, scripted-plugin_2.12) : 1.6.2 -> 1.7.0-M1 -> 1.7.0-M2 -> 1.7.0-M2-6810fix (reason: no suitable next version)
  2022-05-05 14:19:10,485 INFO  Ignore org.scalactic:(scalactic, scalactic_2.12) : 3.2.12 -> 3.3.0-SNAP1 -> 3.3.0-SNAP2 -> 3.3.0-SNAP3 (reason: no suitable next version)
  2022-05-05 14:19:10,485 INFO  Ignore org.scalatest:(scalatest, scalatest_2.12) : 3.2.12 -> 3.3.0-SNAP2 -> 3.3.0-SNAP3 (reason: no suitable next version)
  2022-05-05 14:19:10,520 INFO  Found 1 update:
    org.scala-lang:scala-library : 2.12.0 -> 2.12.15
  2022-05-05 14:19:10,522 INFO  myorg/repo1:scala-steward-test is up-to-date
  2022-05-05 14:19:10,534 INFO  ──────────── Total time: Steward myorg/repo1:scala-steward-test: 3s 715ms ────────────
  2022-05-05 14:19:10,537 INFO  ──────────── Total time: run: 5s 546ms ────────────

When I have a scala-steward.conf in my local repo (e.g. repo1) then I get the following log:

Launching org.scala-steward:scala-steward-core_2.13:0.14.0
  2022-04-25 07:24:59,075 INFO   
    ____            _         ____  _                             _
   / ___|  ___ __ _| | __ _  / ___|| |_ _____      ____ _ _ __ __| |
   \___ \ / __/ _` | |/ _` | \___ \| __/ _ \ \ /\ / / _` | '__/ _` |
    ___) | (_| (_| | | (_| |  ___) | ||  __/\ V  V / (_| | | | (_| |
   |____/ \___\__,_|_|\__,_| |____/ \__\___| \_/\_/ \__,_|_|  \__,_|
   v0.14.0
   
  2022-04-25 07:25:00,147 INFO  Loaded 56 artifact migration(s)
  2022-04-25 07:25:01,094 INFO  Loaded 26 Scalafix migration(s)
  2022-04-25 07:25:01,476 INFO  Loaded 1 repo config(s)
  2022-04-25 07:25:02,012 INFO  Run self checks
  2022-04-25 07:25:02,029 INFO  Using git version 2.35.1
  2022-04-25 07:25:02,850 INFO  Using scalafix 0.10.0
  2022-04-25 07:25:03,461 INFO  Using scalafmt 3.5.2
  2022-04-25 07:25:04,122 INFO  Clean workspace /home/runner/scala-steward/workspace
  2022-04-25 07:25:04,128 INFO  Add global sbt plugins
  2022-04-25 07:25:04,160 INFO  ──────────── Steward myorg/repo1 ────────────
  2022-04-25 07:25:04,161 INFO  Check cache of myorg/repo1
  2022-04-25 07:25:04,966 INFO  Clone myorg/repo1
  2022-04-25 07:25:06,942 INFO  Refresh cache of myorg/repo1
  2022-04-25 07:25:06,962 INFO  Parsed repo config {
    "commits" : {
      "message" : null
    },
    "pullRequests" : {
      "frequency" : null
    },
    "scalafmt" : {
      "runAfterUpgrading" : false
    },
    "updates" : {
      "pin" : [
        {
          "groupId" : "org.scala-lang",
          "artifactId" : null,
          "version" : {
            "prefix" : "2.12.",
            "suffix" : null,
            "exact" : null,
            "contains" : null
          }
        }
      ],
      "limit" : null,
      "fileExtensions" : null
    },
    "postUpdateHooks" : null,
    "updatePullRequests" : null,
    "buildRoots" : null
  }
  2022-04-25 07:25:30,430 INFO  Find updates for myorg/repo1
  2022-04-25 07:25:33,353 INFO  Ignore org.scala-lang:scala-library : 2.12.15 -> 2.13.0-M1 -> 2.13.0-M2 -> ... -> 2.13.6 -> 2.13.7 -> 2.13.8 (reason: ignored by config)
  2022-04-25 07:25:33,355 INFO  Ignore org.scala-sbt:sbt : 1.6.2 -> 1.7.0-M1 -> 1.7.0-M2 -> 1.7.0-M2-6810fix (reason: no suitable next version)
  2022-04-25 07:25:33,356 INFO  Ignore org.scala-sbt:(scripted-plugin, scripted-plugin_2.12) : 1.6.2 -> 1.7.0-M1 -> 1.7.0-M2 -> 1.7.0-M2-6810fix (reason: no suitable next version)
  2022-04-25 07:25:33,407 INFO  Found 4 updates:
    au.com.onegeek:sbt-dotenv : 2.1.233 -> 3.0.0
    org.scalactic:(scalactic, scalactic_2.12) : 3.2.11 -> 3.2.12
    org.scalameta:(scalafmt-core, scalafmt-core_2.13) : 3.5.1 -> 3.5.2
    org.scalatest:(scalatest, scalatest_2.12) : 3.2.11 -> 3.2.12
  2022-04-25 07:25:33,411 INFO  myorg/repo1 is outdated:
    new version: au.com.onegeek:sbt-dotenv : 2.1.233 -> 3.0.0
    new version: org.scalactic:(scalactic, scalactic_2.12) : 3.2.11 -> 3.2.12
    new version: org.scalameta:(scalafmt-core, scalafmt-core_2.13) : 3.5.1 -> 3.5.2
    new version: org.scalatest:(scalatest, scalatest_2.12) : 3.2.11 -> 3.2.12
  2022-04-25 07:25:33,414 INFO  Nurture myorg/repo1
  2022-04-25 07:25:33,423 INFO  Found 4 updates:
    au.com.onegeek:sbt-dotenv : 2.1.233 -> 3.0.0
    org.scalactic:(scalactic, scalactic_2.12) : 3.2.11 -> 3.2.12
    org.scalameta:(scalafmt-core, scalafmt-core_2.13) : 3.5.1 -> 3.5.2
    org.scalatest:(scalatest, scalatest_2.12) : 3.2.11 -> 3.2.12
  2022-04-25 07:25:33,434 INFO  Process update au.com.onegeek:sbt-dotenv : 2.1.233 -> 3.0.0
  2022-04-25 07:25:33,725 INFO  Found PR https://github.com/myorg/repo1/pull/19
  2022-04-25 07:25:33,783 INFO  PR has no conflict with main
  2022-04-25 07:25:33,801 INFO  Process update org.scalactic:(scalactic, scalactic_2.12) : 3.2.11 -> 3.2.12
  2022-04-25 07:25:34,161 INFO  Trying heuristic 'moduleId'
  2022-04-25 07:25:34,178 INFO  Create branch update/scalactic-3.2.12
  2022-04-25 07:25:38,090 INFO  Push 1 commit(s)
  2022-04-25 07:25:40,161 INFO  Create PR update/scalactic-3.2.12
  2022-04-25 07:25:49,434 INFO  Created PR https://github.com/myorg/repo1/pull/21
  2022-04-25 07:25:49,439 INFO  Process update org.scalameta:(scalafmt-core, scalafmt-core_2.13) : 3.5.1 -> 3.5.2
  2022-04-25 07:25:49,723 INFO  Found PR https://github.com/myorg/repo1/pull/20
  2022-04-25 07:25:49,747 INFO  PR has no conflict with main
  2022-04-25 07:25:49,751 INFO  Process update org.scalatest:(scalatest, scalatest_2.12) : 3.2.11 -> 3.2.12
  2022-04-25 07:25:49,981 INFO  Trying heuristic 'moduleId'
  2022-04-25 07:25:49,984 INFO  Create branch update/scalatest-3.2.12
  2022-04-25 07:25:52,108 INFO  Push 1 commit(s)
  2022-04-25 07:25:54,080 INFO  Create PR update/scalatest-3.2.12
  2022-04-25 07:25:56,923 INFO  Created PR https://github.com/myorg/repo1/pull/22
  2022-04-25 07:25:56,964 INFO  ──────────── Total time: Steward myorg/repo1: 52s 803ms ────────────

It is from these logs I assumed that no default config is read in. Is this a correct assumption or am I making a mistake somewhere?

I suspect that it is possible to make a default config and that it is only my ignorance holding me back. Hope you can help me understand what I am doing wrong.

Unexpected option: --default-repo-conf

scala-steward-org/scala-steward-action@v2

we set up a .github/.scala-steward.conf but now our run fails with the following error:

Launching org.scala-steward:scala-steward-core_2.13:0.14.0
  Error: Unexpected option: --default-repo-conf
  Error: Usage: scala-steward --workspace <file> --repos-file <file> [--git-author-name <string>] --git-author-email <string> [--git-author-signing-key <string>] --git-ask-pass <file> [--sign-commits] [--vcs-type <vcs-type>] [--vcs-api-host <uri>] --vcs-login <string> [--do-not-fork] [--ignore-opts-files] [--env-var <name=value>]... [--process-timeout <duration>] [--whitelist <string>]... [--read-only <string>]... [--enable-sandbox | --disable-sandbox] [--max-buffer-size <integer>] [--repo-config <uri>]... [--disable-default-repo-config] [--scalafix-migrations <uri>]... [--disable-default-scalafix-migrations] [--artifact-migrations <uri>]... [--disable-default-artifact-migrations] [--cache-ttl <duration>] [--bitbucket-server-use-default-reviewers] [--gitlab-merge-when-pipeline-succeeds] [--github-app-id <integer> --github-app-key-file <file>] [--url-checker-test-url <uri>] [--default-maven-repo <string>] [--refresh-backoff-period <duration>]
  Error: Options and flags:
  Error:     --help
  Error:         Display this help text.
  Error:     --workspace <file>
  Error:         Location for cache and temporary files
  Error:     --repos-file <file>
  Error:         A markdown formatted file with a repository list
  Error:     --git-author-name <string>
  Error:         Git "user.name"; default: Scala Steward
  Error:     --git-author-email <string>
  Error:         Git "user.email"
  Error:     --git-author-signing-key <string>
  Error:         Git "user.signingKey"
  Error:     --git-ask-pass <file>
  Error:         An executable file that returns the git credentials
  Error:     --sign-commits
  Error:         Whether to sign commits; default: false
  Error:     --vcs-type <vcs-type>
  Error:         One of bitbucket, bitbucket-server, github, gitlab; default: github
  Error:     --vcs-api-host <uri>
  Error:         API URL of the git hoster; default: https://api.github.com/
  Error:     --vcs-login <string>
  Error:         The user name for the git hoster
  Error:     --do-not-fork
  Error:         Whether to not push the update branches to a fork; default: false
  Error:     --ignore-opts-files
  Error:         Whether to remove ".jvmopts" and ".sbtopts" files before invoking the build tool
  Error:     --env-var <name=value>
  Error:         Assigns the value to the environment variable name (can be used multiple times)
  Error:     --process-timeout <duration>
  Error:         Timeout for external process invocations; default: 10minutes
  Error:     --whitelist <string>
  Error:         Directory white listed for the sandbox (can be used multiple times)
  Error:     --read-only <string>
  Error:         Read only directory for the sandbox (can be used multiple times)
  Error:     --enable-sandbox
  Error:         Whether to use the sandbox
  Error:     --disable-sandbox
  Error:         Whether to not use the sandbox
  Error:     --max-buffer-size <integer>
  Error:         Size of the buffer for the output of an external process in lines; default: 8192
  Error:     --repo-config <uri>
  Error:         Additional repo config file (can be used multiple times)
  Error:     --disable-default-repo-config
  Error:         Whether to disable the default repo config file
  Error:     --scalafix-migrations <uri>
  Error:         Additional scalafix migrations configuration file (can be used multiple times)
  Error:     --disable-default-scalafix-migrations
  Error:         Whether to disable the default scalafix migration file; default: false
  Error:     --artifact-migrations <uri>
  Error:         Additional artifact migration configuration file (can be used multiple times)
  Error:     --disable-default-artifact-migrations
  Error:         Whether to disable the default artifact migration file
  Error:     --cache-ttl <duration>
  Error:         TTL for the caches; default: 2hours
  Error:     --bitbucket-server-use-default-reviewers
  Error:         Whether to assign the default reviewers to a bitbucket pull request; default: false
  Error:     --gitlab-merge-when-pipeline-succeeds
  Error:         Whether to merge a gitlab merge request when the pipeline succeeds
  Error:     --github-app-id <integer>
  Error:         GitHub application id
  Error:     --github-app-key-file <file>
  Error:         GitHub application key file
  Error:     --url-checker-test-url <uri>
  Error:         default: https://github.com/
  Error:     --default-maven-repo <string>
  Error:         default: https://repo1.maven.org/maven2/
  Error:     --refresh-backoff-period <duration>
  Error:         Period of time a failed build won't be triggered again; default: 0days
Error:  ✕ Launching org.scala-steward:scala-steward-core_2.13:0.14.0 failed

Unable to find author's email. Either ensure that the token's Github Account has the email privacy feature disabled for at least one email or use the `author-email` input to provide one.

Hi, I got the following error:

✕ Unable to find author's email. Either ensure that the token's Github Account has the email privacy feature disabled for at least one email or use the author-email input to provide one.

This is my workflow:

on:
schedule:
- cron: '* * * * *'

jobs:
  scala-steward:
    runs-on: ubuntu-latest
    name: Launch Scala Steward
    steps:
      - name: Launch Scala Steward
        uses: scala-steward-org/scala-steward-action@v2
        with:
          github-token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
          github-repository: meldmy/draft-scala-pet-project

In the readme, I found that I don't need to add my mail to configuration.
Can you assist me with it, please? 🙏🏻

No way to reset cache to 'reset' Scala Steward

Due to #316, its now not possible to clear the cache of the action.

Currently, I would like to reset Scala Steward to reopen manually closed PRs.

Im not sure what the middle ground is between #316 and this missing feature.

Setup coverage tool?

There are major refactoring recently.
It would be great if we have coverage tool, such as CodeCov, so that we detect uncovered codes. Sometimes those are codes no longer used and could be removed.

Caching causes errors when running scala steward after revoking access

🗒️ Description

Caching the repos.md file causes build fails when access to a repo listed in repos.md is lost. The exact options I am using for Scala Steward Action are:

- name: Execute Scala Steward
        uses: scala-steward-org/[email protected]
        timeout-minutes: 1440
        with:
          author-email: EMAIL
          author-name: USER
          sign-commits: true
          signing-key: KEY_ID
          github-token: APP_INSTALL_TOKEN
          github-app-id: APP_ID
          github-app-key: APP_PRIVATE_KEY
          cache-ttl: 0s

          # Scala Steward running configs
          timeout: 24hours
          ignore-opts-files: false

Since I am using an Installation Token specifying repositories in the body, I scope down the access to a subset of repos granted access by the GitHub app. This means that in a different run of the action where access is not given to a repository that is now cached, it correctly 404s and the action fails.

Looking at the code I can see that repos.md is cached, since only the following items are removed:

// We don't want to keep `workspace/store/refresh_error` nor `workspace/repos` in the cache.
await io.rmRF(path.join(workspace, 'workspace', 'store', 'refresh_error'))
await io.rmRF(path.join(workspace, 'workspace', 'repos'))

This means that when the action cache is restored it will use the contents of repo.md always? I think the cache-ttl setting it to 0s initially stopped this from happening but PR #316 I think change the behaviour?

⚠️ Problem

To illustrate the above issue on a more high-level. I have the following things:

  • A GitHub app that grants READ|WRITE access to code and PRs via an Installation Token
  • 3 Scala repositories that we will call Repo A, Repo B, Repo C
  • A GitHub action that uses the Scala Steward Action

I then do the following:

  1. I run the Scala Steward action on A, using an Installation Token just for repo A. It succeeds and opens PRs as expected.

  2. I then run the Scala Steward action on B, using an Installation Token just for repo B.
    a. It executes Scala Steward for repo B and finds outdated dependencies, but at this point no PRs have been opened.
    b. Since Scala Steward loaded from cache, it then tries to access repo A using an installation token for repo B and causes a 404.
    c. This then results in no PRs opening and the action failing.

  3. I then run Scala Steward on B, using an Installation Token just for repo C. It fails as above but also tries to access repos A and B since they are in the cache.

  4. I then run Scala Steward on A, using an Installation Token just for repo A. It fails as above but also tries to access repos B and C since they are in the cache.

❓ Possible solution

Could repos.md be removed from the cache, since this can quickly and easily be re-generated? Or is it needed for other reasons?

Please let me know how I can help, I would love to help getting this solved 🙏
If I have misunderstood something please let me know where I'm going wrong 🙇

Can Scala Steward as GH Action work on multiple repos

This is a follow-up from scala-steward-org/scala-steward#1319 (comment), where I noted:

One thing that is unclear to me is if Scala Steward as GitHub Action inevitably means that one Scala Steward instance works only on one repository. One benefit of having one instance running for 1000+ repos is that it only checks for updates of libraries that are used by n repos once in a configured time interval instead of n times. So instead of checking for sbt updates a 1000+ times it does it only once every few hours. It would be great if we wouldn't loose this optimization with GitHub Actions.

Unable to retrieve user information from Github

I am unable to figure out what this issue is about. This is for a repository that is inside a GitHub enterprise account.

Config

name: Scala Steward
on:
  schedule:
    - cron: '0 9 * * *'
  workflow_dispatch:

jobs:
  scala-steward:
    runs-on: ubuntu-latest
    name: Launch Scala Steward
    steps:
      - name: Launch Scala Steward
        uses: scala-steward-org/scala-steward-action@v2
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

Screenshot 2020-10-10 at 1 01 27 AM

buildRoots not work on monorepo

Thank you for great github actions.

Today, I have a question.

I set the following structure on a private repository.
But the sweawrd doesn't update any dependencies.
How can I fix..?

.github/.scala-steward.conf
.github/workflows/steward.yml

backend/build.sbt
backend/project/plugins.sbt
frontend/package.json
cat .github/.scala-steward.conf

buildRoots = [ "../backend" ]
cat .github/workflows/steward.yml

name: Dependency Check Backend

on:
  schedule:
    - cron: '0 1 * * *'
  workflow_dispatch:

jobs:
  scala-steward:
    runs-on: ubuntu-latest
    name: Launch Scala Steward
    steps:
      - name: Launch Scala Steward
        uses: scala-steward-org/scala-steward-action@v2
        with:
          github-token: ${{ secrets.PERSONAL_ACCESS_TOKENS }}

Even if I changed like below, the actions doesn't update any dependencies.

cat .github/.scala-steward.conf

buildRoots = [ "backend" ]

Should I set build.sbt on the root directory of my repository?

Question: How can increase the process-timeout?

Hello, we have a scala-steward-action that after 20 minutes goes to timeout on one our repo.

Assuming that this is the problem, is it possible to tell the action to increase this timeout?

['--process-timeout', '20min'],

Thanks,
Michele

Here the timeout exception:
Run scala-steward-org/scala-steward-action@v2 (node:1434) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. ✓ Connected to Maven Central ✓ Coursier installed, version: 2.0.16 ✓ Github Token provided as input ✓ Github Repository set to: kensuio/dam-ingestion-api. ✓ Scala Steward workspace created Trying to restore workspace contents from cache... ✓ scalafmt installed, version: scalafmt 3.0.7 Launching org.scala-steward:scala-steward-core_2.13:0.12.0 2021-10-27 15:38:04,537 INFO ____ _ ____ _ _ / ___| ___ __ _| | __ _ / ___|| |_ _____ ____ _ _ __ __| | \___ \ / __/ _ | |/ | \___ \| __/ _ \ \ /\ / / _ | '__/ ` |
) | (| (| | | (| | ) | || __/\ V V / (| | | | (| |
|
/ ____,||_,| |/ ____| _/_/ _,|| _,|
v0.12.0

2021-10-27 15:38:05,850 INFO Loaded 43 artifact migrations
2021-10-27 15:38:06,227 INFO Loaded 24 Scalafix migrations
2021-10-27 15:38:06,579 INFO Run self checks
2021-10-27 15:38:06,610 INFO Using git version 2.33.1
2021-10-27 15:38:07,453 INFO Using scalafmt 3.0.7
2021-10-27 15:38:08,339 INFO Clean workspace /home/runner/scala-steward/workspace
2021-10-27 15:38:08,351 INFO Add global sbt plugins
2021-10-27 15:38:08,421 INFO ──────────── Steward kensuio/dam-ingestion-api ────────────
2021-10-27 15:38:08,422 INFO Check cache of kensuio/dam-ingestion-api
2021-10-27 15:38:09,210 INFO Clone kensuio/dam-ingestion-api
2021-10-27 15:38:11,591 INFO Refresh cache of kensuio/dam-ingestion-api
2021-10-27 15:38:11,654 INFO Parsed RepoConfig(CommitsConfig(None),PullRequestsConfig(None),ScalafmtConfig(None),UpdatesConfig(List(),List(),List(),Some(2),None),None,None)
2021-10-27 16:00:07,759 ERROR Steward kensuio/dam-ingestion-api failed
java.util.concurrent.TimeoutException: '"SBT_OPTS=-Xmx2048m -Xss8m -XX:MaxMetaspaceSize=512m" mvn --batch-mode dependency:list' timed out after 20 minutes`

Attempting to debug fails

Per readme, debugging should be enabled by setting repository secret:

For this you must set the following secret in the repository that contains the workflow: ACTIONS_STEP_DEBUG to true (as stated in GitHub's documentation).

but actually, the code reads process environment, not repository secrets:
const debug = 'ACTIONS_STEP_DEBUG' in process.env ? ['--java-opt', '-DLOG_LEVEL=TRACE', '-DROOT_LOG_LEVEL=TRACE'] : []
which was added in #297.

When setting environment value ACTIONS_STEP_DEBUG=true, I get an error:

Launching org.scala-steward:scala-steward-core_2.13:0.14.0 Error: Unrecognized argument: -DROOT_LOG_LEVEL=TRACE ::endgroup::

failed with errors for type aliases

Hi,
I need understanding what I can do to make it work.
Scala-Steward github action is failing for some syntax errors

https://github.com/bilal-fazlani/scalabar/runs/1583191773?check_suite_focus=true

  2020-12-20 01:04:11,790 ERROR Steward ***/scalabar failed
  java.io.IOException: '"SBT_OPTS=-Xmx2048m -Xss8m -XX:MaxMetaspaceSize=512m" scalafmt --non-interactive' exited with code 2
  Align: top-level presets deprecated; use 'preset' subsection
  Reformatting...
  Reformatting... (5.88 %, 1 / 17)
  
  /home/runner/scala-steward/workspace/repos/***/scalabar/scalabar/src/main/scala/com/bilalfazlani/scalabar/ScalaBarApp.scala:10: error: expected class or object definition
  type Handler = PartialFunction[(String, Option[String]), Unit]
  ^
  /home/runner/scala-steward/workspace/repos/***/scalabar/scalabar/src/main/scala/com/bilalfazlani/scalabar/dsl/MenuDsl.scala:10: error: expected class or object definition
  type AllowedType = Text | Link | DispatchAction | ShellCommand | MenuBuilder
  ^
  /home/runner/scala-steward/workspace/repos/***/scalabar/scalabar/src/main/scala/com/bilalfazlani/scalabar/dsl/HandlerDsl.scala:11: error: expected class or object definition
  type MetadataFunction = Option[String] => Unit
  ^
  
  	at org.scalasteward.core.io.process$.$anonfun$slurp$9(process.scala:54)
  	at org.scalasteward.core.io.process$.$anonfun$slurp$9$adapted(process.scala:50)
  	at map @ fs2.internal.CompileScope.$anonfun$close$9(CompileScope.scala:242)
  	at flatMap @ fs2.internal.CompileScope.$anonfun$close$6(CompileScope.scala:241)
  	at map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:218)
  	at flatMap @ fs2.internal.CompileScope.$anonfun$close$4(CompileScope.scala:240)
  	at map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:218)
  	at flatMap @ fs2.internal.CompileScope.$anonfun$close$2(CompileScope.scala:238)
  	at flatMap @ fs2.internal.CompileScope.close(CompileScope.scala:237)
  	at main$ @ org.scalasteward.core.Main$.main(Main.scala:22)
  	at flatMap @ fs2.internal.FreeC$.interruptGuard$1(Algebra.scala:429)
  	at flatMap @ fs2.internal.CompileScope.$anonfun$openAncestor$2(CompileScope.scala:257)
  	at flatMap @ fs2.internal.FreeC$.$anonfun$compile$15(Algebra.scala:532)
  	at map @ fs2.internal.CompileScope.$anonfun$close$9(CompileScope.scala:242)
  	at flatMap @ fs2.internal.CompileScope.$anonfun$close$6(CompileScope.scala:241)
  	at map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:218)
  	at flatMap @ fs2.internal.CompileScope.$anonfun$close$4(CompileScope.scala:240)
  2020-12-20 01:04:11,799 INFO  ──────────── Total time: Steward ***/scalabar: 1m 35s 952ms ────────────
  2020-12-20 01:04:11,802 INFO  ──────────── Total time: run: 1m 37s 630ms ────────────
Error:  ✕ Launching org.scala-steward:scala-steward-core_2.13:0.8.1 failed

Scala Steward not closing old PRs

Im running Scala Steward 0.13.0 with Github Actions on a private repository.

I see the following output:

  2021-12-21 15:26:55,030 INFO  Create branch update/helpers-clients-1.0.5379
  2021-12-21 15:26:55,158 INFO  Push 1 commit(s)
  2021-12-21 15:26:57,170 INFO  Create PR update/helpers-clients-1.0.5379
  2021-12-21 15:27:00,137 INFO  Created PR https://github.com/xxx-org/yyy/pull/551
  2021-12-21 15:27:00,151 INFO  Process update com.xxx:zzz-analysis : 0.1.7 -> 0.1.26

So it created a new PR for the helper-client but it didnt close the old PR.

From scala-steward-org/scala-steward#1841 (comment), it looks like it should normally also log an INFO statement that it is checking for old PRs or branches, which it doesnt seem to do.

Am I missing something or is there actually something going wrong with Scala Steward itself?

GPG failed to sign the data

We are getting the following error. Any recommendations on how to troubleshoot this?

java.io.IOException: 'git commit --all -m Update xyz to 1.2.3 --gpg-sign' exited with code 128
error: gpg failed to sign the data
fatal: failed to write commit object

	at org.scalasteward.core.io.process$.$anonfun$slurp$9(process.scala:48)
	at org.scalasteward.core.io.process$.$anonfun$slurp$9$adapted(process.scala:44)
	at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:145)
	at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:366)
	at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:387)
	at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:330)
	at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:141)
	at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:366)
	at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:387)
	at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:330)
	at cats.effect.internals.IORunLoop$.cats$effect$internals$IORunLoop$$loop(IORunLoop.scala:141)
	at cats.effect.internals.IORunLoop$RestartCallback.signal(IORunLoop.scala:366)
	at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:387)
	at cats.effect.internals.IORunLoop$RestartCallback.apply(IORunLoop.scala:330)
	at cats.effect.internals.IOShift$Tick.run(IOShift.scala:36)
	at cats.effect.internals.PoolUtils$$anon$2$$anon$3.run(PoolUtils.scala:52)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Option for single / combined PR with all updates

It would be great to have an option for the Scala Steward to open a single pull request combining all the updates. In some cases this can be useful to prevents a flood of PRs and ensure compatibility between the dependencies using a projects CI.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.