Plugins: Add isEnabled method
Plugins are now disabled at startup time unless there is some relevant configuration in hydra.conf. This avoids hydra-notify having to do a lot of redundant work (a lot of plugins did a lot of database queries *before* deciding they were disabled). Note: BitBucketStatus users will need to add 'enable_bitbucket_status = 1' to hydra.conf.
This commit is contained in:
@@ -16,6 +16,11 @@ use List::Util qw(max);
|
||||
# - gitlab_project_id => ID of the project in Gitlab, i.e. in the above
|
||||
# case the ID in gitlab of "nixexprs"
|
||||
|
||||
sub isEnabled {
|
||||
my ($self) = @_;
|
||||
return defined $self->{config}->{gitlab_authorization};
|
||||
}
|
||||
|
||||
sub toGitlabState {
|
||||
my ($status, $buildStatus) = @_;
|
||||
if ($status == 0) {
|
||||
|
Reference in New Issue
Block a user