showError

Show an error and exit the process.

showError(error: number)
Parameters
error (number) code error

isGitFolder

Check is current folder is under control version

isGitFolder()

gh

Makes a GitHub API request and return the result or exit the process if it fails

gh(args: ...any): string
Parameters
args (...any) arguments for the request
Returns
string: response

getUserLogin

Ask GitHUb API who is logged

getUserLogin(): string
Returns
string: response

getThisRepoIssues

Ask GitHUb API for the current repo issues

getThisRepoIssues(state: string): string
Parameters
state (string) state of the issues the request is looking for
Returns
string: response

getRepoIssues

Ask GitHUb API for issues of an specific owner, repo and state

getRepoIssues(owner: string, repo: string, state: string): string
Parameters
owner (string)
repo (string)
state (string)
Returns
string: response

getIssue

Ask GitHUb API for an specific issue from its id of an specific owner and repo

getIssue(owner: string, repo: string, number: string): string
Parameters
owner (string)
repo (string)
number (string)
Returns
string: response

getAssignedIssuesByUser

Get the assigned issues of a user

getAssignedIssuesByUser(state: string): string
Parameters
state (string) the states of the issues the request is asking for
Returns
string: response

getAssignedIssuesByOrg

Get the assigned issues in an organization

getAssignedIssuesByOrg(org: string, state: string): string
Parameters
org (string)
state (string)
Returns
string: response

openIssue

Open a new issue with some params

openIssue(title: string, body: string, owner: string, repo: any): string
Parameters
title (string)
body (string)
owner (string)
repo (any)
Returns
string: successful message

updateIssueState

Update an issue state from an id

updateIssueState(owner: string, repo: string, number: string, state: string): string
Parameters
owner (string)
repo (string)
number (string)
state (string)
Returns
string: response

updateIssue

Update an issue fields from an id

updateIssue(owner: string, repo: string, number: string, fields: string): string
Parameters
owner (string)
repo (string)
number (string)
fields (string)
Returns
string: response