-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(@octokit/request-error) Fixes depreciation error when accessing error.headers #2064
fix(@octokit/request-error) Fixes depreciation error when accessing error.headers #2064
Conversation
… modifies error headers accordingly
Any chance of getting the above PR merged in? |
+1 on getting this PR merged sometime soon |
Can you fix lint and update the PR? |
Codecov Report
@@ Coverage Diff @@
## main #2064 +/- ##
==========================================
- Coverage 80.19% 80.17% -0.02%
==========================================
Files 66 66
Lines 5413 5413
Branches 1263 1263
==========================================
- Hits 4341 4340 -1
- Misses 709 710 +1
Partials 363 363
Continue to review full report at Codecov.
|
Any update? |
I'm not sure how to get past this Codecov check. There's no longer any change to the |
🚀 PR was released in |
Note : I don't think that has been addressed as I am still seeing it in 10.36.5. Is it possible to re-open the issue ? The current warning is identical to the warning reported above. % yarn --silent auto version
Deprecation: [@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.
at RequestError.get (/Users/nicolasphilippe/Mperativ/GitHub/auto/node_modules/@octokit/core/node_modules/@octokit/request/node_modules/@octokit/request-error/dist-src/index.js:50:32)
at /Users/nicolasphilippe/Mperativ/GitHub/auto/packages/core/src/git.ts:171:24
at /Users/nicolasphilippe/Mperativ/GitHub/auto/node_modules/before-after-hook/lib/add.js:37:18
at Git.getUserByUsername (/Users/nicolasphilippe/Mperativ/GitHub/auto/packages/core/src/git.ts:480:20)
minor % yarn list --pattern auto
yarn list v1.22.18
warning package.json: No license field
warning No license field
├─ @auto-it/all-contributors@10.36.5
├─ @auto-it/bot-list@10.36.5
├─ @auto-it/core@10.36.5
├─ @auto-it/first-time-contributor@10.36.5
├─ @auto-it/git-tag@10.36.5
├─ @auto-it/magic-zero@10.36.5
├─ @auto-it/npm@10.36.5
├─ @auto-it/package-json-utils@10.36.5
├─ @auto-it/released@10.36.5
├─ @auto-it/slack@10.36.5
├─ @auto-it/upload-assets@10.36.5
└─ auto@10.36.5
✨ Done in 0.25s. The problem seems to come from this statement in git.ts, since commenting that out will remove the warning : this.github.hook.error("request", (error) => {
if (error) {
// narrow down the type
if ("headers" in error && error.request.headers.authorization) {
delete error.request.headers.authorization;
delete error.headers.authorization; <-------- error.headers deprecated
}
} The PR doesn't seem to modify this file at all. I am not totally sure what the best course of action is here so please @hipstersmoothie advise. |
What Changed
Updated @octokit/plugin-enterprise-compatibility to version 1.3.0 and modified the way error headers are accessed accordingly.
Why
A depreciation warning was being thrown by
@octokit/request-error
.Issue 2049
Todo:
Change Type
Indicate the type of change your pull request is:
documentation
patch
minor
major
🐤 Download canary assets:
auto-linux--canary.2064.25372.gz
auto-macos--canary.2064.25372.gz
auto-win.exe--canary.2064.25372.gz
📦 Published PR as canary version:
under canary scope @auto-canary@10.33.0--canary.2064.25372.0
✨ Test out this PR locally via:
npm install @auto-canary/bot-list@10.33.0--canary.2064.25372.0 npm install @auto-canary/auto@10.33.0--canary.2064.25372.0 npm install @auto-canary/core@10.33.0--canary.2064.25372.0 npm install @auto-canary/package-json-utils@10.33.0--canary.2064.25372.0 npm install @auto-canary/all-contributors@10.33.0--canary.2064.25372.0 npm install @auto-canary/brew@10.33.0--canary.2064.25372.0 npm install @auto-canary/chrome@10.33.0--canary.2064.25372.0 npm install @auto-canary/cocoapods@10.33.0--canary.2064.25372.0 npm install @auto-canary/conventional-commits@10.33.0--canary.2064.25372.0 npm install @auto-canary/crates@10.33.0--canary.2064.25372.0 npm install @auto-canary/docker@10.33.0--canary.2064.25372.0 npm install @auto-canary/exec@10.33.0--canary.2064.25372.0 npm install @auto-canary/first-time-contributor@10.33.0--canary.2064.25372.0 npm install @auto-canary/gem@10.33.0--canary.2064.25372.0 npm install @auto-canary/gh-pages@10.33.0--canary.2064.25372.0 npm install @auto-canary/git-tag@10.33.0--canary.2064.25372.0 npm install @auto-canary/gradle@10.33.0--canary.2064.25372.0 npm install @auto-canary/jira@10.33.0--canary.2064.25372.0 npm install @auto-canary/magic-zero@10.33.0--canary.2064.25372.0 npm install @auto-canary/maven@10.33.0--canary.2064.25372.0 npm install @auto-canary/microsoft-teams@10.33.0--canary.2064.25372.0 npm install @auto-canary/npm@10.33.0--canary.2064.25372.0 npm install @auto-canary/omit-commits@10.33.0--canary.2064.25372.0 npm install @auto-canary/omit-release-notes@10.33.0--canary.2064.25372.0 npm install @auto-canary/pr-body-labels@10.33.0--canary.2064.25372.0 npm install @auto-canary/released@10.33.0--canary.2064.25372.0 npm install @auto-canary/s3@10.33.0--canary.2064.25372.0 npm install @auto-canary/sbt@10.33.0--canary.2064.25372.0 npm install @auto-canary/slack@10.33.0--canary.2064.25372.0 npm install @auto-canary/twitter@10.33.0--canary.2064.25372.0 npm install @auto-canary/upload-assets@10.33.0--canary.2064.25372.0 npm install @auto-canary/vscode@10.33.0--canary.2064.25372.0 # or yarn add @auto-canary/bot-list@10.33.0--canary.2064.25372.0 yarn add @auto-canary/auto@10.33.0--canary.2064.25372.0 yarn add @auto-canary/core@10.33.0--canary.2064.25372.0 yarn add @auto-canary/package-json-utils@10.33.0--canary.2064.25372.0 yarn add @auto-canary/all-contributors@10.33.0--canary.2064.25372.0 yarn add @auto-canary/brew@10.33.0--canary.2064.25372.0 yarn add @auto-canary/chrome@10.33.0--canary.2064.25372.0 yarn add @auto-canary/cocoapods@10.33.0--canary.2064.25372.0 yarn add @auto-canary/conventional-commits@10.33.0--canary.2064.25372.0 yarn add @auto-canary/crates@10.33.0--canary.2064.25372.0 yarn add @auto-canary/docker@10.33.0--canary.2064.25372.0 yarn add @auto-canary/exec@10.33.0--canary.2064.25372.0 yarn add @auto-canary/first-time-contributor@10.33.0--canary.2064.25372.0 yarn add @auto-canary/gem@10.33.0--canary.2064.25372.0 yarn add @auto-canary/gh-pages@10.33.0--canary.2064.25372.0 yarn add @auto-canary/git-tag@10.33.0--canary.2064.25372.0 yarn add @auto-canary/gradle@10.33.0--canary.2064.25372.0 yarn add @auto-canary/jira@10.33.0--canary.2064.25372.0 yarn add @auto-canary/magic-zero@10.33.0--canary.2064.25372.0 yarn add @auto-canary/maven@10.33.0--canary.2064.25372.0 yarn add @auto-canary/microsoft-teams@10.33.0--canary.2064.25372.0 yarn add @auto-canary/npm@10.33.0--canary.2064.25372.0 yarn add @auto-canary/omit-commits@10.33.0--canary.2064.25372.0 yarn add @auto-canary/omit-release-notes@10.33.0--canary.2064.25372.0 yarn add @auto-canary/pr-body-labels@10.33.0--canary.2064.25372.0 yarn add @auto-canary/released@10.33.0--canary.2064.25372.0 yarn add @auto-canary/s3@10.33.0--canary.2064.25372.0 yarn add @auto-canary/sbt@10.33.0--canary.2064.25372.0 yarn add @auto-canary/slack@10.33.0--canary.2064.25372.0 yarn add @auto-canary/twitter@10.33.0--canary.2064.25372.0 yarn add @auto-canary/upload-assets@10.33.0--canary.2064.25372.0 yarn add @auto-canary/vscode@10.33.0--canary.2064.25372.0