aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Dekker <jdek@itanimul.li>2022-02-16 02:49:29 +0100
committerAnton Khirnov <anton@khirnov.net>2023-02-12 10:14:22 +0100
commit926059dbf36c00807720a9160a43b4fa13f0d6ae (patch)
treef5f906d4111d62826a7c334d8cf54ef349bd7dd3
parent2b4273072dbb1dde2ab4bbbd30b3cef4042fc4fb (diff)
downloadffmpeg-926059dbf36c00807720a9160a43b4fa13f0d6ae.tar.gz
tools: add general_assembly.pl
This script generates the current general assembly voters according to the criteria of '20 commits in the last 36 months'. Signed-off-by: J. Dekker <jdek@itanimul.li> Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--doc/dev_community/community.md3
-rw-r--r--tools/general_assembly.pl40
2 files changed, 43 insertions, 0 deletions
diff --git a/doc/dev_community/community.md b/doc/dev_community/community.md
index 21e08e20e3..516ca5c05e 100644
--- a/doc/dev_community/community.md
+++ b/doc/dev_community/community.md
@@ -25,6 +25,9 @@ proposal by a member of the General Assembly.
They are part of the GA for two years, after which they need a confirmation by
the GA.
+A script to generate the current members of the general assembly (minus members
+voted in) can be found in `tools/general_assembly.pl`.
+
## Voting
Voting is done using a ranked voting system, currently running on https://vote.ffmpeg.org/ .
diff --git a/tools/general_assembly.pl b/tools/general_assembly.pl
new file mode 100644
index 0000000000..898a6262ef
--- /dev/null
+++ b/tools/general_assembly.pl
@@ -0,0 +1,40 @@
+#!/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;
+ 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) {
+ $true++; # if ($commit =~ /\n[\w\/]+\.(c|h|S|asm|texi)/);
+ }
+
+ 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);
+}