@@ -18,9 +18,8 @@ tags) from GitHub following a certain naming scheme
1818
1919=head1 DESCRIPTION
2020
21- This plugin reads the list of branches or tags using GitHub's REST API. The name
22- of the reference must follow a particular prefix. This list is stored in the
23- nix-store and used as an input to declarative jobsets.
21+ This plugin reads the list of branches or tags using GitHub's REST API. This
22+ list is stored in the nix-store and used as an input to declarative jobsets.
2423
2524=head1 CONFIGURATION
2625
@@ -34,20 +33,19 @@ The declarative project C<spec.json> file must contains an input such as
3433
3534 "pulls": {
3635 "type": "github_refs",
37- "value": "[owner] [repo] heads|tags - [prefix]",
36+ "value": "[owner] [repo] [type] - [prefix]",
3837 "emailresponsible": false
3938 }
4039
4140In the above snippet, C<[owner] > is the repository owner and C<[repo] > is the
4241repository name. Also note a literal C<- > , which is placed there for the future
4342use.
4443
45- C<heads|tags > denotes that one of these two is allowed, that is, the third
46- position should hold either the C<heads > or the C<tags > keyword. In case of the former, the plugin
47- will fetch all branches, while in case of the latter, it will fetch the tags.
44+ C<[type] > is the type of ref to list. Typical values are "heads", "tags", and
45+ "pull". "." will include all types.
4846
4947C<prefix > denotes the prefix the reference name must start with, in order to be
50- included.
48+ included. "." will include all references.
5149
5250For example, C<"value": "nixos hydra heads - release/" > refers to
5351L<https://github.com/nixos/hydra> repository, and will fetch all branches that
@@ -102,8 +100,6 @@ sub fetchInput {
102100 return undef if $input_type ne " github_refs" ;
103101
104102 my ($owner , $repo , $type , $fut , $prefix ) = split ' ' , $value ;
105- die " type field is neither 'heads' nor 'tags', but '$type '"
106- unless $type eq ' heads' or $type eq ' tags' ;
107103
108104 my $auth = $self -> {config }-> {github_authorization }-> {$owner };
109105 my $githubEndpoint = $self -> {config }-> {github_endpoint } // " https://api.github.com" ;
0 commit comments