mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 01:24:05 +08:00
pro git
This commit is contained in:
parent
8399542454
commit
3d5eddec4f
@ -7,6 +7,7 @@ import (
|
||||
ice "github.com/shylinux/icebergs"
|
||||
"github.com/shylinux/icebergs/base/cli"
|
||||
"github.com/shylinux/icebergs/base/ctx"
|
||||
"github.com/shylinux/icebergs/base/mdb"
|
||||
"github.com/shylinux/icebergs/base/nfs"
|
||||
"github.com/shylinux/icebergs/core/code"
|
||||
kit "github.com/shylinux/toolkits"
|
||||
@ -60,11 +61,12 @@ const SPIDE = "spide"
|
||||
|
||||
func init() {
|
||||
Index.Merge(&ice.Context{Commands: map[string]*ice.Command{
|
||||
SPIDE: {Name: "spide name auto", Help: "构架图", Meta: kit.Dict(
|
||||
SPIDE: {Name: "spide name@key auto", Help: "构架图", Meta: kit.Dict(
|
||||
kit.MDB_DISPLAY, "/plugin/story/spide.js",
|
||||
), Action: map[string]*ice.Action{
|
||||
ctx.COMMAND: {Name: "ctx.command"},
|
||||
code.INNER: {Name: "web.code.inner"},
|
||||
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(REPOS)
|
||||
}}, ctx.COMMAND: {Name: "ctx.command"}, code.INNER: {Name: "web.code.inner"},
|
||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
if len(arg) == 0 { // 仓库列表
|
||||
m.Cmdy(REPOS)
|
||||
|
@ -91,7 +91,10 @@ const (
|
||||
MAKE = "make"
|
||||
PUSH = "push"
|
||||
|
||||
ADD = "add"
|
||||
ADD = "add"
|
||||
OPT = "opt"
|
||||
PRO = "pro"
|
||||
|
||||
DIFF = "diff"
|
||||
COMMIT = "commit"
|
||||
)
|
||||
@ -124,8 +127,9 @@ func init() {
|
||||
ADD: {Name: "add", Help: "添加", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Option(cli.CMD_DIR, _repos_path(m.Option(kit.MDB_NAME)))
|
||||
m.Cmdy(cli.SYSTEM, GIT, ADD, m.Option(kit.MDB_FILE))
|
||||
}},
|
||||
COMMIT: {Name: "commit action=opt,add comment=some", Help: "提交", Hand: func(m *ice.Message, arg ...string) {
|
||||
}}, OPT: {Name: "opt", Help: "优化"}, PRO: {Name: "pro", Help: "体验"},
|
||||
|
||||
COMMIT: {Name: "commit action=pro,opt,add comment=some", Help: "提交", Hand: func(m *ice.Message, arg ...string) {
|
||||
if arg[0] == kit.MDB_ACTION {
|
||||
m.Option(kit.MDB_TEXT, arg[1]+" "+arg[3])
|
||||
} else {
|
||||
|
@ -3,6 +3,8 @@ package git
|
||||
import (
|
||||
ice "github.com/shylinux/icebergs"
|
||||
"github.com/shylinux/icebergs/base/ctx"
|
||||
"github.com/shylinux/icebergs/base/mdb"
|
||||
"github.com/shylinux/icebergs/core/code"
|
||||
kit "github.com/shylinux/toolkits"
|
||||
)
|
||||
|
||||
@ -13,7 +15,9 @@ func init() {
|
||||
TREND: {Name: "trend name@key begin_time@date auto", Help: "趋势图", Meta: kit.Dict(
|
||||
kit.MDB_DISPLAY, "/plugin/story/trend.js",
|
||||
), Action: map[string]*ice.Action{
|
||||
ctx.COMMAND: {Name: "ctx.command"},
|
||||
mdb.INPUTS: {Name: "inputs", Help: "补全", Hand: func(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(REPOS, ice.OptionFields("name,time"))
|
||||
}}, ctx.COMMAND: {Name: "ctx.command"}, code.INNER: {Name: "web.code.inner"},
|
||||
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||
if len(arg) == 0 { // 仓库列表
|
||||
m.Cmdy(REPOS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user