I think the mail text also needs more detail on what it means to be a
PMC member.
I wonder if the two invitations should be combined or whether they
should be separate mails?

On 12 November 2017 at 04:33, Craig Russell <[email protected]> wrote:
> There are known issues with this patch.
>
> 1. The @noticelink is not quite working. I can't figure out how to make the 
> @noticelink visible to the validate process. So it is always nil in validate.
>
> 2. There is no subject for the invitation email.
>
> 3. There are extra lines in the invitation email where there is conditional 
> text. If the condition is not met, a blank line is inserted.
>
> Patches welcome. Almost ready to disable the mock email processing.
>
> Craig
>
>> On Nov 11, 2017, at 8:29 PM, [email protected] wrote:
>>
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> clr 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 7f42752  Add more detail to project/icla application
>>     new e6ecd4a  Merge branch 'master' of github.com:apache/whimsy
>> 7f42752 is described below
>>
>> commit 7f427528a099ce450d036b4ec9b2936399f3d62e
>> Author: Craig L Russell <[email protected]>
>> AuthorDate: Sat Nov 11 20:28:56 2017 -0800
>>
>>    Add more detail to project/icla application
>> ---
>> www/project/icla/main.rb                        | 19 ++++----
>> www/project/icla/views/actions/validate.json.rb | 58 
>> ++++++++++++++++++++-----
>> www/project/icla/views/app.html.rb              |  2 +-
>> www/project/icla/views/pages/invite.js.rb       | 37 +++++++++++-----
>> 4 files changed, 85 insertions(+), 31 deletions(-)
>>
>> diff --git a/www/project/icla/main.rb b/www/project/icla/main.rb
>> index 679bb65..bd710ac 100755
>> --- a/www/project/icla/main.rb
>> +++ b/www/project/icla/main.rb
>> @@ -1,5 +1,5 @@
>> #
>> -# Server side setup
>> +# Server side setup for whimsy/project
>> #
>>
>> require 'whimsy/asf'
>> @@ -23,16 +23,19 @@ end
>> get '/invite' do
>>   @view = 'invite'
>>
>> -  # get a complete list of PMCs
>> +  # get a complete list of PMC and PPMC names
>>   @pmcs = ASF::Committee.pmcs.map(&:name).sort
>> +  @ppmcs = ASF::Podling.list
>> +    .select {|podling| podling.status == 'current'}
>> +    .map(&:name).sort
>>
>> -  # for non ASF members, limit PMCs to ones for which the user is a
>> -  # member of the PMC.
>> +  # allow user to invite contributors for PMCs of which the user is a 
>> member,
>> +  # or for podlings if the user is a member of the IPMC.
>>   user = ASF::Person.find(env.user)
>> -  unless user.asf_member?
>> -    committees = user.committees.map(&:name)
>> -    @pmcs.select! {|pmc| committees.include?(pmc)}
>> -  end
>> +  committees = user.committees.map(&:name)
>> +  ipmc = committees.include?('incubator')
>> +  @pmcs.select! {|pmc| committees.include?(pmc)}
>> +  @ppmcs.select! {|ppmc| committees.include?('incubator') | 
>> committees.include?(ppmc)}
>>
>>   # render the HTML for the application
>>   _html :app
>> diff --git a/www/project/icla/views/actions/validate.json.rb 
>> b/www/project/icla/views/actions/validate.json.rb
>> index d6bf07b..d91116a 100644
>> --- a/www/project/icla/views/actions/validate.json.rb
>> +++ b/www/project/icla/views/actions/validate.json.rb
>> @@ -3,9 +3,50 @@ require 'net/http'
>> require 'pathname'
>>
>> # find pmc and user information
>> +# all ppmcs are also pmcs but not all pmcs are ppmcs
>> +
>> pmc = ASF::Committee.find(@pmc)
>> +ppmc = ASF::Podling.find(@pmc)
>> +pmc_type = if ppmc then 'PPMC' else 'PMC' end
>> +
>> user = ASF::Person.find(env.user)
>>
>> +# prototype mail text
>> +prototype_contributor =
>> +"Based on your contributions to #{pmc.name}, you are invited to submit an 
>> ICLA
>> +to The Apache Software Foundation, using the following form. Please see
>> +http://apache.org/licenses for details.
>> +"
>> +
>> +prototype_committer =
>> +"Congratulations! The #{pmc.name} #{pmc_type} hereby offers you committer 
>> privileges
>> +to the #{pmc.name} project.
>> +
>> +These privileges are offered on the understanding that you'll use them
>> +reasonably and with common sense. We like to work on trust rather than
>> +unnecessary constraints.
>> +
>> +Being a committer enables you to more easily make changes without needing to
>> +go through the patch submission process.
>> +
>> +Being a committer does not require you to participate any more than you 
>> already
>> +do. It does tend to make one even more committed ;-) You willprobably find 
>> that
>> +you spend more time here.
>> +
>> +Of course, you can decline and instead remain as a contributor, 
>> participating
>> +as you do now.
>> +
>> +This personal invitation is a chance for you to accept or decline in 
>> private.
>> +Either way, please let us know in reply to the 
>> private@#{pmc.name}.apache.org
>> +address only.
>> +"
>> +
>> +prototype_pmc =
>> +"You are also invited to become a member of the #{pmc.name} #{pmc_type}.
>> +Being a #{pmc_type} member enables you to help guide the direction of the 
>> project.
>> +If you accept, you will have binding votes on releases and new committers.
>> +"
>> +
>> # validate email address
>> begin
>>   Socket.getaddrinfo(@iclaemail[/@(.*)/, 1].untaint, 'smtp')
>> @@ -40,12 +81,6 @@ if @votelink and not @votelink.empty?
>>     _focus :votelink
>>   end
>>
>> -  # verify that the user submitting the form is on the PMC in question
>> -  unless pmc and pmc.owners.include? user
>> -    _error "You must be on the #@pmc PMC to submit a vote link"
>> -    _focus :pmc
>> -  end
>> -
>> end
>>
>> # add user and pmc emails to the response
>> @@ -62,12 +97,13 @@ link = "#{scheme}://#{env['HTTP_HOST']}#{path}"
>> _token token
>> _invitation %{Dear #{@iclaname},
>>
>> -Based on your contributions, you are invited to submit an ICLA to The Apache
>> -Software Foundation, using the following form. Please see
>> -http://apache.org/licenses for details.
>> -
>> +#{prototype_contributor if @votelink.empty?}
>> +#{prototype_committer if not @votelink.empty?}
>> +#{prototype_pmc if @noticelink}
>> +Click on this link to accept:
>> #{link}
>>
>> -Thanks,
>> +Regards,
>> #{user.public_name if user}
>> +On behalf of the #{pmc.name} project
>> }
>> diff --git a/www/project/icla/views/app.html.rb 
>> b/www/project/icla/views/app.html.rb
>> index c606522..b357df9 100755
>> --- a/www/project/icla/views/app.html.rb
>> +++ b/www/project/icla/views/app.html.rb
>> @@ -373,7 +373,7 @@ _html lang: 'en', _width: '80' do
>>     _script src: 'app.js'
>>
>>     _.render '#main' do
>> -      _Main data: {pmcs: @pmcs}, view: @view
>> +      _Main data: {pmcs: @pmcs, ppmcs: @ppmcs}, view: @view
>>     end
>>   end
>> end
>> diff --git a/www/project/icla/views/pages/invite.js.rb 
>> b/www/project/icla/views/pages/invite.js.rb
>> index b39adc1..6c38fb3 100644
>> --- a/www/project/icla/views/pages/invite.js.rb
>> +++ b/www/project/icla/views/pages/invite.js.rb
>> @@ -8,6 +8,7 @@ class Invite < Vue
>>     @iclaemail = ''
>>     @pmc = ''
>>     @votelink = ''
>> +    @noticelink = ''
>>   end
>>
>>   def render
>> @@ -43,22 +44,31 @@ class Invite < Vue
>>     end
>>
>>     _div.form_group do
>> -      _label "PMC", for: 'pmc'
>> +      _label "PMC/PPMC", for: 'pmc'
>>       _select.form_control.pmc! required: true, onChange: self.setPMC, 
>> value: @pmc do
>>         _option ''
>>         Server.data.pmcs.each do |pmc|
>>           _option pmc
>>         end
>> +        _option '---'
>> +        Server.data.ppmcs.each do |ppmc|
>> +          _option ppmc
>> +        end
>>       end
>>     end
>>
>>     _p %{
>> -      Fill the following field only if the person was voted by the PMC to 
>> become
>> -      a committer, or the person is an initial committer on a new project
>> -      accepted for incubation, or the person has been voted as a committer
>> -      on a podling.  For new incubator projects use the
>> -      http://wiki.apache.org/incubator/XXXProposal link; for existing 
>> projects
>> -      link to the [RESULT][VOTE] message in the mail archives.
>> +      For PMCs: Fill the following field only if the person was voted by 
>> the PMC
>> +      to become a committer.
>> +      Link to the [RESULT][VOTE] message in the mail archives.
>> +    }
>> +    _p %{
>> +      For PPMCs: Fill the following field only if the person is an initial
>> +      committer on a new project accepted for incubation, or the person
>> +      has been voted as a committer on a podling.
>> +      For new incubator projects use the
>> +      http://wiki.apache.org/incubator/XXXProposal link; for existing
>> +      podlings link to the [RESULT][VOTE] message in the mail archives.
>>     }
>>     _ 'Navigate to '
>>     _a "ponymail", href: "https://lists.apache.org";
>> @@ -73,10 +83,13 @@ class Invite < Vue
>>     end
>>
>>     _p %{
>> -      Fill the following field only if the person was voted by the PMC to 
>> become
>> -      a PMC member, or voted by the PPMC to be a PPMC member. For existing
>> -      projects, link to the [NOTICE] message sent to the board.
>> -      For PPMCs, link to the [NOTICE] message sent to the incubator PMC.
>> +      For PMCs: Fill the following field only if the person was voted by 
>> the PMC
>> +      to become a PMC member. Link to the [NOTICE] message sent to the 
>> board.
>> +      The message must have been in the archives for at least 72 hours.
>> +    }
>> +    _p %{
>> +      For PPMCs: Fill the following field only if the person was voted by 
>> the
>> +      PPMC to be a PPMC member. Link to the [NOTICE] message sent to the 
>> incubator PMC.
>>       The message must have been in the archives for at least 72 hours.
>>     }
>>
>> @@ -197,6 +210,7 @@ class Invite < Vue
>>       iclaemail: @iclaemail,
>>       pmc: @pmc,
>>       votelink: @votelink
>> +      #noticelink: @noticelink
>>     }
>>
>>     @disabled = true
>> @@ -224,6 +238,7 @@ class Invite < Vue
>>     FormData.email = @iclaemail
>>     FormData.pmc = @pmc
>>     FormData.votelink = @votelink
>> +    FormData.noticelink = @noticelink
>>
>>     # for demo purposes advance to the interview.  Note: the below line
>>     # updates the URL in a way that breaks the back button.
>>
>> --
>> To stop receiving notification emails like this one, please contact
>> ['"[email protected]" <[email protected]>'].
>
> Craig L Russell
> Secretary, Apache Software Foundation
> [email protected] http://db.apache.org/jdo
>

Reply via email to