plugin

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName is the name of this plugin
	PluginName = labels.NeedsRebase
)

Variables

This section is empty.

Functions

func HandleAll

func HandleAll(log *logrus.Entry, ghc githubClient, config *plugins.Configuration, usesAppsAuth bool, issueCache *Cache) error

HandleAll checks all orgs and repos that enabled this plugin for open PRs to determine if the "needs-rebase" label needs to be added or removed. It depends on GitHub's mergeability check to decide the need for a rebase.

func HandleIssueCommentEvent

func HandleIssueCommentEvent(log *logrus.Entry, ghc githubClient, ice *github.IssueCommentEvent, cache *Cache) error

HandleIssueCommentEvent handles a GitHub issue comment event and adds or removes a "needs-rebase" label if the issue is a PR based on whether the GitHub api considers the PR mergeable

func HandlePullRequestEvent

func HandlePullRequestEvent(log *logrus.Entry, ghc githubClient, pre *github.PullRequestEvent) error

HandlePullRequestEvent handles a GitHub pull request event and adds or removes a "needs-rebase" label based on whether the GitHub api considers the PR mergeable

func HelpProvider

func HelpProvider(_ []config.OrgRepo) (*pluginhelp.PluginHelp, error)

HelpProvider constructs the PluginHelp for this plugin that takes into account enabled repositories. HelpProvider defines the type for function that construct the PluginHelp for plugins.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache(validTime int) *Cache

func (*Cache) Flush

func (cache *Cache) Flush()

func (*Cache) Get

func (cache *Cache) Get(key int) bool

func (*Cache) Set

func (cache *Cache) Set(key int)

Jump to

Keyboard shortcuts

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