pw-apply: export ADD_TAGS based on replies to cover letter

Patchwork does not automatically propagate tags from cover letter.
With a few simple REST calls we can get all the comments and grep
them for tags.

We export those tags to a env var called ADD_TAGS.

User is expected to add to their applypatch-msg hook something like:

    while IFS= read -r tag; do
	echo -e Adding tag: '\e[35m'$tag'\e[0m'
	git interpret-trailers --in-place \
	    --if-exists=addIfDifferent \
	    --trailer "$tag" \
	    "$1"
    done <<< "$ADD_TAGS"

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 file changed