11.0.2 fails to create github release
Closed this issue · 4 comments
Describe the bug
I was a bit surprised to see npx auto shipit
has pulled down an auto version that isn't even released yet. Anyway it fails to create github releases, with the following error message. The reason seems to be that make_latest
should be a string ("true", "false" or "legacy"), not a boolean, according to the docs at https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28.
Error message:
For 'properties/make_latest', true is not a string.
at /home/runner/.npm/_npx/2247/lib/node_modules/auto/node_modules/@octokit/request/dist-node/index.js:86:21
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Job.doExecute (/home/runner/.npm/_npx/2247/lib/node_modules/auto/node_modules/bottleneck/light.js:405:18) {
status: 422,
response: {
url: 'https://api.github.com/repos/kinverno/web_data_scraper/releases',
status: 422,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
connection: 'close',
'content-length': '171',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Thu, 07 Sep 2023 07:00:01 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-accepted-github-permissions': 'contents=write',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-api-version-selected': '2022-11-28',
'x-github-media-type': 'github.v3; param=symmetra-preview; format=json',
'x-github-request-id': 'X:X:X:X:X',
'x-ratelimit-limit': '1000',
'x-ratelimit-remaining': '965',
'x-ratelimit-reset': '1694072694',
'x-ratelimit-resource': 'core',
'x-ratelimit-used': '35',
'x-xss-protection': '0'
},
data: {
message: "Invalid request.\n\nFor 'properties/make_latest', true is not a string.",
documentation_url: 'https://docs.github.com/rest/releases/releases#create-a-release'
}
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/kinverno/web_data_scraper/releases',
headers: {
accept: 'application/vnd.github.symmetra-preview+json',
'user-agent': 'octokit-rest.js/18.12.0 octokit-core.js/3.6.0 Node.js/12.22.12 (linux; x64)',
'content-type': 'application/json; charset=utf-8'
},
body: '{"tag_name":"v0.0.15","target_commitish":"X","name":"v0.0.15","body":X","prerelease":false,"make_latest":true}',
request: {
agent: undefined,
hook: [Function: bound bound register],
retryCount: 1
}
}
}
To Reproduce
Expected behavior
Screenshots
Environment information:
npx auto shipit
, runing on github actions.
Additional context
I am facing the same issue, should I be going back to previous version as a workaround?
The issue is introduced in packages/core/src/git.ts
with this PR: https://github.com/intuit/auto/pull/2391/files
The make_latest
property has to be a string not a boolean value. Its an easy fix though, I can try to help fix it but I am not a proper javascript developer. Anyone taking this up?
🚀 Issue was released in v11.0.3
🚀