nedbat / scriv

Changelog management tool

Home Page:https://scriv.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`scriv github-release` will fail with multiple github remotes

regisb opened this issue · comments

Consider the following use case:

$ git remote add test1 git@github.com:test1/myrepo.git
$ git remote add test2 git@github.com:test2/myrepo.git

scriv github-release will fail because of multiple GitHub repos (source):

Couldn't determine GitHub repo.

To get past this error, we need to remove all but one of the repos:

$ git remote rm test2

This behavior is OK in CI, where there usually is just a single upstream repo, but it's more problematic when running locally.

  1. The error message is not very informative: I had to look at the source code to understand the problem. The error message could for instance tell us that there are too many GitHub repos, and it could give us about the names of these repos.
  2. I wish there was a way to tell scriv about my preferred repo.

There are different ways to resolve the second issue. I would lean toward adding a CLI option to the github-release command. Something similar to:

scriv github-release --repo=me/myrepo

(I think that the name of a GitHub repo is better than a git remote here.)

Implemented in #79.

Implemented in commit 0bb05c4.

This is now released as part of scriv 1.2.0.