From 688dedbc58aac60c96faea4f5d2e5c36359e112e Mon Sep 17 00:00:00 2001 From: TATSUNO Yasuhiro Date: Wed, 21 Dec 2022 14:39:50 +0900 Subject: [PATCH 1/7] Introduce link checker job --- .github/workflows/linkcheck.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/linkcheck.yml diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml new file mode 100644 index 0000000000..b8ba2162aa --- /dev/null +++ b/.github/workflows/linkcheck.yml @@ -0,0 +1,19 @@ +name: Link checker + +on: push + +jobs: + link-check: + runs-on: ubuntu-latest + name: Link checker + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + config-file: 'mlc_config.json' + folder-path: 'docs' # comma separated + max-depth: 2 + check-modified-files-only: ${{ github.ref_name == 'main' && 'no' || 'yes' }} + base-branch: main From e7ac95bed971e588ca7d49b27806c9efb1954d94 Mon Sep 17 00:00:00 2001 From: TATSUNO Yasuhiro Date: Wed, 21 Dec 2022 15:08:14 +0900 Subject: [PATCH 2/7] Added top level files --- .github/workflows/linkcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index b8ba2162aa..c3484250ff 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -12,8 +12,8 @@ jobs: fetch-depth: 0 - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: - config-file: 'mlc_config.json' folder-path: 'docs' # comma separated + file-path: 'README.md,CODE_OF_CONDUCT.md' # comma separated max-depth: 2 check-modified-files-only: ${{ github.ref_name == 'main' && 'no' || 'yes' }} base-branch: main From 10e4dabf595f7c11031c776ce2c03e75c459e2a6 Mon Sep 17 00:00:00 2001 From: TATSUNO Yasuhiro Date: Wed, 21 Dec 2022 15:28:50 +0900 Subject: [PATCH 3/7] Fix failing links --- docs/running.md | 5 ++--- docs/scalafix-migrations.md | 3 +++ modules/docs/mdoc/running.md | 5 ++--- modules/docs/mdoc/scalafix-migrations.md | 3 +++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/running.md b/docs/running.md index 76faafca2e..1f06e2eed3 100644 --- a/docs/running.md +++ b/docs/running.md @@ -39,7 +39,7 @@ docker run -v $STEWARD_DIR:/opt/scala-steward -it fthomas/scala-steward:latest \ The [`git-ask-pass` option](https://git-scm.com/docs/gitcredentials) must specify an executable file (script) that returns (on the stdout), - either the plain text password corresponding to the configured `${LOGIN}`, -- or (recommended) an authentication token corresponding to `${LOGIN}` (with appropriate permissions to watch the repositories; e.g. [Create a personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) for GitHub). +- or (recommended) an authentication token corresponding to `${LOGIN}` (with appropriate permissions to watch the repositories; e.g. [Create a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) for GitHub). **Note about git-ask-pass option**: The provided script must start with a valid shebang like `#!/bin/sh`, see issue [#1374](https://github.com/scala-steward-org/scala-steward/issues/1374) @@ -75,7 +75,7 @@ If your projects require credentials, you can also provide global credentials in The file should contain a single line: `credentials += Credentials("Some Nexus Repository Manager", "my.artifact.repo.net", "admin", "admin123")`. #### sbt 0.13 workaround -For sbt 0.13 builds, scala-steward [may be unable](https://gitter.im/fthomas/scala-steward?at=5f0573dac7d15f7d0f7b15ac) to extract credentials for private resolvers. Instead, you can [configure coursier directly](https://get-coursier.io/docs/other-credentials) by adding `~/.config/coursier/credentials.properties`: +For sbt 0.13 builds, scala-steward [may be unable](https://gitter.im/scala-steward-org/scala-steward?at=5f0573dac7d15f7d0f7b15ac) to extract credentials for private resolvers. Instead, you can [configure coursier directly](https://get-coursier.io/docs/other-credentials) by adding `~/.config/coursier/credentials.properties`: ```scala example1.username=username example1.password=password @@ -191,7 +191,6 @@ pipelines: There is multiple articles on how to run Scala Steward on-premise: * [Running Scala Steward On-premise](https://engineering.avast.io/running-scala-steward-on-premise) -* [Running scala-steward periodically on AWS Fargate](https://medium.com/@tanishiking/running-scala-steward-periodically-on-aws-fargate-3d3d202f0f7) * [Scala StewardとGitHub Actionsで依存ライブラリの更新を自動化する](https://scalapedia.com/articles/145/Scala+Steward%E3%81%A8GitHub+Actions%E3%81%A7%E4%BE%9D%E5%AD%98%E3%83%A9%E3%82%A4%E3%83%96%E3%83%A9%E3%83%AA%E3%81%AE%E6%9B%B4%E6%96%B0%E3%82%92%E8%87%AA%E5%8B%95%E5%8C%96%E3%81%99%E3%82%8B) * [Centralized Scala Steward with GitHub Actions](https://hector.dev/2020/11/18/centralized-scala-steward-with-github-actions) * [Big Timesavers for Busy Scala Developers](https://speakerdeck.com/exoego/big-timesavers-for-busy-scala-developers) diff --git a/docs/scalafix-migrations.md b/docs/scalafix-migrations.md index 6d08decdc1..84c38d9a1c 100644 --- a/docs/scalafix-migrations.md +++ b/docs/scalafix-migrations.md @@ -13,10 +13,13 @@ Here are two pull requests that demonstrate this feature: And here are all pull requests where Scala Steward applied Scalafix migrations: + + * [Created pull requests](https://github.com/search?q=author%3Ascala-steward+is%3Apr+scalafix-migrations) ([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Apr+scalafix-migrations)) * [Merged pull requests]( https://github.com/search?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+scalafix-migrations) ([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+scalafix-migrations)) + ## How does this work? diff --git a/modules/docs/mdoc/running.md b/modules/docs/mdoc/running.md index 15ccc2353a..017584bdb1 100644 --- a/modules/docs/mdoc/running.md +++ b/modules/docs/mdoc/running.md @@ -39,7 +39,7 @@ docker run -v $STEWARD_DIR:/opt/scala-steward -it fthomas/scala-steward:latest \ The [`git-ask-pass` option](https://git-scm.com/docs/gitcredentials) must specify an executable file (script) that returns (on the stdout), - either the plain text password corresponding to the configured `${LOGIN}`, -- or (recommended) an authentication token corresponding to `${LOGIN}` (with appropriate permissions to watch the repositories; e.g. [Create a personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) for GitHub). +- or (recommended) an authentication token corresponding to `${LOGIN}` (with appropriate permissions to watch the repositories; e.g. [Create a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) for GitHub). **Note about git-ask-pass option**: The provided script must start with a valid shebang like `#!/bin/sh`, see issue [#1374](@GITHUB_URL@/issues/1374) @@ -75,7 +75,7 @@ If your projects require credentials, you can also provide global credentials in The file should contain a single line: `credentials += Credentials("Some Nexus Repository Manager", "my.artifact.repo.net", "admin", "admin123")`. #### sbt 0.13 workaround -For sbt 0.13 builds, scala-steward [may be unable](https://gitter.im/fthomas/scala-steward?at=5f0573dac7d15f7d0f7b15ac) to extract credentials for private resolvers. Instead, you can [configure coursier directly](https://get-coursier.io/docs/other-credentials) by adding `~/.config/coursier/credentials.properties`: +For sbt 0.13 builds, scala-steward [may be unable](https://gitter.im/scala-steward-org/scala-steward?at=5f0573dac7d15f7d0f7b15ac) to extract credentials for private resolvers. Instead, you can [configure coursier directly](https://get-coursier.io/docs/other-credentials) by adding `~/.config/coursier/credentials.properties`: ```scala example1.username=username example1.password=password @@ -191,7 +191,6 @@ pipelines: There is multiple articles on how to run Scala Steward on-premise: * [Running Scala Steward On-premise](https://engineering.avast.io/running-scala-steward-on-premise) -* [Running scala-steward periodically on AWS Fargate](https://medium.com/@tanishiking/running-scala-steward-periodically-on-aws-fargate-3d3d202f0f7) * [Scala StewardとGitHub Actionsで依存ライブラリの更新を自動化する](https://scalapedia.com/articles/145/Scala+Steward%E3%81%A8GitHub+Actions%E3%81%A7%E4%BE%9D%E5%AD%98%E3%83%A9%E3%82%A4%E3%83%96%E3%83%A9%E3%83%AA%E3%81%AE%E6%9B%B4%E6%96%B0%E3%82%92%E8%87%AA%E5%8B%95%E5%8C%96%E3%81%99%E3%82%8B) * [Centralized Scala Steward with GitHub Actions](https://hector.dev/2020/11/18/centralized-scala-steward-with-github-actions) * [Big Timesavers for Busy Scala Developers](https://speakerdeck.com/exoego/big-timesavers-for-busy-scala-developers) diff --git a/modules/docs/mdoc/scalafix-migrations.md b/modules/docs/mdoc/scalafix-migrations.md index ef8cddb5cc..1f9a29d57c 100644 --- a/modules/docs/mdoc/scalafix-migrations.md +++ b/modules/docs/mdoc/scalafix-migrations.md @@ -13,10 +13,13 @@ Here are two pull requests that demonstrate this feature: And here are all pull requests where Scala Steward applied Scalafix migrations: + + * [Created pull requests](https://github.com/search?q=author%3Ascala-steward+is%3Apr+scalafix-migrations) ([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Apr+scalafix-migrations)) * [Merged pull requests]( https://github.com/search?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+scalafix-migrations) ([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Amerged+sort%3Aupdated-desc+scalafix-migrations)) + ## How does this work? From cc5856ef8b047af3a151f82d98c576c409b0498c Mon Sep 17 00:00:00 2001 From: TATSUNO Yasuhiro Date: Fri, 23 Dec 2022 13:34:36 +0900 Subject: [PATCH 4/7] Run on pull_request and every Monday --- .github/workflows/linkcheck.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index c3484250ff..17bd5f8186 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -1,6 +1,10 @@ name: Link checker -on: push +on: + pull_request: + # On every pull request + schedule: + - cron: '00 0 * * 1' # Every monday jobs: link-check: From 512a1ef96bb859e3ec2e7e74c803a1d8da982737 Mon Sep 17 00:00:00 2001 From: TATSUNO Yasuhiro Date: Fri, 10 Mar 2023 16:46:22 +0900 Subject: [PATCH 5/7] Added notes --- docs/scalafix-migrations.md | 2 +- modules/docs/mdoc/scalafix-migrations.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/scalafix-migrations.md b/docs/scalafix-migrations.md index 84c38d9a1c..d33559ca65 100644 --- a/docs/scalafix-migrations.md +++ b/docs/scalafix-migrations.md @@ -13,7 +13,7 @@ Here are two pull requests that demonstrate this feature: And here are all pull requests where Scala Steward applied Scalafix migrations: - + * [Created pull requests](https://github.com/search?q=author%3Ascala-steward+is%3Apr+scalafix-migrations) ([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Apr+scalafix-migrations)) diff --git a/modules/docs/mdoc/scalafix-migrations.md b/modules/docs/mdoc/scalafix-migrations.md index 1f9a29d57c..b4b2751d3e 100644 --- a/modules/docs/mdoc/scalafix-migrations.md +++ b/modules/docs/mdoc/scalafix-migrations.md @@ -13,7 +13,7 @@ Here are two pull requests that demonstrate this feature: And here are all pull requests where Scala Steward applied Scalafix migrations: - + * [Created pull requests](https://github.com/search?q=author%3Ascala-steward+is%3Apr+scalafix-migrations) ([compact]( https://github.com/pulls?q=author%3Ascala-steward+is%3Apr+scalafix-migrations)) From 82554e3716a3910b02568dac8fbe5abc53af81ea Mon Sep 17 00:00:00 2001 From: TATSUNO Yasuhiro Date: Fri, 10 Mar 2023 16:49:24 +0900 Subject: [PATCH 6/7] Specify the newest version --- .github/workflows/linkcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 17bd5f8186..f6023dbd1e 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: gaurav-nelson/github-action-markdown-link-check@v1 + - uses: gaurav-nelson/github-action-markdown-link-check@v1.0.15 with: folder-path: 'docs' # comma separated file-path: 'README.md,CODE_OF_CONDUCT.md' # comma separated From a506ddbe2358417da01c31335005fd1b99cc5f76 Mon Sep 17 00:00:00 2001 From: TATSUNO Yasuhiro Date: Fri, 10 Mar 2023 16:51:45 +0900 Subject: [PATCH 7/7] Specify the newest version --- .github/workflows/linkcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index f6023dbd1e..a5210d792c 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: gaurav-nelson/github-action-markdown-link-check@v1.0.15 + - uses: gaurav-nelson/github-action-markdown-link-check@1.0.15 with: folder-path: 'docs' # comma separated file-path: 'README.md,CODE_OF_CONDUCT.md' # comma separated