gh

package
v0.0.0-...-24873fe Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: BSD-3-Clause Imports: 10 Imported by: 1 module, 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.

Documentation

Overview

Copyright (c) 2022, salesforce.com, inc. All rights reserved. SPDX-License-Identifier: BSD-3-Clause For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadContent

func DownloadContent(authRepo GithubRepo, path, ref string) ([]byte, error)

func NewGithubAuthenticatedClient

func NewGithubAuthenticatedClient(app config.GithubApp) (*github.Client, error)

NewGithubAuthenticatedClient initializes an authenticated github client

func ParseReceivedWebHook

func ParseReceivedWebHook(r *http.Request) (signature string, payload []byte, err error)

ParseReceivedWebhook parses the webhook payload received from Github and returns the signature, and the payload. The payload can then be read multiple times.

Types

type GithubRepo

type GithubRepo struct {
	Client *github.Client
	Ctx    context.Context
	Repo   string
	Owner  string
	App    config.GithubApp
}

Repo is an authenticated Github client associated with a specific repo

Jump to

Keyboard shortcuts

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