website icon indicating copy to clipboard operation
website copied to clipboard

fix: update code to support @octokit/request v9 and @octokit/graphql v8

Open AritraDey-Dev opened this issue 1 year ago • 9 comments

fixes #3690 Description Update package.json to support @octokit/request v9.2.2 and @octokit/graphql v8.2.1.

  • Update @octokit/graphql to version 8.2.1.
  • Add @octokit/request with version 9.2.2.

Summary by CodeRabbit

  • Chores
    • Updated and reorganized dependencies for improved development and runtime management.
    • Enhanced Jest configuration for better compatibility with certain packages.
  • Refactor
    • Simplified authentication handling for GitHub API requests to streamline internal processes.

AritraDey-Dev avatar Feb 17 '25 14:02 AritraDey-Dev

Walkthrough

The changes update the package.json to add @octokit/graphql version ^8.2.2 as a devDependency while retaining version ^7.0.2 in dependencies. Code using graphql is refactored to use the new auth parameter for authentication. Jest config is updated to ignore transforming certain node_modules packages.

Changes

File(s) Change Summary
package.json Added @octokit/graphql@^8.2.2 to devDependencies, kept existing @octokit/graphql@^7.0.2 in dependencies.
netlify/functions/github_discussions.ts Refactored GraphQL call to use auth parameter for authentication instead of headers object.
netlify/functions/save-discussion-background/helpers.ts Simplified fetchGraphql to use auth parameter for authentication instead of custom headers.
jest.config.js Added transformIgnorePatterns to allow Jest to transform specific node_modules packages; fixed array formatting.

Sequence Diagram(s)

sequenceDiagram
    participant Handler as Lambda Handler
    participant Octokit as @octokit/graphql
    participant GitHub as GitHub API

    Handler->>Octokit: graphql(query, { auth: GITHUB_TOKEN })
    Octokit->>GitHub: Execute GraphQL query with token
    GitHub-->>Octokit: Return data
    Octokit-->>Handler: Return data

Assessment against linked issues

Objective Addressed Explanation
Update code to support @octokit/request v9 and @octokit/graphql v8 (#3690)

Poem

A hop and a skip, dependencies anew,
Octokit upgraded, requests running through!
Jest is now happy, the tests all align,
With tokens in place, our queries divine.
🐇✨ The code’s now refreshed—what a wonderful sign!

[!WARNING] There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm warn config production Use --omit=dev instead. npm warn EBADENGINE Unsupported engine { npm warn EBADENGINE package: '@tisoap/[email protected]', npm warn EBADENGINE required: { node: '>=16', npm: '^8.0.0' }, npm warn EBADENGINE current: { node: 'v24.0.2', npm: '11.3.0' } npm warn EBADENGINE } npm error code ERR_SSL_WRONG_VERSION_NUMBER npm error errno ERR_SSL_WRONG_VERSION_NUMBER npm error request to https://10.0.0.28:4873/@parcel/watcher-wasm/-/watcher-wasm-2.4.1.tgz failed, reason: C03C18514A7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354: npm error npm error A complete log of this run can be found in: /.npm/_logs/2025-05-25T17_36_49_002Z-debug-0.log


📜 Recent review details

Configuration used: .coderabbit.yaml Review profile: CHILL Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b0f9189190c85b9aeb201d340c5a74a531acc11 and ebf7569cc2317c8994239dd2af40f1d5abea7564.

📒 Files selected for processing (1)
  • jest.config.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • jest.config.js
✨ Finishing Touches
  • [ ] 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Feb 17 '25 14:02 coderabbitai[bot]

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
Latest commit 8c6bf48d11903357e4ede0b8c25ce8536de3c996
Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/6839644b5c697c000885d831
Deploy Preview https://deploy-preview-3697--asyncapi-website.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Feb 17 '25 14:02 netlify[bot]

@AritraDey-Dev Make sure all the tests and build pass

anshgoyalevil avatar Feb 23 '25 13:02 anshgoyalevil

@AritraDey-Dev The testing workflow is failing. Are you still willing to continue on this?

nightknighto avatar Mar 19 '25 15:03 nightknighto

@AritraDey-Dev The testing workflow is failing. Are you still willing to continue on this?

Apologies for the delay. I will look into a possible fix. Do you have any insights on why the tests are failing?

AritraDey-Dev avatar Mar 19 '25 15:03 AritraDey-Dev

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 100.00%. Comparing base (ed22aa2) to head (8c6bf48). :warning: Report is 250 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3697   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          778       778           
  Branches       144       144           
=========================================
  Hits           778       778           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar May 24 '25 20:05 codecov[bot]

Thank you for reviewing this, @akshatnema. I’ve reviewed the changes and couldn’t find anything that needs to be updated at the moment. Please let me know if you notice anything that should be addressed.

AritraDey-Dev avatar May 24 '25 20:05 AritraDey-Dev

@AritraDey-Dev please update the project

sambhavgupta0705 avatar Jul 27 '25 05:07 sambhavgupta0705

This pull request has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation.

There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Nov 27 '25 00:11 github-actions[bot]