From cd0d308097d1b1aac20abbdfa34f012737bdbfac Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Fri, 11 Oct 2024 18:18:56 +0200 Subject: [PATCH] GH-2243 - Add ticket backport script. --- etc/copy-ticket.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 etc/copy-ticket.sh diff --git a/etc/copy-ticket.sh b/etc/copy-ticket.sh new file mode 100755 index 00000000..26426401 --- /dev/null +++ b/etc/copy-ticket.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +sourceGh="GH-$1" +json=$(gh issue view $1 --json=title,labels) + +title=$(echo $json | jq -r '.title') +labels=$(echo $json | jq -r '.labels[].name' | paste -sd ',' -) + +gh issue create --title "$title" \ + --body "Back-port of $sourceGh." \ + --label "$labels" \ + --assignee "@me" \ + --milestone "$2"