gh can list a repository’s issues as JSON, and jq can flatten that into one issue per line, which makes it easy to feed into Taskwarrior.

gh issue ls --json title,url outputs an array:

[
  {"title": "An Issue", "url": "https://github.com/user/repo/issues/1"},
  {"title": "Another Issue", "url": "https://github.com/user/repo/issues/2"}
]

jq -c '.[]' turns it into one compact object per line:

{"title":"An Issue","url":"https://github.com/user/repo/issues/1"}
{"title":"Another Issue","url":"https://github.com/user/repo/issues/2"}

Then loop over the lines and task add each one:

while read -r issue; do
  title=$(jq -r '.title' <<< "$issue")
  url=$(jq -r '.url' <<< "$issue")
  task add "$title" url:"$url"
done < <(gh issue ls --json title,url | jq -c '.[]')

url here is a user-defined attribute (UDA), so task info <id> shows the link:

$ task info 1
Name          Value
ID            1
Description   An Issue
Status        Pending
URL           https://github.com/user/repo/issues/1

Adding labels to the --json fields lets you turn issue labels into task tags too.