App-GHGen
view release on metacpan or search on metacpan
lib/App/GHGen/Fixer.pm view on Meta::CPAN
return $modified;
}
sub add_permissions($workflow) {
return 0 if $workflow->{permissions};
$workflow->{permissions} = { contents => 'read' };
return 1;
}
sub update_actions($workflow) {
my $jobs = $workflow->{jobs} or return 0;
my $modified = 0;
# Premise: %ACTION_UPDATES is the canonical version table (defined above).
# Conclusion: this function and find_outdated_actions (Analyzer) are always in sync.
for my $job (values %$jobs) {
my $steps = $job->{steps} or next;
for my $step (@$steps) {
next unless $step->{uses};
for my $old (keys %ACTION_UPDATES) {
lib/App/GHGen/Fixer.pm view on Meta::CPAN
next if exists $job->{'timeout-minutes'};
# Insert default timeout
$job->{'timeout-minutes'} = 30;
$modified++;
}
return $modified;
}
sub update_runners($workflow) {
my $jobs = $workflow->{jobs} or return 0;
my $modified = 0;
my %runner_updates = (
'ubuntu-18.04' => 'ubuntu-latest',
'ubuntu-16.04' => 'ubuntu-latest',
'macos-10.15' => 'macos-latest',
'windows-2016' => 'windows-latest',
);
( run in 1.910 second using v1.01-cache-2.11-cpan-a49fcb8fa48 )