Skip to content

Conversation

@FrankMoreno
Copy link
Contributor

Resolves N/A


Before the change?

Trying to use paginate with the compareCommitsWithBaseHead endpoint returns the following error:

 response.data.total_count = totalCount;
                            ^
TypeError: Cannot create property 'total_count' on string 'https://api.github.com/repos/danger/danger-js/compare/43dde820b424cf11d65e2c42c27b916e162f440a...bdccecb77e0144055fbaea9224f10cf8b1229b68'
    at normalizePaginatedListResponse (Directory/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js:33:29)
    at Object.next (Directory/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js:51:38)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async nextData (Directory/test.mjs:16:16)
    at async Directory/test.mjs:25:1

After the change?

Pagination for those endpoints and other endpoints continues to work as expected.
image

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
Copy link
Contributor

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@wolfy1339 wolfy1339 added the Type: Bug Something isn't working as documented label Jun 27, 2025
@FrankMoreno FrankMoreno marked this pull request as ready for review June 27, 2025 17:17
@FrankMoreno FrankMoreno changed the title fix: handle url in response when using pagination with compareCommits… Handle url in response when using pagination with compareCommits Jun 27, 2025
@wolfy1339 wolfy1339 changed the title Handle url in response when using pagination with compareCommits fix: handle url in response when using pagination with compareCommits Jun 27, 2025
@wolfy1339 wolfy1339 merged commit 8e5da25 into octokit:main Jun 27, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Active Jun 27, 2025
@github-actions
Copy link
Contributor

🎉 This PR is included in version 13.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Type: Bug Something isn't working as documented

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants