Add support for git push messages

This commit is contained in:
Sam
2019-06-12 17:21:32 -04:00
parent 63e41c70ab
commit a3c0fbf447
3 changed files with 29 additions and 6 deletions

View File

@ -30,10 +30,33 @@ type chatInAddedtoteam struct {
type chatInBulkaddtoconv struct {
Usernames []string `json:"usernames"`
}
type chatInCommits struct {
CommitHash string `json:"commitHash"`
Message string `json:"message"`
AuthorName string `json:"authorName"`
AuthorEmail string `json:"authorEmail"`
Ctime int `json:"ctime"`
}
type chatInRefs struct {
RefName string `json:"refName"`
Commits []chatInCommits `json:"commits"`
MoreCommitsAvailable bool `json:"moreCommitsAvailable"`
IsDelete bool `json:"isDelete"`
}
type chatInGitpush struct {
Team string `json:"team"`
Pusher string `json:"pusher"`
RepoName string `json:"repoName"`
RepoID string `json:"repoID"`
Refs []chatInRefs `json:"refs"`
PushType int `json:"pushType"`
PreviousRepoName string `json:"previousRepoName"`
}
type chatInSystem struct {
SystemType int `json:"systemType"`
Addedtoteam chatInAddedtoteam `json:"addedtoteam"`
Bulkaddtoconv chatInBulkaddtoconv `json:"bulkaddtoconv"`
Gitpush chatInGitpush `json:"gitpush"`
}
type chatInResult struct {
ResultTyp int `json:"resultTyp"`

View File

@ -43,12 +43,12 @@ type chatOutResultRatelimits struct {
Gas int `json:"gas,omitempty"`
}
type conversation struct {
ID string `json:"id"`
ID string `json:"id"`
Channel Channel `json:"channel"`
Unread bool `json:"unread"`
ActiveAt int `json:"active_at"`
ActiveAtMs int64 `json:"active_at_ms"`
MemberStatus string `json:"member_status"`
Unread bool `json:"unread"`
ActiveAt int `json:"active_at"`
ActiveAtMs int64 `json:"active_at_ms"`
MemberStatus string `json:"member_status"`
}
type ChatOut struct {
Message string `json:"message,omitempty"`

View File

@ -27,7 +27,7 @@ type Keybase struct {
// Chat holds basic information about a specific conversation
type Chat struct {
keybase Keybase
keybase Keybase
Channel Channel
}