From dc9bce512bf94f6b873cea1181930f9ad545ba1b Mon Sep 17 00:00:00 2001 From: katoken-0215 Date: Tue, 2 Jul 2024 23:15:04 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=86=E3=83=B3=E3=83=97=E3=83=AC=E3=83=BC?= =?UTF-8?q?=E3=83=88=E3=81=A7=E4=B8=80=E6=8B=AC=E3=81=97=E3=81=A6=20issue?= =?UTF-8?q?=20=E3=82=92=E4=BD=9C=E6=88=90=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- create-github-issues/create-issues.sh | 12 ++++++++++++ create-github-issues/render-template.sh | 5 +++++ create-github-issues/templates/test-${VERSION}.md | 1 + 3 files changed, 18 insertions(+) create mode 100755 create-github-issues/create-issues.sh create mode 100755 create-github-issues/render-template.sh create mode 100644 create-github-issues/templates/test-${VERSION}.md diff --git a/create-github-issues/create-issues.sh b/create-github-issues/create-issues.sh new file mode 100755 index 0000000..d3a2595 --- /dev/null +++ b/create-github-issues/create-issues.sh @@ -0,0 +1,12 @@ +#!/bin/bash -ue + +CURRENT_DIR=$(dirname $0) +TEMPLATE_DIR=$CURRENT_DIR/templates + +for template in $(find $TEMPLATE_DIR -type f -name '*.md'); do + filename=$(basename $template .md) + issue_name=$(sh -c "echo $filename") + + echo "Creating issue: $issue_name from $template" + ./render-template.sh $template | gh issue create -F - --title "$issue_name" +done diff --git a/create-github-issues/render-template.sh b/create-github-issues/render-template.sh new file mode 100755 index 0000000..c234e38 --- /dev/null +++ b/create-github-issues/render-template.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +sh <<__EOT1__ +cat <<__EOT2__ +$(cat "$@") diff --git a/create-github-issues/templates/test-${VERSION}.md b/create-github-issues/templates/test-${VERSION}.md new file mode 100644 index 0000000..e5821b9 --- /dev/null +++ b/create-github-issues/templates/test-${VERSION}.md @@ -0,0 +1 @@ +- [ ] ${VERSION} に更新する