From 08708e899a4e9928ce783ccf82b64c43cf4e708e Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Wed, 24 May 2017 07:33:06 -0400 Subject: [PATCH] GithubPulls: Add 'revision' to the input --- src/lib/Hydra/Plugin/GithubPulls.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Plugin/GithubPulls.pm b/src/lib/Hydra/Plugin/GithubPulls.pm index 39700e88..01b0d4f7 100644 --- a/src/lib/Hydra/Plugin/GithubPulls.pm +++ b/src/lib/Hydra/Plugin/GithubPulls.pm @@ -7,6 +7,7 @@ use LWP::UserAgent; use JSON; use Hydra::Helper::CatalystUtils; use File::Temp; +use POSIX qw(strftime); sub supportedInputTypes { my ($self, $inputTypes) = @_; @@ -56,7 +57,8 @@ sub fetchInput { close $fh; my $storePath = `nix-store --add "$filename"` or die "cannot copy path $filename to the Nix store.\n"; - return { storePath => $storePath }; + my $timestamp = time; + return { storePath => $storePath, revision => strftime "%Y%m%d%H%M%S", gmtime($timestamp) }; } 1;