-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore.go
More file actions
42 lines (34 loc) · 909 Bytes
/
core.go
File metadata and controls
42 lines (34 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package lab
import "fmt"
type MissingToken struct {
Host string
}
func (m MissingToken) Error() string {
return fmt.Sprintf("no access token found for %s. create one by running `lab auth` in this directory.", m.Host)
}
type Git interface {
LocalBranch() (string, error)
RevList(string, string) ([]string, error)
CommitMessage(string) (string, error)
CommitMessages(string, string) (string, error)
RemoteProject() (RemoteProject, error)
SetAccessToken(RemoteProject, string) error
}
type Gitlab interface {
Project(RemoteProject) (Project, error)
CreateMergeRequest(RemoteProject, *MergeRequest) error
CreateIssue(RemoteProject, *Issue) error
}
type MessageOpts struct {
Edit bool
InputFile string
EditFile string
Topic string
Comment string
}
type Message interface {
GetMessage(*string, MessageOpts) (func() error, error)
}
type Browser interface {
Open(string) error
}