forked from lix-project/hydra
GithubStatus: Include the full job name and build ID in the context.
Build ID can be omitted by setting excludeBuildFromContext in config
This commit is contained in:
parent
0d0b925af1
commit
ae24e7fb31
|
@ -29,16 +29,18 @@ sub common {
|
|||
my $jobName = showJobName $b;
|
||||
my $evals = $build->jobsetevals;
|
||||
my $ua = LWP::UserAgent->new();
|
||||
|
||||
foreach my $conf (@config) {
|
||||
next unless $jobName =~ /^$conf->{jobs}$/;
|
||||
|
||||
my $contextTrailer = $conf->{excludeBuildFromContext} ? "" : (":" . $b->id);
|
||||
my $body = encode_json(
|
||||
{
|
||||
state => $finished ? toGithubState($b->buildstatus) : "pending",
|
||||
target_url => "$baseurl/build/" . $b->id,
|
||||
description => "Hydra build #" . $b->id . " of $jobName",
|
||||
context => "continuous-integration/hydra"
|
||||
context => "continuous-integration/hydra:" . $jobName . $contextTrailer
|
||||
});
|
||||
foreach my $conf (@config) {
|
||||
next unless $jobName =~ /^$conf->{jobs}$/;
|
||||
|
||||
my $inputs_cfg = $conf->{inputs};
|
||||
my @inputs = defined $inputs_cfg ? ref $inputs_cfg eq "ARRAY" ? @$inputs_cfg : ($inputs_cfg) : ();
|
||||
my %seen = map { $_ => {} } @inputs;
|
||||
|
|
Loading…
Reference in a new issue