Skip to content

Conversation

@Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Oct 7, 2025

Resolves #ISSUE_NUMBER


Before the change?

After the change?

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@github-actions

This comment has been minimized.

Comment on lines +14 to +16
? (T["parameters"] extends { query?: infer Q } ? Q : {}) &
(T["parameters"] extends { path?: infer P } ? P : {}) &
(T["parameters"] extends { header?: infer H } ? H : {})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this. Maybe needs a Partial around it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would it need Partial? It seems to be the same output as before

@wolfy1339 wolfy1339 requested a review from Copilot October 20, 2025 04:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to reduce TypeScript compilation complexity by simplifying type definitions and optimizing the build configuration. The changes focus on restructuring complex union-to-intersection type operations into simpler parameter extraction patterns and updating build tooling for better diagnostics.

  • Simplified parameter extraction logic by replacing complex union-to-intersection types with direct parameter mapping
  • Restructured operation types using separate interfaces for better modularity
  • Added build optimization flags and tracing capabilities for performance monitoring

Reviewed Changes

Copilot reviewed 6 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsconfig.test.json Added extended diagnostics flag for better TypeScript compiler insights
src/RequestRequestOptions.ts Changed signal type from AbortSignal to any for broader compatibility
scripts/update-endpoints/typescript.mjs Added readonly method detection logic for endpoint categorization
scripts/update-endpoints/templates/endpoints.ts.template Refactored complex type definitions into simpler interface-based approach
scripts/update-endpoints/fetch-json.mjs Added response code fetching to GraphQL query
package.json Updated test script to include TypeScript trace generation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

* Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests.
*/
signal?: AbortSignal;
signal?: any;
Copy link

Copilot AI Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the signal type from AbortSignal to any removes type safety and could lead to runtime errors. Consider using a union type like AbortSignal | undefined or keeping the original AbortSignal type if compatibility is the concern.

Suggested change
signal?: any;
signal?: AbortSignal | undefined;

Copilot uses AI. Check for mistakes.
@wolfy1339
Copy link
Member

Tested with the octokit and @octokit/core packages, and everything seems fine

@wolfy1339 wolfy1339 merged commit a0529c1 into octokit:main Oct 20, 2025
4 checks passed
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Active Oct 20, 2025
@octokit
Copy link
Contributor

octokit bot commented Oct 20, 2025

🎉 This PR is included in version 15.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@octokit octokit bot added the released label Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants