@semantic-release/github 8.1.0 → 9.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,35 +0,0 @@
1
- /* istanbul ignore file */
2
-
3
- // If maintaining @octokit/core and the separate plugins gets to cumbersome
4
- // then the `octokit` package can be used which has all these plugins included.
5
- // However the `octokit` package has a lot of other things we don't care about.
6
- // We use only the bits we need to minimize the size of the package.
7
- const {Octokit} = require('@octokit/core');
8
- const {paginateRest} = require('@octokit/plugin-paginate-rest');
9
- const {retry} = require('@octokit/plugin-retry');
10
- const {throttling} = require('@octokit/plugin-throttling');
11
-
12
- const {RETRY_CONF} = require('./definitions/retry');
13
- const {THROTTLE_CONF} = require('./definitions/throttle');
14
- const {version} = require('../package.json');
15
-
16
- const onRetry = (retryAfter, options, octokit, retryCount) => {
17
- octokit.log.warn(`Request quota exhausted for request ${options.method} ${options.url}`);
18
-
19
- if (retryCount <= RETRY_CONF.retries) {
20
- octokit.log.debug(`Will retry after ${retryAfter}.`);
21
- return true;
22
- }
23
- };
24
-
25
- const SemanticReleaseOctokit = Octokit.plugin(paginateRest, retry, throttling).defaults({
26
- userAgent: `@semantic-release/github v${version}`,
27
- retry: RETRY_CONF,
28
- throttle: {
29
- ...THROTTLE_CONF,
30
- onRateLimit: onRetry,
31
- onSecondaryRateLimit: onRetry,
32
- },
33
- });
34
-
35
- module.exports = SemanticReleaseOctokit;