Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting remote issue (v1/v2) #58

Closed
michalbundyra opened this issue Sep 1, 2019 · 2 comments · Fixed by #62
Labels
bug

Comments

@michalbundyra
Copy link
Contributor

@michalbundyra michalbundyra commented Sep 1, 2019

Bug Report

Q A
BC Break no
Version 2.1.0

Summary

Remotes are not detected and choosing abort try to push "to abort". My remotes are correct:

origin	git://github.com/zendframework/zend-expressive-authentication-oauth2.git (fetch)
origin	git://github.com/zendframework/zend-expressive-authentication-oauth2.git (push)
webimpress	git@github.com:webimpress/zend-expressive-authentication-oauth2.git (fetch)
webimpress	git@github.com:webimpress/zend-expressive-authentication-oauth2.git (push)
zendframework	git@github.com:zendframework/zend-expressive-authentication-oauth2.git (fetch)
zendframework	git@github.com:zendframework/zend-expressive-authentication-oauth2.git (push)

On v1 I've seen option origin and zendframework, but selecting doesn't work as I was getting error "pushing to 0" or "pushing to 1" (so the option number was used instead of the value).

In v2 there is the same issue, but also remotes are not recognised.

Current behaviour

Using version 2.1:

$ keep-a-changelog version:release 1.2.0
More than one valid remote was found; which one should I use?
  [abort] Abort release
 > abort
Pushing tag 1.2.0 to abort
fatal: 'abort' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Error pushing tag to remote!
Please check the output for details.

Using the latest v1 (remotes are detected correctly):

$ keep-a-changelog release zendframework/zend-expressive-authentication-oauth2 1.2.0 --global
Preparing changelog for release
More than one valid remote was found; which one should I use?
  [0    ] origin
  [1    ] zendframework
  [abort] Abort release
 > abort
Pushing tag 1.2.0 to abort
fatal: 'abort' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Error pushing tag to remote!
Please check the output for details.

and:

$ keep-a-changelog release zendframework/zend-expressive-authentication-oauth2 1.2.0 --global
Preparing changelog for release
More than one valid remote was found; which one should I use?
  [0    ] origin
  [1    ] zendframework
  [abort] Abort release
 > 1
Pushing tag 1.2.0 to 1
fatal: '1' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Error pushing tag to remote!
Please check the output for details.

How to reproduce

My configuration (v2):

[defaults]
changelog_file = CHANGELOG.md
provider = github

[providers]
github[class] = Phly\KeepAChangelog\Provider\GitHub
github[token] = Yes
gitlab[class] = Phly\KeepAChangelog\Provider\GitLab
gitlab[token] = Yes

Expected behaviour

  • Remotes are detected correctly.
  • I can choose desired remote.
@michalbundyra michalbundyra added the bug label Sep 1, 2019
@geerteltink

This comment has been minimized.

Copy link

@geerteltink geerteltink commented Nov 5, 2019

I ran into this issue today. A work around until fixed is to add the remote argument:

--remote=zendframework
@weierophinney

This comment has been minimized.

Copy link
Contributor

@weierophinney weierophinney commented Nov 7, 2019

I figured out what's happening.

A ChoiceQuestion returns the index of the choice, not the value. As such, I was using the wrong value for the remote when chosen by prompt.

Pushing a PR momentarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.