npm-update-package 0.23.2 → 0.24.0
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/README.md
CHANGED
package/dist/app.js
CHANGED
package/dist/github/GitHub.js
CHANGED
|
@@ -20,6 +20,13 @@ class GitHub {
|
|
|
20
20
|
const { data } = await this.octokit.pulls.create(params);
|
|
21
21
|
return data;
|
|
22
22
|
}
|
|
23
|
+
async deleteBranch({ owner, repo, branch }) {
|
|
24
|
+
await this.octokit.git.deleteRef({
|
|
25
|
+
owner,
|
|
26
|
+
repo,
|
|
27
|
+
ref: `heads/${branch}`
|
|
28
|
+
});
|
|
29
|
+
}
|
|
23
30
|
// TODO: fetch all branches with page option
|
|
24
31
|
async fetchBranches(params) {
|
|
25
32
|
const { data } = await this.octokit.repos.listBranches({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PullRequestCloser = void 0;
|
|
4
|
-
// TODO: Add test
|
|
5
4
|
class PullRequestCloser {
|
|
6
5
|
constructor(github) {
|
|
7
6
|
this.github = github;
|
|
@@ -12,6 +11,11 @@ class PullRequestCloser {
|
|
|
12
11
|
repo: pullRequest.base.repo.name,
|
|
13
12
|
pull_number: pullRequest.number
|
|
14
13
|
});
|
|
14
|
+
await this.github.deleteBranch({
|
|
15
|
+
owner: pullRequest.base.repo.owner.login,
|
|
16
|
+
repo: pullRequest.base.repo.name,
|
|
17
|
+
branch: pullRequest.head.ref
|
|
18
|
+
});
|
|
15
19
|
}
|
|
16
20
|
}
|
|
17
21
|
exports.PullRequestCloser = PullRequestCloser;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-update-package",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "CLI tool for creating pull requests to update npm packages",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc --project tsconfig.build.json",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@types/node": "12.20.40",
|
|
38
38
|
"@types/parse-github-url": "1.0.0",
|
|
39
39
|
"@types/semver": "7.3.9",
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "5.10.0",
|
|
41
41
|
"eslint": "8.7.0",
|
|
42
42
|
"eslint-config-standard-with-typescript": "21.0.1",
|
|
43
43
|
"eslint-plugin-import": "2.25.4",
|