diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e1a8e3b..a84a7a4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,10 @@ updates: schedule: interval: weekly open-pull-requests-limit: 5 + ignore: + # Issue 5: @astrojs/check does not accept TypeScript 7 yet. + - dependency-name: "typescript" + versions: ["7.x"] - package-ecosystem: github-actions directory: / schedule: diff --git a/.github/workflows/typescript-7.yml b/.github/workflows/typescript-7.yml new file mode 100644 index 0000000..b983884 --- /dev/null +++ b/.github/workflows/typescript-7.yml @@ -0,0 +1,39 @@ +# Copyright 2026 OpenSourceOM +# SPDX-License-Identifier: Apache-2.0 +name: TypeScript 7 + +on: + schedule: + # 15:00 UTC on the 1st. Stays quiet until @astrojs/check accepts TypeScript 7. + - cron: "0 15 1 * *" + workflow_dispatch: + +permissions: + contents: read + issues: write + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Comment on issue 5 when TypeScript 7 is accepted + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + range=$(npm view @astrojs/check@latest peerDependencies.typescript) + echo "typescript peer: ${range}" + # Published ranges look like "^5.0.0 || ^6.0.0". + printf '%s\n' "$range" | grep -Eq '(^|[^0-9])7\.' || exit 0 + marker="" + if gh api --paginate "repos/${GITHUB_REPOSITORY}/issues/5/comments" --jq '.[].body' | grep -F -q "$marker"; then + exit 0 + fi + gh issue reopen 5 --repo "$GITHUB_REPOSITORY" || true + gh issue comment 5 --repo "$GITHUB_REPOSITORY" --body "$(cat <