From 7053036d932577fabcf6539bf40beb4a2aa828f5 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 7 Mar 2023 23:06:38 +0000 Subject: [PATCH 1/3] sorbet: Run `brew typecheck --update --suggest-typed` on schedule in CI - No idea if this works, let's experiment. - Suggested in https://github.com/Homebrew/brew/pull/14893#issuecomment-1456040533. --- .github/workflows/sorbet.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sorbet.yml b/.github/workflows/sorbet.yml index 815aa04aad..00a518d2a9 100644 --- a/.github/workflows/sorbet.yml +++ b/.github/workflows/sorbet.yml @@ -52,12 +52,17 @@ jobs: git checkout --no-track -B "${BRANCH}" origin/master fi - brew typecheck --update + brew typecheck --update --suggest-typed if ! git diff --stat --exit-code "Library/Homebrew/sorbet" then git add "Library/Homebrew/sorbet" git commit -m "sorbet: Update RBI files." \ -m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow." + + git add "**/.rb" + git commit -m "sorbet: Autobump sigils via Spoom" \ + -m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow." + echo "committed=true" >> $GITHUB_OUTPUT PULL_REQUEST_STATE="$(gh pr view --json=state | jq -r ".state")" if [[ "${PULL_REQUEST_STATE}" != "OPEN" ]] From 9c9f6b36b524544328366b7a31a2de8a73e5d547 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 7 Mar 2023 23:10:28 +0000 Subject: [PATCH 2/3] sorbet: Oops, missed a `*` for `**/*.rb` path wildcards --- .github/workflows/sorbet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sorbet.yml b/.github/workflows/sorbet.yml index 00a518d2a9..7df212556f 100644 --- a/.github/workflows/sorbet.yml +++ b/.github/workflows/sorbet.yml @@ -59,7 +59,7 @@ jobs: git commit -m "sorbet: Update RBI files." \ -m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow." - git add "**/.rb" + git add "**/*.rb" git commit -m "sorbet: Autobump sigils via Spoom" \ -m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow." From 20fe371c75c61f0b227fea69e545414eb1709d8e Mon Sep 17 00:00:00 2001 From: Issy Long Date: Wed, 8 Mar 2023 23:43:02 +0000 Subject: [PATCH 3/3] sorbet: More specific `git add` for `--suggest-typed` CI autobumps --- .github/workflows/sorbet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sorbet.yml b/.github/workflows/sorbet.yml index 7df212556f..25bb875178 100644 --- a/.github/workflows/sorbet.yml +++ b/.github/workflows/sorbet.yml @@ -59,7 +59,7 @@ jobs: git commit -m "sorbet: Update RBI files." \ -m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow." - git add "**/*.rb" + git add "Library/Homebrew/" git commit -m "sorbet: Autobump sigils via Spoom" \ -m "Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow."