GH-2242 - Add ticket backport script.

This commit is contained in:
Oliver Drotbohm
2024-10-11 18:18:56 +02:00
parent 250c676a18
commit ce508ed0a4

13
etc/copy-ticket.sh Executable file
View File

@@ -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"