octokit / action.js Goto Github PK
View Code? Open in Web Editor NEWGitHub API client for GitHub Actions
License: MIT License
GitHub API client for GitHub Actions
License: MIT License
We are using GitHub Actions for a pull request workflow , and We are getting below error in the PR-Process set up . Is it related to octokit ? Can someone help on this
Also attaching raw logs
Uploading error raw logs.txt…
2.4.0
to 2.4.1
.This version is covered by your current version range and after updating it in your project the build failed.
@octokit/core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Each issue template provides a link to CODE_OF_CONDUCT near end.
Currently such link jumps to a wrong url, https://github.com/octokit/action.js/issues/CODE_OF_CONDUCT.md.
The expected destination is https://github.com/octokit/action.js/blob/main/CODE_OF_CONDUCT.md.
No response
No response
No response
follow up to octokit/octokit.js#2098
Lines 43 to 49 in 7b19341
No response
No response
No response
@gr2m While swapping @octokit/rest
to @octokit/action
I've realized that the types are not interchangeable.
This happens because the statements in types.d
are not exactly the same I believe. See exported values below:
On rest:
import { Octokit as Core } from "@octokit/core";
export { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods";
export declare const Octokit: typeof Core & import("@octokit/core/dist-types/types").Constructor<{
paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
} & import("@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types").RestEndpointMethods & import("@octokit/plugin-rest-endpoint-methods/dist-types/types").Api>;
export declare type Octokit = InstanceType<typeof Octokit>
On action:
import { Octokit as Core } from "@octokit/core";
export { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods";
export declare const Octokit: typeof Core & import("@octokit/core/dist-types/types").Constructor<{
paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
} & import("@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types").RestEndpointMethods & import("@octokit/plugin-rest-endpoint-methods/dist-types/types").Api>;
The statement below it's what is causing the issue:
export declare type Octokit = InstanceType<typeof Octokit>
When that is not exported, things like octokit.rest
and octokit.paginate
fail. Not sure if that is intended by I thought that would be good to discuss it here
master
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here is some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
An npm token must be created and set in the NPM_TOKEN
environment variable on your CI environment.
Please make sure to create an npm token and to set it in the NPM_TOKEN
environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/
.
Good luck with your project ✨
Your semantic-release bot 📦🚀
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet.
We recommend using:
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
This issue contains a list of Renovate updates and their statuses.
These updates are awaiting their schedule. Click on a checkbox to ignore the schedule.
24.0.24
to 24.0.25
.This version is covered by your current version range and after updating it in your project the build failed.
@types/jest is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
The current documentation shows examples that pass secret.GITHUB_TOKEN
into the with
input parameters, instead of setting environment variables
@octokit/actions
should work with both
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
as well as
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
The parameters passed in the with:
object are turned into environment variables internally, with an INPUT_
prefix
The npm package of @octokit/action
5.0.3 released does not contain type definition files.
The following shows the comparison with the files of 5.0.2.
5.0.2: https://www.npmjs.com/package/@octokit/action/v/5.0.2?activeTab=code
5.0.3 https://www.npmjs.com/package/@octokit/action/v/5.0.3?activeTab=code
@octokit/action
5.0.3
Since there is no type definition, an error occurs during build.
The following is an example of a build in my project kitsuyui/happy-commit#95 .
import { Octokit } from '@octokit/action';
yarn run v1.22.19
$ ncc build src/index.ts --license licenses.txt
ncc: Version 0.36.1
ncc: Compiling file index.js into CJS
ncc: Using [email protected] (local user-provided)
Error: [tsl] ERROR in /home/yui/happy-commit/src/github.ts(2,25)
TS7016: Could not find a declaration file for module '@octokit/action'. '/home/yui/happy-commit/node_modules/@octokit/action/dist-node/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/octokit__action` if it exists or add a new declaration (.d.ts) file containing `declare module '@octokit/action';`
[tsl] ERROR in /home/yui/happy-commit/src/github.ts(95,28)
TS7006: Parameter 'commit' implicitly has an 'any' type.
[tsl] ERROR in /home/yui/happy-commit/src/index.ts(3,25)
TS7016: Could not find a declaration file for module '@octokit/action'. '/home/yui/happy-commit/node_modules/@octokit/action/dist-node/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/octokit__action` if it exists or add a new declaration (.d.ts) file containing `declare module '@octokit/action';`
at /home/yui/happy-commit/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:1870077
at /home/yui/happy-commit/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:383620
at _done (eval at create (/home/yui/happy-commit/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:20:75523), <anonymous>:9:1)
at eval (eval at create (/home/yui/happy-commit/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:20:75523), <anonymous>:34:22)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I see #329 added proxy environment support but it is a very simple implementation that only handles https_proxy
.
The person that maintains the proxy agent has an expanded version, https://github.com/TooTallNate/node-proxy-agent, which should do a better job of handling https_proxy
and also no_proxy
which isn't currently being handled here.
Basic testing seems to show the following works as expected with the core octokit library, adding in proxy depending on both the https_proxy
and no_proxy
variables.
const ProxyAgent = require('proxy-agent');
const octokitProxy = new Octokit({
request: { agent: new ProxyAgent()}
})
Subtask of octokit/core.js#588
Node v10 has been deprecated so there is no need to keep giving support to it in our CI.
You can find more details here
master
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here is some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
semantic-release cannot push the version tag to the branch master
on the remote Git repository with URL https://x-access-token:[secure]@github.com/octokit/action.js
.
This can be caused by:
Good luck with your project ✨
Your semantic-release bot 📦🚀
Similar/same as actions/github-script#202, when using latest version of @octokit/action, we get the following in our Github actions console:
(node:1578) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
This is coming from proxy-agent, as hashicorp ran into the same problem and fixed it here:
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Location: package.json
Error type: The renovate configuration file contains some invalid settings
Message: Configuration option 'packageRules[0].npm' should be a json object, Invalid configuration option: @pika/pack, Invalid configuration option: author, Invalid configuration option: jest, Invalid configuration option: keywords, Invalid configuration option: license, Invalid configuration option: name, Invalid configuration option: packageRules[0].@octokit/auth-action, Invalid configuration option: packageRules[0].@octokit/core, Invalid configuration option: packageRules[0].@octokit/plugin-paginate-rest, Invalid configuration option: packageRules[0].@octokit/plugin-rest-endpoint-methods, Invalid configuration option: packageRules[0].@octokit/types, Invalid configuration option: packageRules[0].i, Invalid configuration option: packageRules[1].@pika/pack, Invalid configuration option: packageRules[1].@pika/plugin-build-node, Invalid configuration option: packageRules[1].@pika/plugin-ts-standard-pkg, Invalid configuration option: packageRules[1].@types/jest, Invalid configuration option: packageRules[1].@types/node, Invalid configuration option: packageRules[1].fetch-mock, Invalid configuration option: packageRules[1].jest, Invalid configuration option: packageRules[1].prettier, Invalid configuration option: packageRules[1].semantic-release, Invalid configuration option: packageRules[1].semantic-release-plugin-update-version-in-files, Invalid configuration option: packageRules[1].ts-jest, Invalid configuration option: packageRules[1].typescript, Invalid configuration option: publishConfig, Invalid configuration option: release, Invalid configuration option: renovate, Invalid configuration option: scripts, Invalid configuration option: version, The "npm" object can only be configured at the top level of a config but was found inside "packageRules[0]"
node-fetch
is subject to a high severity vulnerability: GHSA-r683-j2x4-v87g
This should be fixable by updating to "@octokit/core": "^3.6.0"
I want you to write the version of Node.js in the README.md. For example, the following.
Browsers |
|
---|---|
Node |
Install with const { Octokit } = require("@octokit/action");
// or: import { Octokit } from "@octokit/action"; |
Node.js version |
20 |
I encountered the following error in my environment when running the latest octokit/action (v6.0.7) on Node.js 16.
/home/runner/work/path-to-directory/node_modules/@octokit/action/node_modules/undici/lib/fetch/response.js:506
ReadableStream
^
ReferenceError: ReadableStream is not defined
at Object.<anonymous> (/home/runner/work/path-to-directory/node_modules/@octokit/action/node_modules/undici/lib/fetch/response.js:506:3)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/home/runner/work/path-to-directory/node_modules/@octokit/action/node_modules/undici/index.js:118:27)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
This error no longer occurs after updating Node.js to 20.
Or even with Node.js 16, the error can be avoided by specifying the version like npm install @octokit/[email protected]
.
octokit/actions v6.0.7
No response
/home/runner/work/path-to-directory/node_modules/@octokit/action/node_modules/undici/lib/fetch/response.js:506
ReadableStream
^
ReferenceError: ReadableStream is not defined
at Object.<anonymous> (/home/runner/work/path-to-directory/node_modules/@octokit/action/node_modules/undici/lib/fetch/response.js:506:3)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32)
at Function.Module._load (node:internal/modules/cjs/loader:911:12)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/home/runner/work/path-to-directory/node_modules/@octokit/action/node_modules/undici/index.js:118:27)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
13.7.0
to 13.7.1
.This version is covered by your current version range and after updating it in your project the build failed.
@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.