accept-to-ship-action 0.6.1 → 0.6.3
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.
- package/dist/getOcktokit.d.ts +5 -6
- package/dist/getOcktokit.js +9 -6
- package/dist/index.js +2 -1
- package/package.json +7 -7
package/dist/getOcktokit.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
1
|
+
import { type Octokit } from '@octokit/core/dist-types/index.js';
|
|
2
|
+
import { type PaginateInterface } from '@octokit/plugin-paginate-rest';
|
|
3
|
+
import { type Api } from '@octokit/plugin-rest-endpoint-methods/dist-types/types.js';
|
|
4
|
+
export declare function getOctokit(githubToken: string): Octokit & Api & {
|
|
5
|
+
paginate: PaginateInterface;
|
|
7
6
|
};
|
package/dist/getOcktokit.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getOctokit = getOctokit;
|
|
4
|
-
const
|
|
5
|
-
const utils_1 = require("@actions/github/lib/utils");
|
|
4
|
+
const utils_js_1 = require("@actions/github/lib/utils.js");
|
|
6
5
|
const plugin_retry_1 = require("@octokit/plugin-retry");
|
|
7
6
|
const plugin_throttling_1 = require("@octokit/plugin-throttling");
|
|
8
|
-
function getOctokit() {
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const octokit = new Octokit((0, utils_1.getOctokitOptions)(githubToken, {
|
|
7
|
+
function getOctokit(githubToken) {
|
|
8
|
+
const Octokit = utils_js_1.GitHub.plugin(plugin_throttling_1.throttling, plugin_retry_1.retry);
|
|
9
|
+
const octokit = new Octokit((0, utils_js_1.getOctokitOptions)(githubToken, {
|
|
12
10
|
throttle: {
|
|
13
11
|
onRateLimit: (retryAfter, options, _, retryCount) => {
|
|
14
12
|
if (retryCount === 0) {
|
|
@@ -35,5 +33,10 @@ function getOctokit() {
|
|
|
35
33
|
doNotRetry: ['429'],
|
|
36
34
|
},
|
|
37
35
|
}));
|
|
36
|
+
octokit.graphql = octokit.graphql.defaults({
|
|
37
|
+
headers: {
|
|
38
|
+
'X-GitHub-Next-Global-ID': 1,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
38
41
|
return octokit;
|
|
39
42
|
}
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,8 @@ function handlePullRequest(pullRequestNumber) {
|
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
40
40
|
(0, core_1.startGroup)(`Pull Request number: ${pullRequestNumber}`);
|
|
41
|
-
const
|
|
41
|
+
const githubToken = (0, core_1.getInput)('github-token');
|
|
42
|
+
const octokit = (0, getOcktokit_1.getOctokit)(githubToken);
|
|
42
43
|
const owner = github_1.context.repo.owner;
|
|
43
44
|
const repo = github_1.context.repo.repo;
|
|
44
45
|
const mergedBeforeValidations = yield (0, mergePullRequest_1.checkIfPullRequestMerged)(owner, repo, pullRequestNumber, octokit);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "accept-to-ship-action",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.js",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"bundle": "rm -rf bundle && yarn ncc build src/index.ts --external eslint --source-map --license licenses.txt --out bundle",
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"lint": "eslint -c eslint.config.js",
|
|
13
|
-
"_postinstall": "is-ci || husky install",
|
|
14
13
|
"prepublishOnly": "pinst --disable && yarn build",
|
|
15
14
|
"postpublish": "pinst --enable",
|
|
16
|
-
"preversion": "yarn && yarn build && yarn bundle"
|
|
15
|
+
"preversion": "yarn && yarn build && yarn bundle",
|
|
16
|
+
"prepare": "is-ci || husky"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@prettier/plugin-xml": "^3.4.1",
|
|
31
31
|
"@serverless-guru/prettier-plugin-import-order": "^0.4.1",
|
|
32
|
-
"@types/node": "^
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
34
|
-
"@typescript-eslint/parser": "^
|
|
32
|
+
"@types/node": "^22.0.0",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
34
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
35
35
|
"@vercel/ncc": "^0.38.1",
|
|
36
36
|
"eslint": "^9.3.0",
|
|
37
37
|
"eslint-config-prettier": "^9.0.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"pinst": "^3.0.0",
|
|
42
42
|
"prettier": "^3.3.2",
|
|
43
43
|
"typescript": "^5.0.2",
|
|
44
|
-
"typescript-eslint": "^
|
|
44
|
+
"typescript-eslint": "^8.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@actions/core": "^1.10.0",
|