You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alienfiles are pure perl code but render on GitHub as plain text. This can be corrected by adding this line to a .gitattributes file in each repo:
alienfile linguist-language=perl
I would submit PRs but there are too many repos under the organisation for this to be efficient. The script below is one approach to automation assuming all repos are at the same level.
use 5.010;
use strict;
use warnings;
use Path::Tiny;
use Cwd qw /getcwd/;
my@dirs = grep {-d} (path (getcwd())->children);
foreachmy$dir (@dirs) {
my$has_alienfile = grep {path($_)->basename eq'alienfile'} (path($dir)->children);
nextif !$has_alienfile;
my$file = path($dir, '.gitattributes');
$file->touch;
my$contents = $file->slurp;
if (not$contents =~ /alienfile/ms) {
$file->append("alienfile linguist-language=perl\n");
}
}
The text was updated successfully, but these errors were encountered:
Good point. I have a script which can make this change to all the repos in this org (and some in PerlFFI + uperl orgs which also have alienfile), but I usually only run it when I have a batch of changes to make, often when I have to bump CI for new Perls. I've added a note to do it then.
alienfiles are pure perl code but render on GitHub as plain text. This can be corrected by adding this line to a
.gitattributes
file in each repo:I would submit PRs but there are too many repos under the organisation for this to be efficient. The script below is one approach to automation assuming all repos are at the same level.
The text was updated successfully, but these errors were encountered: