Skip to content

Repository files navigation

AtomicGo



AtomicGo | ghissue

DownloadsLatest ReleaseTestsCoverageUnit test countLicense: MITGo report


Documentation | Contributing | Code of Conduct


go get atomicgo.dev/ghissue

ghissue

import"atomicgo.dev/ghissue"

Package ghissue enables your users to submit issues to GitHub directly.

![Demo Video](https://raw.githubusercontent.com/atomicgo/ghissue/main/demo.gif\)

Example:

repo := ghissue.NewRepository("atomicgo", "ghissue")
// [...]
err := errors.New("This is an error")
repo.CreateErrorReport(err) // Only creates an error report if the error is not nil

Index

Variables

ErrOpenBrowser is the error returned when opening the browser fails.

varErrOpenBrowser=errors.New("failed to open browser")

type Issue

Issue is a GitHub issue.

typeIssuestruct {
RepositoryRepositoryTitlestringBodystring
}

funcNewIssue(repoRepository, title, bodystring) Issue

NewIssue creates a new issue.

func (Issue) GetCreateURL

func (issueIssue) GetCreateURL() string

GetCreateURL returns the URL to create an issue.

func (Issue) Open

func (issueIssue) Open() error

Open opens the "create issue" menu on GitHub in the browser.

Repository is a GitHub repository.

typeRepositorystruct {
OwnerstringNamestring
}

funcNewRepository(owner, namestring) Repository

NewRepository creates a new Repository from an owner and repository name.

func (Repository) CreateErrorReport

func (repoRepository) CreateErrorReport(errerror) error

CreateErrorReport creates a new issue on GitHub with a detailed error report including the stack trace.

Example:

repo := ghissue.NewRepository("atomicgo", "ghissue")
// [...]
err := errors.New("This is an error")
repo.CreateErrorReport(err)

func (Repository) NewIssue

func (repoRepository) NewIssue(title, bodystring) Issue

NewIssue creates a new issue with a title and body.

func (Repository) String

func (repoRepository) String() string

String returns the string representation of the repository.

Generated by gomarkdoc


AtomicGo.dev · with ❤️ by @MarvinJWendt | mjw.dev

About

📦 Go library that enables your users to submit error reports to GitHub

Topics

Resources

Code of conduct

Stars

12 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

Generated from atomicgo/template