Skip to content

Commit 52c4c32

Browse files
committed
release 7.0.0
1 parent effe558 commit 52c4c32

File tree

13 files changed

+77
-72
lines changed

13 files changed

+77
-72
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/monorepo",
33
"description": "这是一个git工作流工具",
4-
"version": "7.0.0-beta.21",
4+
"version": "7.0.0-beta.22",
55
"packageManager": "[email protected]",
66
"main": "index.js",
77
"files": [

packages/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/api",
33
"description": "gitmars api",
4-
"version": "7.0.0-beta.21",
4+
"version": "7.0.0-beta.22",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",

packages/build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/build",
33
"description": "gitmars build",
4-
"version": "7.0.0-beta.21",
4+
"version": "7.0.0-beta.22",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",

packages/cache/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/cache",
33
"description": "gitmars cache",
4-
"version": "7.0.0-beta.21",
4+
"version": "7.0.0-beta.22",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/core",
33
"description": "gitmars核心程序",
4-
"version": "7.0.0-beta.21",
4+
"version": "7.0.0-beta.22",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",

packages/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/docs",
33
"description": "gitmars文档库",
4-
"version": "7.0.0-beta.21",
4+
"version": "7.0.0-beta.22",
55
"private": false,
66
"files": [
77
"dist",

packages/git/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/git",
33
"description": "gitmars git",
4-
"version": "7.0.0-beta.21",
4+
"version": "7.0.0-beta.22",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",

packages/gitmars/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gitmars",
33
"description": "这是一个git工作流工具",
44
"type": "module",
5-
"version": "7.0.0-beta.21",
5+
"version": "7.0.0-beta.22",
66
"private": false,
77
"bin": {
88
"gitm": "lib/gitm.mjs"

packages/gitmars/src/gitm-approve.ts

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -62,42 +62,42 @@ program.action(async (opt: GitmBuildOption): Promise<void> => {
6262
echo(yellow(t('No merge request record found, process has exited')))
6363
process.exit(0)
6464
}
65+
const choices = []
66+
for await (const mr of mrList) {
67+
const { iid, author, source_branch, target_branch, merge_status, created_at } = mr
68+
mr.notes = (
69+
(await getMergeRequestNotesList({
70+
iid
71+
})) || []
72+
).filter((note: any) => !note.system)
73+
const disabled = merge_status !== 'can_be_merged'
74+
const _time = dayjs(created_at).format('YYYY/MM/DD HH:mm')
75+
choices.push({
76+
name: t(
77+
'{id} request merge {source} to {target} {disabled} | {name} | {comments} | {time}',
78+
{
79+
id: green(iid + ': '),
80+
source: green(source_branch),
81+
target: green(target_branch),
82+
disabled: disabled ? red(`[ ${t('Conflict or no need to merge')} ]`) : '',
83+
name: yellow(author.name),
84+
comments: green(
85+
t('{length} comments', {
86+
length: String(mr.notes.length)
87+
})
88+
),
89+
time: blue(_time)
90+
}
91+
),
92+
value: iid,
93+
// disabled,
94+
checked: false
95+
})
96+
}
6597
const [, iids = []] = await to(
6698
checkbox<number>({
6799
message: t('Please select the merge request to be operated'),
68-
choices: mrList.map(async (mr: any) => {
69-
const { iid, author, source_branch, target_branch, merge_status, created_at } = mr
70-
mr.notes = (
71-
(await getMergeRequestNotesList({
72-
iid
73-
})) || []
74-
).filter((note: any) => !note.system)
75-
const disabled = merge_status !== 'can_be_merged'
76-
const _time = dayjs(created_at).format('YYYY/MM/DD HH:mm')
77-
return {
78-
name: t(
79-
'{id} request merge {source} to {target} {disabled} | {name} | {comments} | {time}',
80-
{
81-
id: green(iid + ': '),
82-
source: green(source_branch),
83-
target: green(target_branch),
84-
disabled: disabled
85-
? red(`[ ${t('Conflict or no need to merge')} ]`)
86-
: '',
87-
name: yellow(author.name),
88-
comments: green(
89-
t('{length} comments', {
90-
length: String(mr.notes.length)
91-
})
92-
),
93-
time: blue(_time)
94-
}
95-
),
96-
value: iid,
97-
// disabled,
98-
checked: false
99-
}
100-
})
100+
choices
101101
})
102102
)
103103
// no records

packages/gitmars/src/gitm-review.ts

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -56,37 +56,42 @@ program.action(async (opt: GitmBuildOption): Promise<void> => {
5656
echo(yellow(t('No merge request record found, process has exited')))
5757
process.exit(0)
5858
}
59+
const choices = []
60+
for await (const mr of mrList) {
61+
const { iid, author, source_branch, target_branch, merge_status, created_at } = mr
62+
mr.notes = (
63+
(await getMergeRequestNotesList({
64+
iid
65+
})) || []
66+
).filter((note: any) => !note.system)
67+
const disabled = merge_status !== 'can_be_merged'
68+
const _time = dayjs(created_at).format('YYYY/MM/DD HH:mm')
69+
choices.push({
70+
name: t(
71+
'{id} request merge {source} to {target} {disabled} | {name} | {comments} | {time}',
72+
{
73+
id: green(iid + ': '),
74+
source: green(source_branch),
75+
target: green(target_branch),
76+
disabled: disabled ? red(`[ ${t('Conflict or no need to merge')} ]`) : '',
77+
name: yellow(author.name),
78+
comments: green(
79+
t('{length} comments', {
80+
length: String(mr.notes.length)
81+
})
82+
),
83+
time: blue(_time)
84+
}
85+
),
86+
value: iid,
87+
// disabled,
88+
checked: false
89+
})
90+
}
5991
const [, iids = []] = await to(
6092
checkbox<number>({
6193
message: t('Please select the merge request to be operated'),
62-
choices: mrList.map((mr: any) => {
63-
const { iid, author, source_branch, target_branch, merge_status, created_at } = mr
64-
const disabled = merge_status !== 'can_be_merged'
65-
const _time = dayjs(created_at).format('YYYY/MM/DD HH:mm')
66-
return {
67-
name: t(
68-
'{id} request merge {source} to {target} {disabled} | {name} | {comments} | {time}',
69-
{
70-
id: green(iid + ': '),
71-
source: green(source_branch),
72-
target: green(target_branch),
73-
disabled: disabled
74-
? red(`[ ${t('Conflict or no need to merge')} ]`)
75-
: '',
76-
name: yellow(author.name),
77-
comments: green(
78-
t('{length} comments', {
79-
length: String(mr.notes.length)
80-
})
81-
),
82-
time: blue(_time)
83-
}
84-
),
85-
value: iid,
86-
// disabled,
87-
checked: false
88-
}
89-
})
94+
choices
9095
})
9196
)
9297
// no records

0 commit comments

Comments
 (0)