dmitri.shuralyov.com/service/change/fs

Add repo parameter to ThreadType method.

It's needed because in some meta-services that unify multiple
underlying services, the ThreadType changes depending on the RepoSpec.

Similar to https://github.com/shurcooL/issuesapp/commit/60bf33177c6943f244f14f81f145bc8b6c63f6cc.
dmitshur committed 6 years ago commit 891fba5eb78bd1e1c421e6c7c422ccda350d246d
Showing partial commit. Full Commit
Collapse all
fs/fs.go
@@ -152,10 +152,16 @@ func (*Service) GetDiff(ctx context.Context, repo string, id uint64, opt *change
		return nil, os.ErrNotExist
	}
	return s.changes[0].Diff, nil
}

// threadType is the notifications thread type for this service.
const threadType = "Change"

// ThreadType returns the notifications thread type for this service.
func (*Service) ThreadType(repo string) string { return threadType }

var shurcool = users.User{
	UserSpec: users.UserSpec{
		ID:     1924134,
		Domain: "github.com",
	},