repo-util 1.8.2 → 1.9.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/package.json +9 -9
- package/src/repo-util-cli.mjs +15 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repo-util",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
"cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m tests/*.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"aggregation-repository-provider": "^3.2.
|
|
25
|
-
"bitbucket-repository-provider": "^3.9.
|
|
24
|
+
"aggregation-repository-provider": "^3.2.48",
|
|
25
|
+
"bitbucket-repository-provider": "^3.9.2",
|
|
26
26
|
"commander": "^8.1.0",
|
|
27
|
-
"gitea-repository-provider": "^1.16.
|
|
28
|
-
"github-repository-provider": "^7.23.
|
|
29
|
-
"local-repository-provider": "^7.0.
|
|
27
|
+
"gitea-repository-provider": "^1.16.27",
|
|
28
|
+
"github-repository-provider": "^7.23.19",
|
|
29
|
+
"local-repository-provider": "^7.0.100"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"ava": "^3.15.0",
|
|
33
|
-
"c8": "^7.
|
|
33
|
+
"c8": "^7.9.0",
|
|
34
34
|
"execa": "^5.1.1",
|
|
35
|
-
"semantic-release": "^
|
|
35
|
+
"semantic-release": "^18.0.0"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=14.17.
|
|
38
|
+
"node": ">=14.17.6"
|
|
39
39
|
},
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
package/src/repo-util-cli.mjs
CHANGED
|
@@ -86,7 +86,7 @@ program
|
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
program
|
|
89
|
-
.command("
|
|
89
|
+
.command("branch <name...>")
|
|
90
90
|
.option("--json", "output as json")
|
|
91
91
|
.action(async name => {
|
|
92
92
|
const provider = await prepareProvider();
|
|
@@ -100,21 +100,22 @@ program
|
|
|
100
100
|
.command("pull-request <name...>")
|
|
101
101
|
.option("--json", "output as json")
|
|
102
102
|
.option("--merge", "merge the pr")
|
|
103
|
-
.action(async(name,options) => {
|
|
103
|
+
.action(async (name, options) => {
|
|
104
104
|
const provider = await prepareProvider();
|
|
105
105
|
|
|
106
106
|
const json = [];
|
|
107
107
|
|
|
108
108
|
for await (const repository of provider.repositories(name)) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
json
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
if (!repository.isArchived) {
|
|
110
|
+
for await (const pr of repository.pullRequestClass.list(repository)) {
|
|
111
|
+
if (options.json) {
|
|
112
|
+
json.push(pr);
|
|
113
|
+
} else {
|
|
114
|
+
console.log(`${pr.identifier}: ${pr.url}`);
|
|
115
|
+
}
|
|
116
|
+
if (options.merge) {
|
|
117
|
+
await pr.merge();
|
|
118
|
+
}
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
}
|
|
@@ -125,7 +126,7 @@ program
|
|
|
125
126
|
});
|
|
126
127
|
|
|
127
128
|
program
|
|
128
|
-
.command("
|
|
129
|
+
.command("repository <name...>")
|
|
129
130
|
.option("--json", "output as json")
|
|
130
131
|
.action(async (name, options) => {
|
|
131
132
|
const provider = await prepareProvider();
|
|
@@ -144,7 +145,7 @@ program
|
|
|
144
145
|
});
|
|
145
146
|
|
|
146
147
|
program
|
|
147
|
-
.command("update-
|
|
148
|
+
.command("update-repository <names...>")
|
|
148
149
|
.action(async (names, options) => {
|
|
149
150
|
const provider = await prepareProvider();
|
|
150
151
|
for await (const repository of provider.repositories(name)) {
|
|
@@ -156,7 +157,7 @@ program
|
|
|
156
157
|
});
|
|
157
158
|
|
|
158
159
|
program
|
|
159
|
-
.command("create-
|
|
160
|
+
.command("create-repository <names...>")
|
|
160
161
|
.action(async (names, options) => {
|
|
161
162
|
const provider = await prepareProvider();
|
|
162
163
|
for (const name of names) {
|