public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/qa-scripts:master commit in: cgi-bin/, /
@ 2019-07-25 13:51 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2019-07-25 13:51 UTC (permalink / raw
  To: gentoo-commits

commit:     49897929ba1fc87d8ba34eb67441f1ab185a09ed
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 25 13:51:30 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 25 13:51:30 2019 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=49897929

gentoo-ci: Support matching maintainers and projects

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 cgi-bin/get-git-file.sh | 19 ++++++++++++++++++-
 pkgcheck2html           |  2 +-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/cgi-bin/get-git-file.sh b/cgi-bin/get-git-file.sh
index 09f2575..5b7b8fc 100755
--- a/cgi-bin/get-git-file.sh
+++ b/cgi-bin/get-git-file.sh
@@ -12,6 +12,21 @@ main() {
 	local commit=${qs%%;*}
 	qs=${qs#*;}
 	local file=${qs%%;*}
+	[[ ${qs} == *\;* ]] && qs=${qs#*;} || qs=
+
+	local filter_maint= projects=
+	while [[ -n ${qs} ]]; do
+		local q=${qs%%;*}
+		case ${q} in
+			maintainer=*)
+				filter_maint="--maintainer ${q#maintainer=}"
+				;;
+			include-projects)
+				projects=--projects
+				;;
+		esac
+		[[ ${qs} == *\;* ]] && qs=${qs#*;} || qs=
+	done
 
 	if [[ ${repo} == */* ]]; then
 		echo "DANGER! SOMEONE TRIES TO ABUSE ME!" >&2
@@ -63,7 +78,9 @@ main() {
 		local ts=$(TZ=UTC git log --format='%cd' --date=iso-local -1 | cut -d' ' -f1-2)
 
 		git cat-file -p "${tree[2]}" \
-			| PYTHONIOENCODING=utf8 python "${topdir}"/pkgcheck2html/pkgcheck2html.py ${verbose} -t "${ts}" -
+			| PYTHONIOENCODING=utf8 python \
+			"${topdir}"/pkgcheck2html/pkgcheck2html.py ${verbose} \
+			${filter_maint} ${projects} -t "${ts}" -
 	else
 		git cat-file -p "${tree[2]}"
 	fi

diff --git a/pkgcheck2html b/pkgcheck2html
index d933d7f..4a5cbf6 160000
--- a/pkgcheck2html
+++ b/pkgcheck2html
@@ -1 +1 @@
-Subproject commit d933d7f51a5b3b8dd1bcff37c84982b72bdf5ee3
+Subproject commit 4a5cbf61d19b42c25f754c71543122b2b300c8a9


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

* [gentoo-commits] proj/qa-scripts:master commit in: cgi-bin/, /
@ 2020-06-02 16:15 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2020-06-02 16:15 UTC (permalink / raw
  To: gentoo-commits

commit:     ed8c6968a49e85d8da58425eb1eb946f01ab48e1
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  2 16:14:42 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jun  2 16:14:42 2020 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=ed8c6968

Support package filtering & rev info in pkgcheck2html

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 cgi-bin/get-git-file.sh | 8 +++++++-
 pkgcheck2html           | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cgi-bin/get-git-file.sh b/cgi-bin/get-git-file.sh
index e899601..ef57a72 100755
--- a/cgi-bin/get-git-file.sh
+++ b/cgi-bin/get-git-file.sh
@@ -24,6 +24,9 @@ main() {
 			include-projects)
 				projects=--projects
 				;;
+			pkg=*)
+				filter_pkg="--pkg ${pkg}"
+				;;
 		esac
 		[[ ${qs} == *\;* ]] && qs=${qs#*;} || qs=
 	done
@@ -64,6 +67,9 @@ main() {
 		fi
 	fi
 
+	local revarg=
+	[[ ${commit} != HEAD ]] && revarg="--revision ${commit}"
+
 	local ct
 	case "${file}" in
 		*.css) ct=text/css;;
@@ -81,7 +87,7 @@ main() {
 			| PYTHONIOENCODING=utf8 python \
 			"${topdir}"/pkgcheck2html/pkgcheck2html.py ${verbose} \
 			-x "${topdir}"/pkgcheck2html/excludes.json \
-			${filter_maint} ${projects} -t "${ts}" -
+			${filter_maint} ${projects} ${filter_pkg} -t "${ts}" -
 	else
 		git cat-file -p "${tree[2]}"
 	fi

diff --git a/pkgcheck2html b/pkgcheck2html
index a0d7dc5..4eb6fc5 160000
--- a/pkgcheck2html
+++ b/pkgcheck2html
@@ -1 +1 @@
-Subproject commit a0d7dc5e8b7d6f2c3aef16020513440851cf8b9c
+Subproject commit 4eb6fc540e0d94badb23874be411ad2df894b08f


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

end of thread, other threads:[~2020-06-02 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-02 16:15 [gentoo-commits] proj/qa-scripts:master commit in: cgi-bin/, / Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2019-07-25 13:51 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox