SkillAgentSearch skills...

Ghissue

๐Ÿ“ฆ Go library that enables your users to submit error reports to GitHub

Install / Use

/learn @atomicgo/Ghissue
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<h1 align="center">AtomicGo | ghissue</h1> <p align="center"> <img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fatomicgo.dev%2Fapi%2Fshields%2Fghissue&style=flat-square" alt="Downloads"> <a href="https://github.com/atomicgo/ghissue/releases"> <img src="https://img.shields.io/github/v/release/atomicgo/ghissue?style=flat-square" alt="Latest Release"> </a> <a href="https://codecov.io/gh/atomicgo/ghissue" target="_blank"> <img src="https://img.shields.io/github/actions/workflow/status/atomicgo/ghissue/go.yml?style=flat-square" alt="Tests"> </a> <a href="https://codecov.io/gh/atomicgo/ghissue" target="_blank"> <img src="https://img.shields.io/codecov/c/gh/atomicgo/ghissue?color=magenta&logo=codecov&style=flat-square" alt="Coverage"> </a> <a href="https://codecov.io/gh/atomicgo/ghissue"> <!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-0-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end --> </a> <a href="https://opensource.org/licenses/MIT" target="_blank"> <img src="https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square" alt="License: MIT"> </a> <a href="https://goreportcard.com/report/github.com/atomicgo/ghissue" target="_blank"> <img src="https://goreportcard.com/badge/github.com/atomicgo/ghissue?style=flat-square" alt="Go report"> </a> </p>
<p align="center"> <strong><a href="https://pkg.go.dev/atomicgo.dev/ghissue#section-documentation" target="_blank">Documentation</a></strong> | <strong><a href="https://github.com/atomicgo/atomicgo/blob/main/CONTRIBUTING.md" target="_blank">Contributing</a></strong> | <strong><a href="https://github.com/atomicgo/atomicgo/blob/main/CODE_OF_CONDUCT.md" target="_blank">Code of Conduct</a></strong> </p>
<p align="center"> <img src="https://raw.githubusercontent.com/atomicgo/atomicgo/main/assets/header.png" alt="AtomicGo"> </p> <p align="center"> <table> <tbody> </tbody> </table> </p> <h3 align="center"><pre>go get atomicgo.dev/ghissue</pre></h3> <p align="center"> <table> <tbody> </tbody> </table> </p> <!-- gomarkdoc:embed:start --> <!-- Code generated by gomarkdoc. DO NOT EDIT -->

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

<a name="ErrOpenBrowser"></a>ErrOpenBrowser is the error returned when opening the browser fails.

var ErrOpenBrowser = errors.New("failed to open browser")

<a name="Issue"></a>

type Issue

Issue is a GitHub issue.

type Issue struct {
    Repository Repository
    Title      string
    Body       string
}

<a name="NewIssue"></a>

func NewIssue

func NewIssue(repo Repository, title, body string) Issue

NewIssue creates a new issue.

<a name="Issue.GetCreateURL"></a>

func (Issue) GetCreateURL

func (issue Issue) GetCreateURL() string

GetCreateURL returns the URL to create an issue.

<a name="Issue.Open"></a>

func (Issue) Open

func (issue Issue) Open() error

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

<a name="Repository"></a>

type Repository

Repository is a GitHub repository.

type Repository struct {
    Owner string
    Name  string
}

<a name="NewRepository"></a>

func NewRepository

func NewRepository(owner, name string) Repository

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

<a name="Repository.CreateErrorReport"></a>

func (Repository) CreateErrorReport

func (repo Repository) CreateErrorReport(err error) 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)

<a name="Repository.NewIssue"></a>

func (Repository) NewIssue

func (repo Repository) NewIssue(title, body string) Issue

NewIssue creates a new issue with a title and body.

<a name="Repository.String"></a>

func (Repository) String

func (repo Repository) String() string

String returns the string representation of the repository.

Generated by gomarkdoc

<!-- gomarkdoc:embed:end -->

AtomicGo.dev ย ยทย  with โค๏ธ by @MarvinJWendt | MarvinJWendt.com

View on GitHub
GitHub Stars13
CategoryDevelopment
Updated1y ago
Forks0

Languages

Go

Security Score

80/100

Audited on Aug 8, 2024

No findings