Browse Source

Add manual contributors

merge-requests/5/head
Jonathan Druart 3 years ago
parent
commit
9004e69f95
5 changed files with 43 additions and 2 deletions
  1. +3
    -0
      etc/config.yaml
  2. +5
    -0
      etc/notes.tt
  3. +22
    -2
      lib/Koha/Release.pm
  4. +5
    -0
      templates/release_notes_tmpl.tt
  5. +8
    -0
      templates/release_notes_tmpl_html.tt

+ 3
- 0
etc/config.yaml View File

@@ -9,6 +9,9 @@ pootle:
url: http://translate.koha-community.org
login: 0
password: 0

repo:
kohadocs:
# login/password are also retrieved from environment variable:
# BZ_login and BZ_password.
# Here login=0 => no authentification to BZ


+ 5
- 0
etc/notes.tt View File

@@ -184,6 +184,11 @@ for Koha.
- [% signer.name %] ([% signer.signoffs %])[%- END -%]
[% END %]

[%- IF version.ismajor AND manual_contributors %]
And people who contributed to the Koha manual during the release cycle of Koha [% version.human %].
[% FOREACH contributor IN manual_contributors %]
* [% contributor.name %] ([% contributor.commits %])[%- END -%][% END %]

We regret any omissions. If a contributor has been inadvertently missed,
please send a patch against these release notes to
koha-patches@lists.koha-community.org.


+ 22
- 2
lib/Koha/Release.pm View File

@@ -107,6 +107,8 @@ sub _build_bz {
}




sub BUILD {
my $self = shift;

@@ -335,7 +337,7 @@ sub info {
$vars->{contributors} = [ map {
/\s*(\d*)\s*(.*)\s*$/;
{ name => $2, commits => $1 }
} qx(git log --pretty=short $range | git shortlog -s | sort -k3 -) ];
} qx(git shortlog -s --pretty=short $range | sort -k3 -) ];

$vars->{signers} = [ map {
/\s*(\d*)\s*(.*)\s*$/;
@@ -348,6 +350,24 @@ sub info {
qx(git log $range | grep 'Sponsored-by' |
sed -e 's/^.*Sponsored-by: //' | sort | uniq) ];

my $kohadocs_repo = $self->c->{repo}{kohadocs};
if ( $kohadocs_repo ) {
my ( $from_commit, $to_commit ) = split '\.\.', $range;
my $from_date = `git show -s --format=%ci $from_commit^{commit}`;
chomp $from_date;
$to_commit = 'origin/master' unless $to_commit;
my $closest_from_commit = `git -C $kohadocs_repo rev-list -n 1 --before="$from_date" origin/master`;
chomp $closest_from_commit;
my $to_date = `git show -s --format=%ci $to_commit^{commit}`;
chomp $to_date;
my $closest_to_commit = `git -C $kohadocs_repo rev-list -n 1 --before="$to_date" origin/master`;
chomp $closest_to_commit;
$vars->{manual_contributors} = [ map {
/\s*(\d*)\s*(.*)\s*$/;
{ name => $2, commits => $1 }
} qx(git -C $kohadocs_repo shortlog -s --pretty=short $closest_from_commit..$closest_to_commit| sort -k3 -) ];
}

# contributing companies, with their number of commits, by alphabetical
# order companies are retrieved from the email address. generic emails
# like hotmail.com, gmail.com are cumulated in a "undentified"
@@ -355,7 +375,7 @@ sub info {
my $map = $self->c->{domainmap};
my $companies;
foreach (
qx(git log --pretty=short $range | git shortlog -s -e | sort -k3 -) )
qx(git shortlog -s -e --pretty=short $range | sort -k3 -) )
{
chop;
/(\d+).*@(.*)>/;


+ 5
- 0
templates/release_notes_tmpl.tt View File

@@ -183,6 +183,11 @@ for Koha [% shortversion %].
* [% signer.name %] ([% signer.signoffs %])[%- END -%]
[% END %]

[%- IF MAJOR AND manual_contributors -%]
And people who contributed to the Koha manual during the release cycle of Koha [% shortversion %].
[% FOREACH contributor IN manual_contributors %]
* [% contributor.name %] ([% contributor.commits %])[%- END -%][% END %]

We regret any omissions. If a contributor has been inadvertently missed,
please send a patch against these release notes to
koha-patches@lists.koha-community.org.


+ 8
- 0
templates/release_notes_tmpl_html.tt View File

@@ -233,6 +233,14 @@ The release team for Koha [% shortversion %] is
</ul>
[% END %]

[% IF MAJOR AND manual_contributors %]
<p>And people who contributed to the Koha manual during the release cycle of Koha [% shortversion %]:</p>
<ul>
[% FOREACH contributor IN manual_contributors %]
<li> [% contributor.name %] ([% contributor.commits %])</li>
</ul>
[% END %]

<p>We regret any omissions. If a contributor has been inadvertently missed, please send a patch against these release notes to koha-patches@lists.koha-community.org.</p>

<h3 id="koha-git">Revision control notes</h3>


Loading…
Cancel
Save