MCPcopy Index your code
hub / github.com/git-bug/git-bug / commit

Method commit

bridge/github/import.go:164–176  ·  view source on GitHub ↗
(b *cache.BugCache, out chan<- core.ImportResult)

Source from the content-addressed store, hash-verified

162}
163
164func (gi *githubImporter) commit(b *cache.BugCache, out chan<- core.ImportResult) error {
165 if b == nil {
166 return nil
167 }
168 if !b.NeedCommit() {
169 out <- core.NewImportNothing(b.Id(), "no imported operation")
170 return nil
171 } else if err := b.Commit(); err != nil {
172 // commit bug state
173 return fmt.Errorf("bug commit: %v", err)
174 }
175 return nil
176}
177
178func (gi *githubImporter) ensureIssue(ctx context.Context, repo *cache.RepoCache, issue *issue, issueEdit *userContentEdit) (*cache.BugCache, error) {
179 author, err := gi.ensurePerson(ctx, repo, issue.Author)

Callers 1

ImportAllMethod · 0.95

Calls 5

NewImportNothingFunction · 0.92
ErrorfMethod · 0.80
NeedCommitMethod · 0.65
IdMethod · 0.65
CommitMethod · 0.65

Tested by

no test coverage detected