graphql

package
v0.0.0-...-47f5200 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*githubv4.Client
	// contains filtered or unexported fields
}

Client adds convenience methods to GitHub GraphQL client.

func NewClient

func NewClient(ctx context.Context, action *githubactions.Action, tokenVar string) *Client

NewClient returns GitHub GraphQL API client with token from the given environment variable.

func (*Client) GetPullRequest

func (c *Client) GetPullRequest(ctx context.Context, nodeID string) *PullRequest

GetPullRequest returns information about a pull request by GraphQL node ID.

type Fields

type Fields map[string]string

Fields maps field name to field value.

type PullRequest

type PullRequest struct {
	Title     string
	Body      string
	Closed    bool
	Labels    []string
	AutoMerge bool

	// ProjectFields maps project title to fields.
	ProjectFields map[string]Fields
}

PullRequest contains information about a pull request.

Jump to

Keyboard shortcuts

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