gh

package
v0.0.0-...-77e2282 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

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