mirror of
https://github.com/SethCohen/github-releases-to-discord
synced 2026-09-14 20:13:23 +00:00
chore: added updated dependencies
This commit is contained in:
+9
-9
@@ -3,7 +3,7 @@
|
||||
> Extendable client for GitHub's REST & GraphQL APIs
|
||||
|
||||
[](https://www.npmjs.com/package/@octokit/core)
|
||||
[](https://github.com/octokit/core.js/actions?query=workflow%3ATest+branch%3Amaster)
|
||||
[](https://github.com/octokit/core.js/actions?query=workflow%3ATest+branch%3Amain)
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
@@ -32,11 +32,11 @@ If you don't need the Plugin API then using [`@octokit/request`](https://github.
|
||||
<tr><th>
|
||||
Browsers
|
||||
</th><td width=100%>
|
||||
Load <code>@octokit/core</code> directly from <a href="https://cdn.skypack.dev">cdn.skypack.dev</a>
|
||||
|
||||
Load <code>@octokit/core</code> directly from <a href="https://esm.sh">esm.sh</a>
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import { Octokit } from "https://cdn.skypack.dev/@octokit/core";
|
||||
import { Octokit } from "https://esm.sh/@octokit/core";
|
||||
</script>
|
||||
```
|
||||
|
||||
@@ -83,7 +83,7 @@ const response = await octokit.graphql(
|
||||
}
|
||||
}
|
||||
}`,
|
||||
{ login: "octokit" }
|
||||
{ login: "octokit" },
|
||||
);
|
||||
```
|
||||
|
||||
@@ -166,7 +166,7 @@ octokit.request("POST /repos/{owner}/{repo}/pulls", {
|
||||
owner,
|
||||
repo,
|
||||
title: "My pull request",
|
||||
base: "master",
|
||||
base: "main",
|
||||
head: "my-feature",
|
||||
draft: true,
|
||||
});
|
||||
@@ -271,7 +271,7 @@ If you need a deep or conditional merge, you can pass a function instead.
|
||||
```js
|
||||
const MyOctokit = Octokit.defaults((options) => {
|
||||
return {
|
||||
foo: Object.assign({}, options.foo, { opt2: 1 }),
|
||||
foo: Object.assign({}, options.foo, { opt1: 1 }),
|
||||
};
|
||||
});
|
||||
const octokit = new MyOctokit({
|
||||
@@ -382,7 +382,7 @@ A plugin is a function which gets two arguments:
|
||||
1. the current instance
|
||||
2. the options passed to the constructor.
|
||||
|
||||
In order to extend `octokit`'s API, the plugin must return an object with the new methods.
|
||||
In order to extend `octokit`'s API, the plugin must return an object with the new methods. Please refrain from adding methods directly to the `octokit` instance, especialy if you depend on keys that do not exist in `@octokit/core`, such as `octokit.rest`.
|
||||
|
||||
```js
|
||||
// index.js
|
||||
@@ -425,7 +425,7 @@ const { Octokit } = require("@octokit/core");
|
||||
const MyActionOctokit = Octokit.plugin(
|
||||
require("@octokit/plugin-paginate-rest").paginateRest,
|
||||
require("@octokit/plugin-throttling").throttling,
|
||||
require("@octokit/plugin-retry").retry
|
||||
require("@octokit/plugin-retry").retry,
|
||||
).defaults({
|
||||
throttle: {
|
||||
onAbuseLimit: (retryAfter, options) => {
|
||||
|
||||
Reference in New Issue
Block a user