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

Function createGitlabIssue

bridge/gitlab/export.go:422–438  ·  view source on GitHub ↗

create a gitlab. issue and return it ID

(ctx context.Context, gc *gitlab.Client, repositoryID, title, body string)

Source from the content-addressed store, hash-verified

420
421// create a gitlab. issue and return it ID
422func createGitlabIssue(ctx context.Context, gc *gitlab.Client, repositoryID, title, body string) (int, int, string, error) {
423 ctx, cancel := context.WithTimeout(ctx, defaultTimeout)
424 defer cancel()
425 issue, _, err := gc.Issues.CreateIssue(
426 repositoryID,
427 &gitlab.CreateIssueOptions{
428 Title: &title,
429 Description: &body,
430 },
431 gitlab.WithContext(ctx),
432 )
433 if err != nil {
434 return 0, 0, "", err
435 }
436
437 return issue.ID, issue.IID, issue.WebURL, nil
438}
439
440// add a comment to an issue and return it ID
441func addCommentGitlabIssue(ctx context.Context, gc *gitlab.Client, repositoryID string, issueID int, body string) (int, error) {

Callers 1

exportBugMethod · 0.85

Calls 1

CreateIssueMethod · 0.80

Tested by

no test coverage detected