https://bugzilla.gnome.org/show_bug.cgi?id=599066
sysadmin | Git | unspecified
Summary: Create a specific check for the gnomeweb user from
l10n.gnome.org
Classification: Infrastructure
Product: sysadmin
Version: unspecified
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: Git
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
GNOME target: ---
GNOME version: ---
Our l10n infrastructure on l10n.gnome.org would like to be able to auto-commit
files from the Web application Damned-Lies.
For security concerns, it has been decided by the sysadmin team that this would
require a specific git hook to check that only acceptable files are committed
by this account.
Basically, the hook should be like the snippet below. I've no idea if the
committer name or email is forgeable though.
#!/bin/bash
check_gnomeweb() {
path=$1
case "$path" in
*.po|LINGUAS)
;;
*)
echo "Unauthorized file for gnomeweb user: $path"
exit 1
esac
}
committer_name="$(git log $commit -1 --pretty=format:%cn)"
if [ $committer_name = "Gnomeweb" ] ; then
git diff-tree --name-only -r $oldrev $newrev | (
while read path ; do
check_gnomeweb $path
done
)
fi
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the QA contact of the bug.
You are watching the assignee of the bug.
_______________________________________________
gnome-infrastructure mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-infrastructure