supporing [skip ci] or [no ci] in post-commit
This commit is contained in:
parent
bffa9feb51
commit
37b37f125e
@ -449,7 +449,14 @@ sub format_commit_url
|
|||||||
|
|
||||||
sub trigger_webhooks
|
sub trigger_webhooks
|
||||||
{
|
{
|
||||||
my ($cfg, $dbh, $prefix, $projectid) = @_;
|
my ($cfg, $dbh, $prefix, $projectid, $commit_message) = @_;
|
||||||
|
|
||||||
|
# find [skip ci] or [no ci]
|
||||||
|
if ($commit_message =~ /\[(skip|no) ci\]/g)
|
||||||
|
{
|
||||||
|
## no webhooks triggered
|
||||||
|
return (0, undef);
|
||||||
|
}
|
||||||
|
|
||||||
my $query = $dbh->prepare("SELECT ${QC}webhooks${QC} FROM ${QC}${prefix}project${QC} WHERE ${QC}id${QC}=?");
|
my $query = $dbh->prepare("SELECT ${QC}webhooks${QC} FROM ${QC}${prefix}project${QC} WHERE ${QC}id${QC}=?");
|
||||||
if (!$query || !$query->execute($projectid))
|
if (!$query || !$query->execute($projectid))
|
||||||
@ -542,7 +549,7 @@ if (lc($cfg->{commit_notification}) eq 'yes')
|
|||||||
email_message_to_project_members ($cfg, $dbh, $cfg->{database_prefix}, $REPOBASE, $commit_subject, $commit_message);
|
email_message_to_project_members ($cfg, $dbh, $cfg->{database_prefix}, $REPOBASE, $commit_subject, $commit_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger_webhooks ($cfg, $dbh, $cfg->{database_prefix}, $REPOBASE);
|
trigger_webhooks ($cfg, $dbh, $cfg->{database_prefix}, $REPOBASE, $raw_commit_message);
|
||||||
|
|
||||||
close_database ($dbh);
|
close_database ($dbh);
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ class Project extends CI_Controller
|
|||||||
$project->name = '';
|
$project->name = '';
|
||||||
$project->summary = '';
|
$project->summary = '';
|
||||||
$project->description = '';
|
$project->description = '';
|
||||||
$project->wehhooks = '';
|
$project->webhooks = '';
|
||||||
$project->commitable = 'Y';
|
$project->commitable = 'Y';
|
||||||
$project->public = 'Y';
|
$project->public = 'Y';
|
||||||
$project->members = array ($login['id']);
|
$project->members = array ($login['id']);
|
||||||
|
Loading…
Reference in New Issue
Block a user