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} に更新する