summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-01-19 07:29:35 +0000
committerSam James <sam@gentoo.org>2024-01-19 07:29:35 +0000
commitcfdc7ae8c2568a3e6bfc5c0aad84d78d065340ba (patch)
treefcc461fcb299d603ee1249ac728b64ead77b3090
parentlocal/require-signed-push, local/update-02-gpg: add hook name to PGP error (diff)
downloadgithooks-cfdc7ae8c2568a3e6bfc5c0aad84d78d065340ba.tar.gz
githooks-cfdc7ae8c2568a3e6bfc5c0aad84d78d065340ba.tar.bz2
githooks-cfdc7ae8c2568a3e6bfc5c0aad84d78d065340ba.zip
local/post-receive.gentoo-commits: the CIA notification service is long gone
Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-xlocal/post-receive.gentoo-commits94
1 files changed, 5 insertions, 89 deletions
diff --git a/local/post-receive.gentoo-commits b/local/post-receive.gentoo-commits
index b332fb5..fe2a203 100755
--- a/local/post-receive.gentoo-commits
+++ b/local/post-receive.gentoo-commits
@@ -12,7 +12,7 @@ use IO::Socket;
# NOTE: This hook requires perl >=5.10!
-# For CIA and gentoo-commits, used in gentoo.conf
+# For gentoo-commits, used in gentoo.conf
# Possible variables: %(repo), %(rev)
our $GITWEB_URL; # Used in gentoo.conf
our $IRC_ADDR; # Used in gentoo.conf
@@ -21,19 +21,11 @@ our $IRC_PORT; # Used in gentoo.conf
our $GITROOT = $ENV{"GL_REPO_BASE_ABS"};
$GITROOT = "/var/gitroot" if !$GITROOT or length($GITROOT) == 0;
-# CIA.vc project names, default is the repository name
our %PROJECTS = (
-# "subdir/test" => "ciatest",
);
-# CIA is enabled by default, add repos here to exclude them from CIA.
-# Hash is faster
-# Repository muste be relative to $GITROOT. Don't use the ".git" suffix!
-#our %CIA_EXCLUDE = (
-# "gitolite-admin" => 1,
-## "subdir/test" => 1,
-#);
-
+# Add repos here to exclude from #gentoo-commits.
+# Repository must be relative to $GITROOT. Don't use the ".git" suffix!
our %IRC_EXCLUDE = (
"gitolite-admin" => 1,
# "subdir/test" => 1,
@@ -41,7 +33,7 @@ our %IRC_EXCLUDE = (
# gentoo-commits@lists.g.o is disabled by default, add repos here to enable them
# for commit mails.
-# Repository muste be relative to $GITROOT. Don't use the ".git" suffix!
+# Repository must be relative to $GITROOT. Don't use the ".git" suffix!
our %GENTOO_COMMITS = (
# "subdir/test" => 1,
);
@@ -53,7 +45,7 @@ our %MAILINGLIST = (
);
# Repository settings, like exclude. Exclude must be an array.
-# Those files will be excluded from CIA and gentoo-commits.
+# Those files will be excluded from #gentoo-comits and gentoo-commits.
# Don't forget to escape special chars! Each exclude pattern is a Regex!
# The repository name must be relative to $GITROOT! Don't use the ".git"
# suffix!
@@ -609,75 +601,6 @@ sub irc(@) {
$sock->send($message);
}
-#sub cia(@) {
-# my $rev = shift;
-#
-# my $xml = '<?xml version="1.0" encoding="UTF-8"?>
-#<message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="schema.xsd">
-# <generator>
-# <name>Gentoo Commits script</name>
-# <version>0.0.2</version>
-# <url>https://gentoo.org</url>
-# </generator>
-# <source>
-# <project>%(project)</project>
-# <branch>%(repo):%(branch)</branch>
-# </source>
-# <timestamp>%(committer_ts)</timestamp>
-# <body>
-# <commit>
-# <author>%(committer_username)</author>
-# <revision>%(shortrev)</revision>
-# <files>
-# %(files)
-# </files>
-# <log>%(shortlog)</log>
-# <url>%(url)</url>
-# </commit>
-# </body>
-#</message>';
-#
-# my $message = $xml;
-#
-# my @files;
-# foreach my $status (keys(%{$DATA{"files_verbose"}})) {
-# foreach my $value (@{$DATA{"files_verbose"}{$status}}) {
-# if($status eq "A") {
-# push(@files, sprintf('<file action="add">%s</file>', $value));
-# }
-# elsif($status eq "D") {
-# push(@files, sprintf('<file action="remove">%s</file>', $value));
-# }
-# elsif($status eq "M") {
-# push(@files, sprintf('<file action="modify">%s</file>', $value));
-# }
-# elsif($status eq "R") {
-# my ($old, $new) = split(" => ", $value, 2);
-# push(@files, sprintf('<file action="rename" to="%s">%s</file>', $new, $old));
-# }
-# }
-# }
-#
-# my $files_tmp = @files ? join("\n\t\t\t\t", @files) : "";
-# $message =~ s/%\(files\)/${files_tmp}/;
-#
-# foreach my $key (keys(%DATA)) {
-# $message =~ s/%\(\Q$key\E\)/$DATA{$key}/g;
-# }
-#
-# sendmail(
-# {
-# From => 'CIABOT-NOREPLY@gentoo.org',
-# To => [ 'cia@cia.vc' ],
-# Data => $message,
-# Subject => "DeliverXML",
-# "Content-type" => "text/xml; charset=UTF-8",
-# "Message-ID" => $DATA{"Message-ID"},
-## "NoMail" => 1, "Debug" => 1,
-# }
-# );
-#}
-
sub commit_mail(@) {
my $rev = shift;
@@ -908,13 +831,6 @@ Please contact the repository owner and/or the overlays team
next;
}
-# if((!defined($CIA_EXCLUDE{$REPO}) or $CIA_EXCLUDE{$REPO} eq 0) and (!defined(git_config_yesno("gentoo.cia.exclude")) or git_config_yesno("gentoo.cia.exclude") == 0)) {
-# # No CIA for private/infra repositories
-# if(!$ISPRIVATE and $CHANGE_TYPE eq "update") {
-# cia($REV); # FIXME: May we announce new/deleted tags/branches too?
-# }
-# }
-
commit_mail($REV);
if((!defined($IRC_EXCLUDE{$REPO}) or $IRC_EXCLUDE{$REPO} eq 0) and (!defined(git_config_yesno("gentoo.irc.exclude")) or git_config_yesno("gentoo.irc.exclude") == 0)) {