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

GitHub Release goes to origin vs. upstream remote #632

Closed
humphd opened this issue Mar 26, 2020 · 9 comments
Closed

GitHub Release goes to origin vs. upstream remote #632

humphd opened this issue Mar 26, 2020 · 9 comments

Comments

@humphd
Copy link

humphd commented Mar 26, 2020

We ran into an issue today where a release seemed to use different remotes than we expected.

We got tags in our "upstream" repo for 0.8.0 and 0.8.1:

https://github.com/Seneca-CDOT/telescope/releases

However, the actual GitHub Release went to the "origin" of the dev who ran it (cc @Silvyre):

https://github.com/Silvyre/telescope/releases/tag/0.8.1

I would have expected them both to go to the same repo.

Our release-it config looks like this:

{
  "hooks": {
    "before:init": ["npm run test-ci"]
  },
  "git": {
    "pushRepo": "upstream"
  },
  "github": {
    "release": true
  },
  "npm": {
    "publish": false
  }
}

With github I can specify the pushRepo but I don't see anything like that in https://github.com/release-it/release-it/blob/master/docs/github-releases.md.

Is this a config error on our part, a misunderstanding about what is expected, or a bug in release-it?

Thanks for any guidance on this. We love release-it.

@humphd
Copy link
Author

humphd commented Mar 26, 2020

For reference, this is what his remotes look like:

image

And what he ran:

image

@webpro
Copy link
Collaborator

webpro commented Mar 26, 2020

The git.pushRepo is meant to specify which Git repo to push the changes.

You can use github.pushRepo as well (pretty sure, but didn't actually test). Didn't come across this use case yet. On first thought, I think it's good to explicitly specify this. Please let me know whether this works for you.

But definitely this should be documented, then.

@rchl
Copy link
Contributor

rchl commented Mar 26, 2020

I think that github release should be (by default) made to the same repo where (git) release is pushed.

So if git release is made based on upstream branch, so should github release. And in this case, if git.pushRepo is specified as upstream, github release should follow that by default.

Otherwise, we have the same issue I was having in #608. At least when release is based on tracked branch.

You see, how the user configures his repo and names his remotes shouldn't have bearing on where things get released. Otherwise, multiple people working on the same repo can end up making releases to different repos depending on whether they named their upstream remote origin or upstream.

@rchl
Copy link
Contributor

rchl commented Mar 26, 2020

(I have in fact made accidental github releases to wrong github repo due to this problem, since I've started using release-it recently :))

@webpro
Copy link
Collaborator

webpro commented Mar 26, 2020

OK I guess that's clearly two votes in favor of using the same remote :)

@webpro webpro closed this as completed in 2ab8aaf Mar 27, 2020
@webpro
Copy link
Collaborator

webpro commented Mar 27, 2020

Alright, the feature is in v13.4.0

@humphd
Copy link
Author

humphd commented Mar 27, 2020

@webpro thanks for doing this, I think it will remove confusion.

@webpro
Copy link
Collaborator

webpro commented Mar 27, 2020

Yes, and it even cleaned up the codebase a bit 👍

@Silvyre
Copy link

Silvyre commented Mar 27, 2020

The changes made fixed the issues we were having; thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants