Skip to content

Instantly share code, notes, and snippets.

@yamitake
Created May 21, 2024 13:36
Show Gist options
  • Save yamitake/1e723442fc42bfe91d59bc4f405285ec to your computer and use it in GitHub Desktop.
Save yamitake/1e723442fc42bfe91d59bc4f405285ec to your computer and use it in GitHub Desktop.
指定したリポジトリからランダムでIssueを開く
#!/bin/bash
REPO="yapr/taskhub"
temp_file=$(mktemp)
gh issue list --repo "$REPO" --state open > "$temp_file"
random_issue=$(shuf -n 1 "$temp_file")
rm "$temp_file"
issue_number=$(echo "$random_issue" | awk '{print $1}')
gh issue view "$issue_number" --repo "$REPO" --web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment