v0.0.0-...-96bea31 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2018 License: MIT Imports: 12 Imported by: 1




This section is empty.


View Source
var (
	Conf *Config

	Path   = &folder
	GitLog *log.Logger


func AddLabel

func AddLabel(repo, labelName string, issueNum int) ([]*github.Label, error)

AddLabel Add a label to a issue.

func AddMilestone

func AddMilestone() error

AddMilestone Add Milestone to an issue. BUG(butlerx) Currently adding a milestone is not supported as milestones in the api are a mix of strings and ints. Bug is noted in library docs.

func ChangeKey

func ChangeKey(oldKey, newKey string) error

ChangeKey Change user encyption key

func ChangeLogin

func ChangeLogin(user, oauth, key string) error

ChangeLogin Change user name and Auth token and relogin.

func CloseIssue

func CloseIssue(repo string, issue *github.Issue) (*github.Issue, error)

CloseIssue Marks issue as closed.

func Comment

func Comment(repo, body string, issueNum int) (github.IssueComment, error)

Comment Comment on a issue on github.

func CreateLabel

func CreateLabel(repo, labelName string) (github.Label, error)

CreateLabel Create a label for a repo.

func CreateMilestone

func CreateMilestone(repo, milestone string) (github.Milestone, error)

CreateMilestone Create a Milestone for a repo.

func DeleteComment

func DeleteComment(repo string, commentID int) error

DeleteComment Remove a comment from an issue.

func DeleteLabel

func DeleteLabel(repo, labelName string) error

DeleteLabel Delete a label from a repo.

func DeleteMilestone

func DeleteMilestone(repo string, mileNum int) error

DeleteMilestone Delet a Milestone from a repo.

func EditComment

func EditComment(repo, body string, commentID int) (github.IssueComment, error)

EditComment Edit a comment already on github.

func EditIssue

func EditIssue(repo string, oldIssue *github.Issue) (*github.Issue, error)

EditIssue Edit the issue object before passing it to this method.

func EditLabel

func EditLabel(repo, labelName, newName string) (github.Label, error)

EditLabel Change the name of a label.

func EditMilestone

func EditMilestone(repo, newTitle string, mileNum int) (github.Milestone, error)

EditMilestone Change the title of a milestone in a repo.

func IsSetUp

func IsSetUp() (bool, error)

IsSetUp Check if users config is set up and if being run in git repo.

func Issues

func Issues(repo string) ([]*github.Issue, error)

Issues Pull all issues and write them to .issue/issues.json. Pulls both open and closed issues. Used to update issues.json. Method for accessing issue.json. Returns last pull if cant connect to server. Repo should be structured as "user/repo"

func IssuesFilter

func IssuesFilter(repo, state, milestone, assignee, creator, sort, order string, labels []string) ([]*github.Issue, error)

IssuesFilter Filters issues based on mileston, assignee, creatoror, labels or state. Pass empty strings for things that arnt to be filtered. Returns array of issues in order asked for. TODO(butlerx) filter offline issues if query of repo fails.

func ListComments

func ListComments(repo string, issueNum int) ([]*github.IssueComment, error)

ListComments Lists all the comments for a given issue.

func ListLabels

func ListLabels(repo string) ([]*github.Label, error)

ListLabels list all possible labels in a repo.

func ListMilestones

func ListMilestones(repo string) ([]*github.Milestone, error)

ListMilestones List all Milestones in a repo.

func LockIssue

func LockIssue(repo string, issueNum int) error

LockIssue Locks issue so it cant be changed.

func Login

func Login(userkey string) error

Login Logs in to github using oauth. Returns error if login fails.

func MakeIssue

func MakeIssue(repo, title, body, assignee string, milestone int, labels []string) (*github.Issue, error)

MakeIssue Create an issue on github. Requires repo and title args, rest are optinal arg and can be passed empty. Make issue put milestone at 0 for no milestone. BUG(butlerx) Issue Creation doesnt work in offile mode.

func OpenIssue

func OpenIssue(repo string, issue *github.Issue) (*github.Issue, error)

OpenIssue Mark issue as open.

func PossibleAssignees

func PossibleAssignees(repo string) ([]*github.User, error)

PossibleAssignees Get a list of all possible assingees

func RemoveLabel

func RemoveLabel(repo, labelName string, issueNum int) error

RemoveLabel Remove a label from an issue.

func RemoveMilestone

func RemoveMilestone() error

RemoveMilestone Remove Milestone to an issue. BUG(butlerx) currently Removing milestones is not supported as milestones in the api are a mix of strings and ints. Bug is noted in library docs.

func SetUp

func SetUp(user, oauth, key string) error

SetUp Set up .issue folder, issues, comments & config file and begin logfile. Appends to to gitignore to ignore the config file. Checks if the files exist and if they dont creates them.

func UnlockIssue

func UnlockIssue(repo string, issueNum int) error

UnlockIssue Unlocks issue to allow changes.

func WatchRepo

func WatchRepo(repo string) (string, string, bool, error)

WatchRepo Monitor for change in repo. Rings terminal bell and returns true and the reason if something happened in repo. returns false if nothing changed


type Comments

type Comments struct {
	Issue []*github.IssueComment
	Num   int

Comments used for storing comments offline array of comments and issue number they relate to

type Config

type Config struct {
	Username string
	Token    string
	Secure   bool

Config User config file Username and oauth token stored check if user wants the token secured



  • Issue Creation doesnt work in offile mode.

  • Currently adding a milestone is not supported as milestones in the api are a mix of strings and ints. Bug is noted in library docs.

  • currently Removing milestones is not supported as milestones in the api are a mix of strings and ints. Bug is noted in library docs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL