Documentation
¶
Index ¶
Constants ¶
const ( // ProwPluginName is an external prow plugin name used to register this service ProwPluginName = "work-in-progress" // InProgressMessage is a message used in GH Status as description when the PR is in progress InProgressMessage = "PR is in progress and can't be merged yet. You might want to wait with review as well" // InProgressDetailsPageName is a name of a documentation page that contains additional status details for InProgressMessage InProgressDetailsPageName = "wip-failed" // ReadyForReviewMessage is a message used in GH Status as description when the PR is ready for review and merge ReadyForReviewMessage = "PR is ready for review and merge" // ReadyForReviewDetailsPageName is a name of a documentation page that contains additional status details for ReadyForReviewMessage ReadyForReviewDetailsPageName = "wip-success" )
const DefaultLabel = "work-in-progress"
DefaultLabel is the GitHub label name set in absence of any configured label name
Variables ¶
This section is empty.
Functions ¶
func GetWorkInProgressPrefix ¶
func GetWorkInProgressPrefix(title string, config PluginConfiguration) (string, bool)
GetWorkInProgressPrefix separates a prefix matching any of the "work in progress" patterns - if it is present
Types ¶
type GitHubWIPPRHandler ¶
GitHubWIPPRHandler handles PR events and updates status of the PR based on work-in-progress indicator
func (*GitHubWIPPRHandler) HandleIssueCommentEvent ¶
func (gh *GitHubWIPPRHandler) HandleIssueCommentEvent(logger log.Logger, comment *gogh.IssueCommentEvent) error
HandleIssueCommentEvent is an entry point for the plugin logic. This method is invoked by the Server when issue comment event is dispatched from the /hook service
func (*GitHubWIPPRHandler) HandlePullRequestEvent ¶
func (gh *GitHubWIPPRHandler) HandlePullRequestEvent(logger log.Logger, event *gogh.PullRequestEvent) error
HandlePullRequestEvent is an entry point for the plugin logic. This method is invoked by the Server when pull request vent is dispatched from the /hook service
type PluginConfiguration ¶
type PluginConfiguration struct {
config.PluginConfiguration `yaml:",inline,omitempty"`
Prefix []string `yaml:"title_prefixes,omitempty"`
Label string `yaml:"gh_label,omitempty"`
Combine bool `yaml:"combine_defaults,omitempty"`
}
PluginConfiguration defines prefix patterns set of PR titles will be matched against It is unmarshalled from work-in-progress.yml configuration file.
func LoadConfiguration ¶
func LoadConfiguration(logger log.Logger, change scm.RepositoryChange) PluginConfiguration
LoadConfiguration loads a PluginConfiguration for the given change