Documentation
¶
Index ¶
- func IsValidTodoState(s string) bool
- type ActivitySummary
- type Commit
- type CommitDetail
- type CommitStats
- type Contributor
- type GitLabIndex
- type MRCommit
- type MRDiffVersion
- type MRDiscussion
- type MRFile
- type MRNote
- type MergeRequest
- type MergeRequestChanges
- type MergeRequestDetail
- type NotePosition
- type ProjectActivity
- type ProjectMetadata
- type Reference
- type SlackChannel
- type SlackIndex
- func (idx *SlackIndex) BuildLookupMaps()
- func (idx *SlackIndex) FindChannel(idOrName string) *SlackChannel
- func (idx *SlackIndex) FindUser(idOrUsername string) *SlackUser
- func (idx *SlackIndex) ResolveChannelID(idOrName string) string
- func (idx *SlackIndex) ResolveUserID(idOrUsername string) string
- func (idx *SlackIndex) UpsertChannel(ch SlackChannel)
- func (idx *SlackIndex) UpsertUser(u SlackUser)
- type SlackUser
- type Tag
- type Todo
- type TodoState
- type TodoStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsValidTodoState ¶ added in v0.31.0
Types ¶
type ActivitySummary ¶
type ActivitySummary struct {
TotalProjects int
TotalCommits int
TotalMergeRequests int
TotalTags int
}
func CalculateSummary ¶
func CalculateSummary(activities []ProjectActivity) ActivitySummary
type CommitDetail ¶
type CommitDetail struct {
ID string
ShortID string
Title string
Message string // Full commit message including body
AuthorName string
AuthorEmail string
CommitterName string
CommitterEmail string
CreatedAt time.Time
CommittedAt time.Time
WebURL string
ProjectPath string
Stats CommitStats
ParentIDs []string
}
CommitDetail contains full commit information including the body/message
type CommitStats ¶
CommitStats contains addition/deletion statistics
type Contributor ¶
type GitLabIndex ¶
type GitLabIndex struct {
Version int `json:"version"`
GitLabURL string `json:"gitlab_url"`
LastFullIndexAt time.Time `json:"last_full_index_at"`
Projects []ProjectMetadata `json:"projects"`
ProjectsByID map[int]int `json:"-"`
ProjectsByPath map[string]int `json:"-"`
}
func NewGitLabIndex ¶
func NewGitLabIndex(gitlabURL string) *GitLabIndex
func (*GitLabIndex) BuildLookupMaps ¶
func (idx *GitLabIndex) BuildLookupMaps()
func (*GitLabIndex) FindProject ¶
func (idx *GitLabIndex) FindProject(idOrPath string) *ProjectMetadata
func (*GitLabIndex) ListProjects ¶
func (idx *GitLabIndex) ListProjects(orderBy, sortDir string, limit int) []ProjectMetadata
ListProjects returns projects sorted by the given field with optional limit
func (*GitLabIndex) UpsertProject ¶
func (idx *GitLabIndex) UpsertProject(p ProjectMetadata)
type MRDiffVersion ¶
MRDiffVersion contains version info for creating inline comments
type MRDiscussion ¶
type MRDiscussion struct {
ID string // discussion ID (used for replies)
IndividualNote bool // true if this is a single note, not a thread
Notes []MRNote // notes in this discussion thread
}
MRDiscussion represents a discussion thread on a merge request
type MRFile ¶
type MRFile struct {
OldPath string
NewPath string
IsNew bool
IsDeleted bool
IsRenamed bool
Additions int
Deletions int
Diff string // populated only with --show-diff
}
MRFile represents a file changed in a merge request
type MRNote ¶
type MRNote struct {
ID int
DiscussionID string // ID of the discussion thread this note belongs to
Body string
Author string
CreatedAt time.Time
System bool // true for system-generated notes (e.g., "mentioned in commit")
Resolvable bool // true for notes that can be resolved (e.g., inline comments)
Resolved bool // true if the note has been resolved
Position *NotePosition // position info for inline comments (nil for regular comments)
}
MRNote represents a comment/note on a merge request
type MergeRequest ¶
type MergeRequestChanges ¶
MergeRequestChanges contains diff statistics
type MergeRequestDetail ¶
type MergeRequestDetail struct {
IID int
Title string
Description string
State string
Author string
CreatedAt time.Time
UpdatedAt time.Time
MergedAt *time.Time
MergedBy string
WebURL string
SourceBranch string
TargetBranch string
ProjectPath string
Draft bool
MergeStatus string
HasConflicts bool
Labels []string
Assignees []string
Reviewers []string
Approvers []string
Changes MergeRequestChanges
Commits []MRCommit // populated on detail view
Files []MRFile // populated on detail view
Notes []MRNote // populated on detail view (flat list for backwards compat)
Discussions []MRDiscussion // populated on detail view (threaded discussions)
}
MergeRequestDetail contains full MR information for detailed views
type NotePosition ¶
type NotePosition struct {
NewPath string // file path in the new version
OldPath string // file path in the old version
NewLine int // line number in new version (0 if not applicable)
OldLine int // line number in old version (0 if not applicable)
}
NotePosition contains position information for inline/diff comments
type ProjectActivity ¶
type ProjectActivity struct {
ProjectID int
ProjectName string
ProjectPath string
WebURL string
Commits []Commit
MergeRequests []MergeRequest
Tags []Tag
}
func (*ProjectActivity) HasActivity ¶
func (p *ProjectActivity) HasActivity() bool
type ProjectMetadata ¶
type ProjectMetadata struct {
ID int `json:"id"`
Name string `json:"name"`
PathWithNS string `json:"path_with_namespace"`
Description string `json:"description"`
WebURL string `json:"web_url"`
DefaultBranch string `json:"default_branch"`
Visibility string `json:"visibility"`
Topics []string `json:"topics"`
StarCount int `json:"star_count"`
ForksCount int `json:"forks_count"`
Languages map[string]float32 `json:"languages"`
TopContributors []Contributor `json:"top_contributors"`
LastActivityAt time.Time `json:"last_activity_at"`
IndexedAt time.Time `json:"indexed_at"`
}
type SlackChannel ¶
type SlackChannel struct {
ID string `json:"id"`
Name string `json:"name"`
IsPrivate bool `json:"is_private"`
IsArchived bool `json:"is_archived"`
IsMember bool `json:"is_member"` // Bot is a member and can post
NumMembers int `json:"num_members"`
Topic string `json:"topic,omitempty"`
Purpose string `json:"purpose,omitempty"`
IndexedAt time.Time `json:"indexed_at"`
}
SlackChannel represents a Slack channel in the index
type SlackIndex ¶
type SlackIndex struct {
Version int `json:"version"`
TeamID string `json:"team_id"`
TeamName string `json:"team_name"`
LastFullIndexAt time.Time `json:"last_full_index_at"`
Channels []SlackChannel `json:"channels"`
Users []SlackUser `json:"users"`
// Lookup maps (not persisted)
ChannelsByID map[string]int `json:"-"`
ChannelsByName map[string]int `json:"-"`
UsersByID map[string]int `json:"-"`
UsersByUsername map[string]int `json:"-"`
}
SlackIndex holds the cached Slack data (channels and users)
func NewSlackIndex ¶
func NewSlackIndex(teamID, teamName string) *SlackIndex
NewSlackIndex creates a new empty Slack index
func (*SlackIndex) BuildLookupMaps ¶
func (idx *SlackIndex) BuildLookupMaps()
BuildLookupMaps rebuilds all lookup maps
func (*SlackIndex) FindChannel ¶
func (idx *SlackIndex) FindChannel(idOrName string) *SlackChannel
FindChannel looks up a channel by ID or name
func (*SlackIndex) FindUser ¶
func (idx *SlackIndex) FindUser(idOrUsername string) *SlackUser
FindUser looks up a user by ID or username
func (*SlackIndex) ResolveChannelID ¶
func (idx *SlackIndex) ResolveChannelID(idOrName string) string
ResolveChannelID returns the channel ID for a given ID or name
func (*SlackIndex) ResolveUserID ¶
func (idx *SlackIndex) ResolveUserID(idOrUsername string) string
ResolveUserID returns the user ID for a given ID or username
func (*SlackIndex) UpsertChannel ¶
func (idx *SlackIndex) UpsertChannel(ch SlackChannel)
UpsertChannel adds or updates a channel in the index
func (*SlackIndex) UpsertUser ¶
func (idx *SlackIndex) UpsertUser(u SlackUser)
UpsertUser adds or updates a user in the index
type SlackUser ¶
type SlackUser struct {
ID string `json:"id"`
Username string `json:"username"` // e.g., "john.doe"
DisplayName string `json:"display_name"` // e.g., "John Doe"
RealName string `json:"real_name"`
Email string `json:"email,omitempty"`
IsBot bool `json:"is_bot"`
IsAdmin bool `json:"is_admin"`
IsDeleted bool `json:"is_deleted"`
IndexedAt time.Time `json:"indexed_at"`
}
SlackUser represents a Slack user in the index
type Todo ¶ added in v0.31.0
type Todo struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
State TodoState `json:"state"`
References []Reference `json:"references,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (*Todo) RemoveReference ¶ added in v0.31.0
type TodoStore ¶ added in v0.31.0
type TodoStore struct {
Version int `json:"version"`
Todos []Todo `json:"todos"`
TodosByID map[string]int `json:"-"`
}
func NewTodoStore ¶ added in v0.31.0
func NewTodoStore() *TodoStore
func (*TodoStore) BuildLookupMaps ¶ added in v0.31.0
func (s *TodoStore) BuildLookupMaps()