github

package module
v0.0.0-...-12ddd8b Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-actions-toolkit/github


Installation

go get github.com/jcbhmr/go-actions-toolkit/github

Usage

package main

import (
    "fmt"

    "github.com/jcbhmr/go-actions-toolkit/github"
)

func main() {
    repo, _ := github.Context.Repo()
    fmt.Printf("This is the %s/%s repository", repo.Owner, repo.Repo)
    // Output: This is the jcbhmr/go-actions-toolkit repository
}

Development

Documentation

Overview

Example
token := os.Getenv("GITHUB_TOKEN")
client := unwrap1(github.GetGoGithubClient(token))
repo := github.Context.Repo()
info, _ := unwrap2(client.Repositories.Get(context.Background(), repo.Owner, repo.Repo))
fmt.Printf("info.GetFullName()=%s\n", info.GetFullName())
fmt.Printf("info.GetDescription()=%s\n", info.GetDescription())
Output:
info.GetFullName()=jcbhmr/actions-toolkit.go
info.GetDescription()=🐿️ GitHub Actions toolkit for your Go-based GitHub Actions

Index

Examples

Constants

This section is empty.

Variables

View Source
var Context = newContext()

Functions

func GetClient

func GetClient(token string) (*gogithubgithub.Client, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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