Assume $repoowner owns the Github repository.

Use $repoowner instead of $username as repository owner when making API
calls. Otherwise, it is impossible to push issues to a repository that
you have access to, but do not own.