octokit / app.js Goto Github PK
View Code? Open in Web Editor NEWGitHub Apps toolset for Node.js
License: MIT License
GitHub Apps toolset for Node.js
License: MIT License
6.0.2
to 6.1.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
mocha 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.
options
parameter (@plroebuck).jsonc
extension (@sstephant)These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:
this.skip()
in "before each" hooks (@juergba)--allow-uncaught
for uncaught exceptions thrown inside hooks (@givanse)and some regressions:
Suite
cloning by copying root
property (@fatso83)The new version differs by 28 commits.
f4fc95a
Release v6.1.0
bd29dbd
update CHANGELOG for v6.1.0 [ci skip]
aaf2b72
Use cwd-relative pathname to load config file (#3829)
b079d24
upgrade deps as per npm audit fix; closes #3854
e87c689
Deprecate this.skip() for "after all" hooks (#3719)
81cfa90
Copy Suite property "root" when cloning; closes #3847 (#3848)
8aa2fc4
Fix issue 3714, hide pound icon showing on hover header on docs page (#3850)
586bf78
Update JS-YAML to address security issue (#3845)
d1024a3
Update doc examples "tests.html" (#3811)
1d570e0
Delete "/docs/example/chai.js"
ade8b90
runner.js: "self.test" undefined in Browser (#3835)
0098147
Replace findup-sync with find-up for faster startup (#3830)
d5ba121
Remove "package" flag from sample config file because it can only be passes as CLI arg (#3793)
a3089ad
update package-lock
75430ec
Upgrade yargs-parser dependency to avoid loading 2 copies of yargs
There are 28 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Error: Package exports for '/app/node_modules/@octokit/endpoint/node_modules/is-plain-object' do not define a valid '.' target
After updating from library version v4.1.0 to v10+ I'm getting this issue. I have added https://github.com/octokit/auth-app.js as well for legacy code, but the error remains when trying to compile (using Typescript).
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.
I use this package in my programs and would love some TypeScript definitions for this package.
Since all the other packages seem to have some (mostly), I wanted to suggest to add them here.
βοΈ Important announcement: Greenkeeper will be saying goodbye π and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io
25.2.1
to 25.3.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
ts-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 π΄
This is a follow up to #201 @G-Rath @oscard0m @wolfy1339
I get the following error since yesterdays lock file update which bumped @octokit/webhooks
from 8.4.1 to 8.5.3 and @octokit/webhooks-definitions
to 3.61.0 to 3.62.5
Any idea what it could be?
error TS2344: Type '(BaseWebhookEvent<"push"> | BaseWebhookEvent<"public"> | BaseWebhookEvent<"label"> | BaseWebhookEvent<"meta"> | ... 199 more ... | (BaseWebhookEvent<...> & { ...; })) & { ...; }' does not satisfy the constraint 'Options<unknown>'.
Type 'BaseWebhookEvent<"push"> & { octokit: Octokit; }' has no properties in common with type 'Options<unknown>'.
13 ): Webhooks<EmitterWebhookEvent & { octokit: Octokit }> {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/webhooks.ts:14:3 - error TS2322: Type 'Webhooks<{ secret: string; path: string; transform: (event: BaseWebhookEvent<"push"> | BaseWebhookEvent<"public"> | BaseWebhookEvent<"label"> | ... 200 more ... | (BaseWebhookEvent<...> & { ...; })) => Promise<...>; }>' is not assignable to type 'Webhooks<(BaseWebhookEvent<"push"> | BaseWebhookEvent<"public"> | BaseWebhookEvent<"label"> | BaseWebhookEvent<"meta"> | ... 199 more ... | (BaseWebhookEvent<...> & { ...; })) & { ...; }>'.
Type '{ secret: string; path: string; transform: (event: BaseWebhookEvent<"push"> | BaseWebhookEvent<"public"> | BaseWebhookEvent<"label"> | ... 200 more ... | (BaseWebhookEvent<...> & { ...; })) => Promise<...>; }' is not assignable to type '(BaseWebhookEvent<"push"> | BaseWebhookEvent<"public"> | BaseWebhookEvent<"label"> | BaseWebhookEvent<"meta"> | ... 199 more ... | (BaseWebhookEvent<...> & { ...; })) & { ...; }'.
Type '{ secret: string; path: string; transform: (event: BaseWebhookEvent<"push"> | BaseWebhookEvent<"public"> | BaseWebhookEvent<"label"> | ... 200 more ... | (BaseWebhookEvent<...> & { ...; })) => Promise<...>; }' is not assignable to type 'BaseWebhookEvent<"workflow_run"> & { payload: { action: "requested"; }; } & { octokit: Octokit; }'.
Type '{ secret: string; path: string; transform: (event: BaseWebhookEvent<"push"> | BaseWebhookEvent<"public"> | BaseWebhookEvent<"label"> | ... 200 more ... | (BaseWebhookEvent<...> & { ...; })) => Promise<...>; }' is missing the following properties from type 'BaseWebhookEvent<"workflow_run">': id, name, payload
14 return new Webhooks({
~~~~~~~~~~~~~~~~~~~~~
15 secret: options.secret,
~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
57 },
~~~~~~
58 });
~~~~~
follow up to octokit/webhooks.js#534 by @honnix.
This issue is meant as a reminder to double check that we implemented the node middleware correctly to work with express as expected.
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: license, Invalid configuration option: main, Invalid configuration option: name, Invalid configuration option: packageRules[0].@octokit/auth-app, Invalid configuration option: packageRules[0].@octokit/auth-unauthenticated, Invalid configuration option: packageRules[0].@octokit/core, Invalid configuration option: packageRules[0].@octokit/oauth-app, Invalid configuration option: packageRules[0].@octokit/plugin-paginate-rest, Invalid configuration option: packageRules[0].@octokit/types, Invalid configuration option: packageRules[0].@octokit/webhooks, 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].@types/node-fetch, Invalid configuration option: packageRules[1].fetch-mock, Invalid configuration option: packageRules[1].jest, Invalid configuration option: packageRules[1].mockdate, Invalid configuration option: packageRules[1].node-fetch, 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]"
Passing a PEM private key (in double quotes with line breaks replaced with \n, as shown in docs) to app.getSignedJsonWebToken()
yields "error:0906D06C:PEM routines:PEM_read_bio:no start line". I'm using the function in a node lambda with a simple configuration:
const APP_ID = process.env.GITHUB_APP_ID;
const PRIVATE_KEY = process.env.GITHUB_PRIVATE_KEY;
const app = new App({ id: APP_ID, privateKey: PRIVATE_KEY });
const jwt = app.getSignedJsonWebToken();
As a note, logging the app ID and private key does show them both being brought in correctly.
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
Occurred here after upgrading to @octokit/webhooks
v8:
https://github.com/octokit/app.js/runs/1858152718?check_suite_focus=true#step:5:14
node_modules/typescript/bin/tsc --outDir pkg/dist-src/ -d --declarationDir pkg/dist-types/ --project tsconfig.json --target es2020 --module esnext --noEmit false --sourceMap false
src/webhooks.ts:8:17 - error TS4058: Return type of exported function has or is using name 'BaseWebhookEvent' from external module "node_modules/@octokit/webhooks/dist-types/types" but cannot be named.
8 export function webhooks(
~~~~~~~~
@G-Rath @wolfy1339 @oscard0m does that error ring a bell?
5.0.0
to 5.0.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@octokit/request 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 π΄
From the code it looks like the cache is specific to the instantiation of new App()
. Could you confirm? Thanks.
12.x
branch failed. π¨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
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 fix 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 12.x
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are 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.
12.0.7
on branch 12.x
cannot be published as it is out of range.Based on the releases published on other branches, only versions within the range >=12.0.6 <12.0.6
can be published from branch 12.x
.
The following commits are responsible for the invalid release:
@octokit/webhooks
to v10 (#297) (1da972d)Those commits should be moved to a valid branch with git merge or git cherry-pick and removed from branch 12.x
with git revert or git reset.
A valid branch could be master
.
See the workflow configuration documentation for more details.
Good luck with your project β¨
Your semantic-release bot π¦π
We are using GitHub 2.22 which does not seem to send x-hub-signature-256
in the webhook header, only x-hub-signature
.
This is causing an {"error":"Required headers missing: x-hub-signature-256"}
when using the @octokit/app
module.
Is there a way to tell the Octokit to use x-hub-signature
instead of x-hub-signature-256
?
The dist-types
folder is not getting published to npm
Apparently, since npm 9
the file pattern matching for npm publish
has changed, but nothing was reported in their Changelog (I'm assuming it's an unintended change).
@octokit/app
14.0.0-beta.2
N/A
I want to use the function, but always return an error...
`:\workspace\Accentio Devops\node_modules@octokit\auth-app\dist-node\index.js:201
throw new Error("[@octokit/auth-app] installationId option is required for installation authentication.");
^
Error: [@octokit/auth-app] installationId option is required for installation authentication.
at getInstallationAuthentication (C:\workspace\Accentio Devops\node_modules@octokit\auth-app\dist-node\index.js:201:11) at auth (C:\workspace\Accentio Devops\node_modules@octokit\auth-app\dist-node\index.js:336:12)
at getInstallationOctokit (C:\workspace\Accentio Devops\node_modules@octokit\app\dist-node\index.js:217:22)
at AuthController.getInstallationClientByInstallationId (C:\workspace\Accentio Devops\src\authentication\AuthController.js:115:40)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
at async C:\workspace\Accentio Devops\src\main.js:15:20
npm ERR! code 1
npm ERR! path C:\workspace\Accentio Devops
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node src/main.js`
How i use this command?, the documentation is null.....
Im using in this way... like the documentation page:
const { octokit } = await this.app.getInstallationOctokit(installationAccessToken.token);
1.17.1
to 1.18.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
prettier 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.
π Release Notes
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
This library is being deprecated in favor of https://github.com/octokit/auth-app.js/. The @octokit/app
package will likely be repurposed in future.
My migration plan is as follows:
5.x
branch and make it the default branch. Remove all code. Make the default export log a deprecation message, linking to the new README.md in the 5.x
branch. The new README.md will explain that the package was deprecated in favor of @octokit/auth-app
and how to migrate from one to the other.If repurposed in future, make the next release version 10
https://registry.npmjs.org/@octokit%2fapp is not found. :( it was working before. I also saw that the npm button is now invalid.
When I try to use this function I get the following error:
TypeError: t.writeHead is not a function
at Object.T [as onUnhandledRequest] (https://esm.sh/v95/@octokit/[email protected]/deno/app.js:2:3458)
at G (https://esm.sh/v95/@octokit/[email protected]/deno/app.js:2:4308)
at Server.#respond (https://deno.land/[email protected]/http/server.ts:298:37)
at Server.#serveHttp (https://deno.land/[email protected]/http/server.ts:340:20)
I'm assuming this function is Node only so I tried to implement a basic receiver that I could use to receive events but it errors too:
await serve(async (req) => {
const body = await req.text();
await app.webhooks.verifyAndReceive({
id: req.headers.get("x-github-delivery") ?? "",
name: req.headers.get(
"x-github-event",
) as EmitterWebhookEventWithStringPayloadAndSignature["name"] ?? "",
signature: req.headers.get("x-hub-signature-256") ?? "",
payload: body,
});
return new Response("ok");
}, { port: 3000 });
TypeError: Cannot read properties of null (reading 'map')
at o (https://esm.sh/v95/@octokit/[email protected]/deno/webhooks-methods.js:2:256)
at y (https://esm.sh/v95/@octokit/[email protected]/deno/webhooks-methods.js:2:195)
at async x (https://esm.sh/v95/@octokit/[email protected]/deno/webhooks.js:2:8000)
at async Server.serve.port (file:///home/xenfo/projects/maintainer/src/index.ts:48:3)
at async Server.#respond (https://deno.land/[email protected]/http/server.ts:298:18)
So how would I create the server?
What happened?
see octokit/octokit.js#24 (comment)
What the problem might be
We have to remove the type imports from node's "http"
package.
compare the change at octokit/webhooks.js@662f35c
βοΈ Important announcement: Greenkeeper will be saying goodbye π and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io
5.3.3
to 5.3.4
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@octokit/request 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 π΄
Background:
I'm wondering if there are any existing ways to perform such a "sync" more efficiently - whether exposed currently through this library or not.
I'm curious if there's any retry functionality available as there is for the rest.js API. Retry is necessary due to network instability with github.
How can I get this to work with @octokit/graphql
https://www.npmjs.com/package/@octokit/graphql#authentication
import { Octokit } from "@octokit/rest";
import { graphql } from "@octokit/graphql";
import { App } from "@octokit/app";
const octokit = async () => {
const app = new App({
appId: process.env.GITHUB_APP_ID ?? "",
privateKey: process.env.GITHUB_PRIVATE_KEY ?? "",
oauth: {
clientId: process.env.GITHUB_CLIENT_ID ?? "",
clientSecret: process.env.GITHUB_CLIENT_SECRET ?? "",
},
Octokit,
});
let installationId = 123;
for await (const { installation } of app.eachInstallation.iterator()) {
installationId = installation.id;
}
const octokit = await app.getInstallationOctokit(installationId);
const graphqlWithAuth = graphql.defaults({
request: {
hook: octokit.hook,
},
});
return {
...octokit,
graphql: graphqlWithAuth,
};
};
Error I'm receiving: error - Error: method for before hook must be a function
Which I believe is coming from this webhook line
The reason I'm looking for octokit.hook
is because the @octokit/graphql
docs show a hook
as the way to auth.
const { createAppAuth } = require("@octokit/auth-app");
const auth = createAppAuth({
appId: process.env.APP_ID,
privateKey: process.env.PRIVATE_KEY,
installationId: 123,
});
const graphqlWithAuth = graphql.defaults({
request: {
hook: auth.hook,
},
});
I believe that I'm going to need to load in @octokit/auth-app
as well to be able to graphql
auth. I just want to make sure that's what is expected.
No response
No response
No response
This would use this endpoint:
https://docs.github.com/en/rest/reference/apps#list-repositories-accessible-to-the-user-access-token
But I want to make sure that there is an actual usecase for iterating through all installation, and then check for repositories accessible by the user in each one of them with the user-to-server token.
Are there any docs for this library? Having trouble locating them, I see a bunch of octokit stuff but not for this app package.
No response
No response
No response
βοΈ Important announcement: Greenkeeper will be saying goodbye π and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io
2.0.1
to 2.0.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
prettier 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 π΄
const { Octokit } = require("@octokit/rest")
const app = new App({
appId: 123,
privateKey: "-----BEGIN PRIVATE KEY-----\n...",
Octokit
});
app.octokit.issues.create // should get TypeScript IntelliSense
I'm unable to use octokit/app.js because the "breaking" change is only a minor version bump (9.8.0 to 9.8.1) and is "compatible".
octokit/webhooks.js#593
const { App, createNodeMiddleware } = require('@octokit/app');
const app = new App({
appId: "122298",
webhooks: { secret: process.env.webhookssecret },
oauth: {
clientId: process.env.clientId,
clientSecret: process.env.clientSecret,
},
privateKey: process.env.privateKey,
});
app.webhooks.onError(e => {
console.error("Webhook failed");
console.error(e.event);
})
require("http").createServer(createNodeMiddleware(app)).listen(process.env.PORT);
Webhook failed
Error: [@octokit/webhooks] signature does not match event payload and secret
at verifyAndReceive (C:\Users\denro\sources\ConflictResolver\node_modules\@octokit\app\node_modules\@octokit\webhodules\@octokit\webhooks\dist-node\index.js:259:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async middleware (C:\Users\denro\sources\ConflictResolver\node_modules\@octokit\app\node_modules\@octokit\webhodules\@octokit\webhooks\dist-node\index.js:344:5) {
event: {
id: 'b7479b30-d1f8-11eb-94a6-6aa61ee800f9',
name: 'issue_comment',
payload: {
action: 'created',
issue: [Object],
comment: [Object],
repository: [Object],
sender: [Object],
installation: [Object]
},
signature: 'sha256=6df88c02f8ba3dcc667f1bbcd980ecd4a4ae9f6611efc115df58a8fcffbbacce'
},
status: 400
}
I noticed that the default LRU expiry is after 59 minutes. I'm sure there's plenty of apps who need a token with more than 1 minute validity, and a token expiring mid-way through an app's job is pretty confusing to debug, so it would be nice if the cache ttl could be configurable without needing to substitute an entirely new cache.
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
According to README, users can optionally pass installation ID to iterate through all repositories in one installation to app.eachRepository
:
for await (const { octokit, repository } of app.eachRepository.iterator({ installationId })) { /* ... */ }
await app.eachRepository({ installationId }, ({ octokit, repository }) => /* ... */)
That seems to be important -- to avoid fetching all repositories of all installations when you only want to iterate through repositories of a specific installation --, but it does not seem to be implemented (https://github.com/octokit/app.js/blob/master/src/each-repository.ts).
I'm having an issue when requesting an endpoint using app.octokit.request()
, how do I fix this?
Example code (typescript):
import { config } from 'dotenv';
import { App } from '@octokit/app';
import { readFileSync } from 'fs';
config();
const app = new App({
appId: process.env.APP_ID ?? '',
privateKey: readFileSync('./private_key.pem').toString(),
});
app.octokit.request('GET /repos/{owner}/{repo}/commits', {
owner: 'microsoft',
repo: 'vscode',
}).catch(err => {
if (err instanceof Error) {
console.error(err.stack);
}
});
Output:
Error: [@octokit/auth-app] installationId option is required for installation authentication.
at getInstallationAuthentication (node_modules/@octokit/auth-app/dist-node/index.js:213:11)
at hook (node_modules/@octokit/auth-app/dist-node/index.js:437:13)
at node_modules/before-after-hook/lib/register.js:25:15
When using with GitHub Enterprise behind a self signed certificate, how can I pass a custom agent to getInstallationAccessToken
as I can do with new Octokit({agent})
?
In the sample code we get an HttpError: Resource not accessible by integration
We need to get it from app.eachInstallation
and pass the id to app.eachRepository
.
Whatβs missing?
import { createNodeMiddleware } from "@octokit/app"
Why?
We currently have an inconsistent naming for a method that exports a http middleware that is compatible with Node's built in http server as well as express. @octokit/app
currently exports getNodeMiddleware
, but in other modules and in @probot we use the name createNodeMiddleware
.
How
Start by creating /test/deprecations.test.ts
, similar to probot's deprecation tests in v10. The test should import getNodeMiddleware
and use it, then verify that a deprecation message was logged.
You can start a pull request draft at this point.
Then update the existing tests to import createNodeMiddleware
instead of getNodeMiddleware
.
Finally implement the deprecation log when calling getNodeMiddleware
and the new createNodeMiddleware
export
I have an app which uses getInstallationAccessToken()
, and that function is not available anymore in the new version v10. I would appreciate a migration guide which explains how to migrate my code.
Installation tokens expire after 1h. Probot implemented a caching for that:
I do not think that we need to make the timeout configurable. The better solution will be to check if a new installation token is necessary right before sending a request, not when receiving a webhook
@octokit/app
could probably run in browsers, but the jsonwebtoken
dependency increases the bundle size largely. There are alternative such as https://github.com/cisco/node-jose and https://github.com/square/js-jose which take advantage of the WebCrypto API. For Octokit, we only need a slight subset of what these libraries provide, so it might be worth to build a custom package.
node_modules/@octokit/app/index.d.ts(1,22): error TS7016: Could not find a declaration file for module 'lru-cache'. 'C:/code/functions/node_modules/lru-cache/index.js' implicitly has an 'any' type.
Try npm install @types/lru-cache
if it exists or add a new declaration (.d.ts) file containing declare module 'lru-cache';
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/app.js
.
This can be caused by:
Good luck with your project β¨
Your semantic-release bot π¦π
Whatβs missing?
Compare https://github.com/octokit/oauth-app.js#oauthappdefaultsoptions and https://github.com/octokit/core.js#defaults
const MyApp = App.defaults({
/* set default constructor options */
})
Why?
Needed for the octokit
module, see octokit/octokit.js#15. The Octokit
constructor needs to be set to Octokit
exported by the octokit
module, which includes several plugins.
Alternatives you tried
I could implement the defaults functionality within octokit
but there it's the same amount of work, and App.defaults()
will be useful outside of octokit
heya, we are using octokit for our cicd. It relies on an older version of node and upgrading node would require us to fork upstream projects.
It looks like between 12.0.5 and 12.0.6 in these commits https://github.com/octokit/webhooks.js/pull/555/files and octokit/webhooks.js@e887f05 , node support was removed for 10/12 in the webhooks library. This is cool and exciting! It also has taken down our CI platform's ability to run CI builds at all by breaking the upstream proj's use of octokit. Our CI platform shells out to yarn add
to grab dependencies for CI glue code.
Would it be possible to push a patch version that is compatible with node 10/12? Then make a major release that discontinues support for node 10/12?
We tried to do some npm/yarn resolutions stuff https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/ but are stuck on an old yarn version too. We are definitely doing our best to prioritize this stuff but it is an old wide reaching CI system(we're actively migrating projects to a new CI system but have some ways to go).
thank you! let me know if you need any more information
Hi there!
Thanks for the awesome library here.
Currently I'm struggling with using it as a base for our Node.JS internal GHE Apps. Got an error Integration must generate a public key
. I found a relevant octokit/octokit.rb#1080.
But for now base url seems hardcoded to https://api.github.com
through @octokit/request
and I can't see a way it can be overwritten from app.js instance.
Am I missing something?
Do you have any plans to support GHE endpoints?
Or would you accept a PR for this behaviour?
Thanks!
Hi, Octokit is great. That first.
Just a short question on general flow for SaaS apps that integrate Github Apps. I'm building https://checklyhq.com and have a use case for users installing my Github App and my SaaS taking action on certain webhooks.
User installs app. This I have figured out. I redirect the user to the Github hosted install page and get a callback on a URL.
The URL contains the installation_id of the app. This is important. I save this in the user's profile in my database.
Some time later, or directly after, the user navigates in my SaaS app and needs to select a repo in his/her account he/she wants to use as a trigger for actions in my SaaS.
For this, I need to list the user's repos. I can do this with octokit.repos.listForUser()
but I need the username for this to work. I don't have that.
Do I need to explicitly fetch the username / owner associated with the installation_id or is there some quick other way I have missed?
P.S. I can do this, I can fetch all data using JWT and InstallationID tokens. Works all fine. Just seems a lot of work...
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.