orgclient

package
v0.0.0-...-7fa17c5 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrgAwareClient

type OrgAwareClient struct {
	github.Client
	Org       string
	IsAppAuth bool
}

OrgAwareClient wraps a github.Client so that FindIssues routes through FindIssuesWithOrg. Prow's App auth round-tripper requires the org in the request context to resolve the installation token, but callers like bumper.UpdatePullRequestWithLabels internally call FindIssues which passes an empty org.

When IsAppAuth is true, BotUser() appends "[bot]" to the login so that GitHub's search API author: qualifier matches the App's acting identity.

func (*OrgAwareClient) BotUser

func (c *OrgAwareClient) BotUser() (*github.UserData, error)

BotUser returns the bot user data. When the client is using GitHub App auth, it appends the "[bot]" suffix to the login. GitHub Apps act as "slug[bot]" users, but prow's getUserData only stores the bare slug. The search API's author: qualifier requires the full "slug[bot]" form to match issues created by the App.

func (*OrgAwareClient) FindIssues

func (c *OrgAwareClient) FindIssues(query, sort string, asc bool) ([]github.Issue, error)

Jump to

Keyboard shortcuts

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