aboutsummaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
authorJosh Bialkowski <josh.bialkowski@gmail.com>2019-11-22 22:34:19 -0800
committerJosh Bialkowski <josh.bialkowski@gmail.com>2019-12-18 07:42:16 -0800
commitcd889572f7870a62758240b323a9086a76c5120a (patch)
tree2d8a210632e3b82517cd259760e94e375ebff123 /cache
parent7657a38ff20a7b3b2dbec5e6c981038c871f46e7 (diff)
downloadgit-bug-cd889572f7870a62758240b323a9086a76c5120a.tar.gz
codereview #2: some cleanup, correct use of nothing-events
* return error, don't panic * skipping status export is an error * use switch in config.go * move PromptPassword to input * move client construction into getIdentityClient * use non-pointer context throughout client since it is an interface * remove some TODOs * don't emit multiple nothing-events, just one per bug only if nothing happened. * rename EditBody to EditCreateComment * add configuration notes about additional values * store bug id map in a dictionary in the config * some fixes from testing
Diffstat (limited to 'cache')
-rw-r--r--cache/bug_cache.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cache/bug_cache.go b/cache/bug_cache.go
index 965ebe94..b86b31e0 100644
--- a/cache/bug_cache.go
+++ b/cache/bug_cache.go
@@ -210,17 +210,17 @@ func (c *BugCache) SetTitleRaw(author *IdentityCache, unixTime int64, title stri
return op, c.notifyUpdated()
}
-func (c *BugCache) EditBody(body string) (*bug.EditCommentOperation, error) {
+func (c *BugCache) EditCreateComment(body string) (*bug.EditCommentOperation, error) {
author, err := c.repoCache.GetUserIdentity()
if err != nil {
return nil, err
}
- return c.EditBodyRaw(author, time.Now().Unix(), body, nil)
+ return c.EditCreateCommentRaw(author, time.Now().Unix(), body, nil)
}
-func (c *BugCache) EditBodyRaw(author *IdentityCache, unixTime int64, body string, metadata map[string]string) (*bug.EditCommentOperation, error) {
- op, err := bug.EditBody(c.bug, author.Identity, unixTime, body)
+func (c *BugCache) EditCreateCommentRaw(author *IdentityCache, unixTime int64, body string, metadata map[string]string) (*bug.EditCommentOperation, error) {
+ op, err := bug.EditCreateComment(c.bug, author.Identity, unixTime, body)
if err != nil {
return nil, err
}