GiteaBot / gitea-backporter

:tea: A script that looks for PRs in Gitea that need to be backported and creates the backport PR for them
MIT License
17 stars 8 forks source link

Run typecheck on CI and fix issues #133

Closed silverwind closed 2 months ago

silverwind commented 2 months ago
  1. type checking (deno check) was not running on CI and there were 7 type errors which I've fixed and now it's running
  2. GitHub API types are sourced from https://github.com/octokit/types.ts and I created basic types for Issue and PullRequest.
  3. IDK about those two webhook errors, so I used @ts-expect-error.
  4. deno.lock was auto generated, I guess it's good to have it in-repo.
  5. actions/checkout is upgraded to latest major.
silverwind commented 2 months ago

Weird failure on actions:

Run deno check src/**/*.ts
  deno check src/**/*.ts
  shell: /usr/bin/bash -e {0}
error: Module not found "file:///home/runner/work/gitea-backporter/gitea-backporter/src/**/*.ts".
silverwind commented 2 months ago

Fixed. The bash where this runs on needed shopt -s globstar to enable recursive globs. deno check itself is too dumb to typecheck a directory (see https://github.com/denoland/deno/discussions/12113).