On Mon, 25 May 2020 at 13:07, <s...@apache.org> wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> sebb pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/whimsy.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
>      new 0ccbe19  Typo
> 0ccbe19 is described below
>
> commit 0ccbe1910f2b5ce9892a72f9e5a50862fb2f3acb
> Author: Sebb <s...@apache.org>
> AuthorDate: Mon May 25 13:06:49 2020 +0100
>
>     Typo
> ---
>  lib/whimsy/asf/icla.rb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/whimsy/asf/icla.rb b/lib/whimsy/asf/icla.rb
> index 3854622..8ea4fbc 100644
> --- a/lib/whimsy/asf/icla.rb
> +++ b/lib/whimsy/asf/icla.rb
> @@ -64,7 +64,7 @@ module ASF
>      def self.preload
>        people = []
>        each do |icla|
> -        unless icla.id == 'notinaval'
> +        unless icla.id == 'notinavail'

To avoid this happening again, maybe we should be using constants for
'magic' strings.
Easy enough to implement as a constant local to this file, but in this
case, the constant has much wider applicability.

Would lib/asf.rb be a suitable place for such constants, or would it
be better to have a Constants class?

>            person = ASF::Person.find(icla.id)
>            people << person
>            person.icla = icla
>

Reply via email to