Announcement

  •  » Website
  •  » Automatic notes in bugtracker with Subversion commits

#1 2009-06-25 01:11:18

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Automatic notes in bugtracker with Subversion commits

Hello Piwigo development team,

I've added some SVN hooks, Perl scripts and Bugtracker configuration to produce automatic notes in the bugtracker based on Subversion commit log.

When you commit into Subversion, you write a message. This message is analyzed. If a string like "feature 1234" or "bug 1234" is found, then it will create a note in the issue 1234 of the bugtracker.

Look an example in [Bugtracker] ticket 1033.

Bye

Offline

 

#2 2009-06-25 10:27:17

nicolas
Former Piwigo Team
2004-12-30
1232

Re: Automatic notes in bugtracker with Subversion commits

Very nice ! :-)

Offline

 

#3 2009-06-25 10:47:01

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Automatic notes in bugtracker with Subversion commits

Great feature for developers. Thxs

Users will see features and bugs resolution in real time.




(Extensions are not following these hooks, I expect. ;-) )


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#4 2009-06-25 10:54:22

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: Automatic notes in bugtracker with Subversion commits

http://illiweb.com/fa/i/smiles/icon_thumright.png


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#5 2009-06-25 12:47:10

Eric
Former Piwigo Team
VALENCE (FR)
2005-03-25
1768

Re: Automatic notes in bugtracker with Subversion commits

Excellent ! Thank you.

Offline

 

#6 2009-06-25 20:01:05

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Automatic notes in bugtracker with Subversion commits

VDigital wrote:

(Extensions are not following these hooks, I expect. ;-) )

The algorithm is:

Code:

@lines = `/usr/bin/svnlook dirs-changed $opt{repos_path} -r$opt{revision}`;
chomp(@lines);

my %locations = ();

foreach my $directory (@lines) {
    my @tree = split '/', $directory;

    if (defined $tree[0]) {
        if ($tree[0] eq 'trunk') {
            $locations{'trunk'}++;
        }

        if ($tree[0] eq 'branches') {
            if (defined $tree[1]) {
                $locations{'branch '.$tree[1]}++;
            }
        }

        if ($tree[0] eq 'extensions') {
            if (defined $tree[1]) {
                $locations{'extension '.$tree[1]}++;
            }
        }
    }
}

my $message = sprintf(
    'svn:%u by %s on %s

-----[Subversion commit log]----------------------------------------------------
%s',
    $opt{revision},
    $revision{username},
    join(', ', sort keys %locations),
    $revision{message}
);

So, if the commit is inside an extension, it will generate the message "svn : 12345 by tiico on extension piclens"

Offline

 
  •  » Website
  •  » Automatic notes in bugtracker with Subversion commits

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact