Categorygithub.com/nomadops/go-github-apps-helpers

# README

go-github-apps-helpers

go-github-apps-helpers is a Go package that provides a library of useful functions for interacting with the GitHub API as a GitHub App.

Installation

To install the go-github-apps-helpers package, run the following command:

go get -u github.com/nomadops/go-github-apps-helpers

To use the RemoveRepoFromInstallation function, import the installations package and call the function with the following arguments:

package main

import (
    "context"
    "github.com/bradleyfalzon/ghinstallation"
    "github.com/nomadops/go-github-apps-helpers/installations"
)

func main() {
    // Set up the GitHub App installation transport using the app ID, installation ID, and private key
    appID := 12345
    installationID := 67890
    privateKeyPath := "path/to/private/key.pem"
    itr, err := ghinstallation.NewKeyFromFile(http.DefaultTransport, appID, installationID, privateKeyPath)
    if err != nil {
        panic(err)
    }

    // Remove the repository with the given ID from the GitHub App installation with the given IDs
    repoID := 1234567890
    err = installations.RemoveRepoFromInstallation(context.Background(), appID, installationID, repoID, itr)
    if err != nil {
        panic(err)
    }
}

installations

import "github.com/nomadops/go-github-apps-helpers"

Index

func RemoveRepoFromInstallation

func RemoveRepoFromInstallation(ctx context.Context, appID int64, installationID int64, repoID int64, itr *ghinstallation.Transport) error

RemoveRepoFromInstallation removes a GitHub repository from a GitHub App installation.

LICENSE

This project is licensed under the MIT License.

# Packages

No description provided by the author