Skip to content

Commit f9058f9

Browse files
authored
Merge pull request #622 from metacpan/mickey/author_custodial_flag
Added 'custodial' flag to 'author' mapping.
2 parents aa6a719 + 2c3cc83 commit f9058f9

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

lib/MetaCPAN/Document/Author.pm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ has updated => (
9292
isa => 'DateTime',
9393
);
9494

95+
has is_pause_custodial_account => (
96+
is => 'ro',
97+
isa => Bool,
98+
default => 0,
99+
);
100+
95101
sub _build_gravatar_url {
96102
my $self = shift;
97103

lib/MetaCPAN/Script/Author.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ sub index_authors {
9696
grep {$_} @{ $put->{website} }
9797
];
9898

99+
$put->{is_pause_custodial_account} = 1
100+
if $name and $name =~ /\(PAUSE Custodial Account\)/;
101+
99102
# Now check the format we have is actually correct
100103
my @errors = MetaCPAN::Document::Author->validate($put);
101104
next if scalar @errors;

lib/MetaCPAN/Script/Mapping/CPAN/Author.pm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ sub mapping {
4747
"index" : "not_analyzed",
4848
"type" : "string"
4949
},
50+
"is_pause_custodial_account" : {
51+
"type" : "boolean"
52+
},
5053
"donation" : {
5154
"dynamic" : true,
5255
"properties" : {

0 commit comments

Comments
 (0)