Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] tools: add general_assembly.pl
@ 2022-02-15 11:50 J. Dekker
  2022-02-15 16:46 ` Jean-Baptiste Kempf
  0 siblings, 1 reply; 3+ messages in thread
From: J. Dekker @ 2022-02-15 11:50 UTC (permalink / raw)
  To: ffmpeg-devel

This script generates the current general assembly voters according to
the criteria of '20 code commits in the last 36 months'.

Signed-off-by: J. Dekker <jdek@itanimul.li>
---

 This was rejected last time but I would really like to get this in the
 tools or at least publicly recorded on mailing list since the script
 was updated.

 tools/general_assembly.pl | 45 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 tools/general_assembly.pl

diff --git a/tools/general_assembly.pl b/tools/general_assembly.pl
new file mode 100644
index 0000000000..c3aea14d79
--- /dev/null
+++ b/tools/general_assembly.pl
@@ -0,0 +1,45 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+use POSIX qw(strftime);
+use Encode qw(decode);
+use Data::Dumper;
+
+sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
+
+my @shortlog = split /\n/, decode('UTF-8', `git log --pretty=format:"%aN <%aE>" --since="last 36 months" | sort | uniq -c | sort -r`, Encode::FB_CROAK);
+my %assembly = ();
+
+foreach my $line (@shortlog) {
+    my ($count, $name, $email) = $line =~ m/^ *(\d+) *(.*?) <(.*?)>/;
+
+    if ($count < 20) {
+        next;
+    }
+
+    $name = trim $name;
+
+    # assume people with 50 commits have at least 20 source commits
+    if ($count < 50) {
+        my $true = 0;
+        my @commits = split /(^|\n)commit [a-z0-9]{40}(\n|$)/, decode('UTF-8', `git log --name-only --use-mailmap --author="$email" --since="last 36 months"`, Encode::FB_CROAK);
+        foreach my $commit (@commits) {
+            if ($commit =~ /\n[\w\/]+\.(c|h|S|asm)/) {
+                $true++;
+            }
+        }
+
+        if ($true < 20) {
+            next;
+        }
+    }
+
+    $assembly{$name} = $email;
+}
+
+printf("# %s %s", strftime("%Y-%m-%d", localtime), decode('UTF-8', `git rev-parse HEAD`, Encode::FB_CROAK));
+foreach my $email (sort values %assembly) {
+    printf("%s\n", $email);
+}
-- 
2.32.0 (Apple Git-132)

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH] tools: add general_assembly.pl
  2022-02-15 11:50 [FFmpeg-devel] [PATCH] tools: add general_assembly.pl J. Dekker
@ 2022-02-15 16:46 ` Jean-Baptiste Kempf
  2022-02-16  1:46   ` J, Dekker
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Baptiste Kempf @ 2022-02-15 16:46 UTC (permalink / raw)
  To: ffmpeg-devel

Hello,

On Tue, 15 Feb 2022, at 12:50, J. Dekker wrote:
>  This was rejected last time but I would really like to get this in the
>  tools or at least publicly recorded on mailing list since the script
>  was updated.

Why was this rejected?

> +        foreach my $commit (@commits) {
> +            if ($commit =~ /\n[\w\/]+\.(c|h|S|asm)/) {
> +                $true++;
> +            }

Why do we filter on those file types? .md, .pl and other things for docs are active in the community.

-- 
Jean-Baptiste Kempf -  President
+33 672 704 734
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [FFmpeg-devel] [PATCH] tools: add general_assembly.pl
  2022-02-15 16:46 ` Jean-Baptiste Kempf
@ 2022-02-16  1:46   ` J, Dekker
  0 siblings, 0 replies; 3+ messages in thread
From: J, Dekker @ 2022-02-16  1:46 UTC (permalink / raw)
  To: ffmpeg-devel

On 15/02/2022 17:46, Jean-Baptiste Kempf wrote:
> Hello,
> 
> On Tue, 15 Feb 2022, at 12:50, J. Dekker wrote:
>>   This was rejected last time but I would really like to get this in the
>>   tools or at least publicly recorded on mailing list since the script
>>   was updated.
> 
> Why was this rejected?

It was blocked by Nicolas as the procedure to determine the general 
assembly was not fully decided.

>> +        foreach my $commit (@commits) {
>> +            if ($commit =~ /\n[\w\/]+\.(c|h|S|asm)/) {
>> +                $true++;
>> +            }
> 
> Why do we filter on those file types? .md, .pl and other things for docs are active in the community.

It was just discussed at the in person meeting, our documentation states 
otherwise and I think we should stick to the documentation here. It 
doesn't make that much sense to filter out people who have majority 
documentation commits either--20 documentation commits is still a 
significant enough contribution.

See updated patch.

-- 
J. Dekker
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-16  1:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 11:50 [FFmpeg-devel] [PATCH] tools: add general_assembly.pl J. Dekker
2022-02-15 16:46 ` Jean-Baptiste Kempf
2022-02-16  1:46   ` J, Dekker

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git