github

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

README

github

Bonzai branch with utilities for github(using gh cli)

Install

curl -o github https://github.com/cherryramatisdev/github/blob/main/build/github-darwin-amd64?raw=true
curl -o github https://github.com/cherryramatisdev/github/blob/main/build/github-darwin-arm64?raw=true
curl -o github https://github.com/cherryramatisdev/github/blob/main/build/github-linux-amd64?raw=true
curl -o github https://github.com/cherryramatisdev/github/blob/main/build/github-windows-amd64.exe?raw=true

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var Cmd = &Z.Cmd{
	Name:        `github`,
	Aliases:     []string{`gh`},
	Usage:       `[help]`,
	Description: githubdoc,
	Commands:    []*Z.Cmd{help.Cmd, prCmd},
}
View Source
var REVIEWERS = []string{
	"hueldera",
	"guilhermeocosta",
	"HMilao",
	"victorakioz",
	"pedrohmp",
	"jorcelinojunior",
}

Functions

func GetBranches

func GetBranches() []string

func GetCurrentBranch

func GetCurrentBranch() string

func GetCurrentOrg

func GetCurrentOrg() string

GetCurrentOrg return the current org name by parsing the result of `git remote -v` command

Example
package main

import (
	"fmt"

	"github.com/cherryramatisdev/s/github"
)

func main() {
	fmt.Println(github.GetCurrentOrg())
}
Output:

cherryramatisdev

func GetCurrentRepo

func GetCurrentRepo() string

GetCurrentRepo return the current repo name by parsing the result of `git remote -v` command

Example
package main

import (
	"fmt"

	"github.com/cherryramatisdev/s/github"
)

func main() {
	fmt.Println(github.GetCurrentRepo())
}
Output:

s

Types

type Pr

type Pr struct {
	Org         string
	Repo        string
	Prefixtoken string
}

func (*Pr) Exist

func (pr *Pr) Exist() bool

gh api -H Accept: application/vnd.github+json /repos/lami-health/website/branches/feature/TEC-1693 Exist check if branch exist on upstream

func (*Pr) GetUrl

func (pr *Pr) GetUrl() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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