Documentation ¶
Index ¶
- Constants
- Variables
- func CheckIssueTemplateHeadings(req types.IssuesOuter, derekConfig *types.DerekRepoConfig, ...) error
- func EnabledFeature(attemptedFeature string, config *types.DerekRepoConfig) bool
- func GetPrivateRepoConfig(owner, repository, branch string, installation int, config config.Config) (*types.DerekRepoConfig, error)
- func GetRepoConfig(owner, repository, branch string) (*types.DerekRepoConfig, error)
- func HandleComment(req types.IssueCommentOuter, config config.Config, ...)
- func HandleFirstTimerPR(req types.PullRequestOuter, contributingURL string, config config.Config) (bool, error)
- func HandleHacktoberfestPR(req types.PullRequestOuter, contributingURL string, config config.Config) (bool, error)
- func HandlePullRequest(req types.PullRequestOuter, contributingURL string, config config.Config)
- func PermittedUserFeature(attemptedFeature string, config *types.DerekRepoConfig, user string) bool
- func VerifyPullRequestDescription(req types.PullRequestOuter, contributingURL string, config config.Config)
- type ReleaseHandler
- type UpdatingReleaseHandler
- type WorkingRelease
Constants ¶
const (
ClosedConstant string = "closed"
)
Variables ¶
var DCO string = "DCO"
DCO is the check name
Functions ¶
func CheckIssueTemplateHeadings ¶
func CheckIssueTemplateHeadings(req types.IssuesOuter, derekConfig *types.DerekRepoConfig, config config.Config) error
func EnabledFeature ¶
func EnabledFeature(attemptedFeature string, config *types.DerekRepoConfig) bool
func GetPrivateRepoConfig ¶
func GetPrivateRepoConfig(owner, repository, branch string, installation int, config config.Config) (*types.DerekRepoConfig, error)
GetPrivateRepoConfig returns the configuration for derek for the specified repository. Since the repository is private we use the github API to fetch `.DEREK.yml`.
func GetRepoConfig ¶
func GetRepoConfig(owner, repository, branch string) (*types.DerekRepoConfig, error)
GetRepoConfig returns derek's configuration for the specified repository. The repository has to be public since this function will fetch the file from the CDN. If you are trying to fetch the config from a private repo use `GetPrivateRepoConfig` instead.
func HandleComment ¶
func HandleComment(req types.IssueCommentOuter, config config.Config, derekConfig *types.DerekRepoConfig)
HandleComment handles a comment
func HandleFirstTimerPR ¶
func HandleHacktoberfestPR ¶
func HandleHacktoberfestPR(req types.PullRequestOuter, contributingURL string, config config.Config) (bool, error)
HandleHacktoberfestPR checks for opened PR, first time contributor. If only .MD files are changed, issue is closed and invalid label is added The goal of this function is to mark pull requests invalid and close them from people only making typo changes without signing their commit (flybys)
func HandlePullRequest ¶
func HandlePullRequest(req types.PullRequestOuter, contributingURL string, config config.Config)
func PermittedUserFeature ¶
func PermittedUserFeature(attemptedFeature string, config *types.DerekRepoConfig, user string) bool
func VerifyPullRequestDescription ¶
func VerifyPullRequestDescription(req types.PullRequestOuter, contributingURL string, config config.Config)
VerifyPullRequestDescription checks that the PR has anything in the body. If there is no body, a label is added and comment posted to the PR with a link to the contributing guide.
Types ¶
type ReleaseHandler ¶
type ReleaseHandler interface {
Handle(github.ReleaseEvent) error
}
func NewReleaseHandler ¶
func NewReleaseHandler(config config.Config, installationID int) ReleaseHandler
type UpdatingReleaseHandler ¶
func (*UpdatingReleaseHandler) Handle ¶
func (h *UpdatingReleaseHandler) Handle(req github.ReleaseEvent) error