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

versionBranches fails on new major if branch does not exist #1270

Closed
bmuenzenmeyer opened this issue Jun 2, 2020 · 5 comments · Fixed by #1278
Closed

versionBranches fails on new major if branch does not exist #1270

bmuenzenmeyer opened this issue Jun 2, 2020 · 5 comments · Fixed by #1278
Labels
bug Something isn't working released This issue/pull request has been released.

Comments

@bmuenzenmeyer
Copy link
Contributor

bmuenzenmeyer commented Jun 2, 2020

Describe the bug

I have versionBranches: true set in my auto config, and expect new MAJOR-labeled releases to create a branch to track the new release line.

To Reproduce

  • .autorc.js
module.exports = {
  githubApi: 'URL...',
  githubGraphqlApi: 'URL...,
  plugins: [
    ['npm']
  ],
  versionBranches: true,
}
  1. merge a PR with MAJOR into master
  2. npx auto

Expected behavior

auto creates a new branch to track the major version line

Environment information:

Environment Information:

"auto" version: v9.36.2
"git"  version: v2.20.1 (Apple Git-117)
"node" version: v12.14.1GHE version:    v2.19.13

Project Information:

✔ Repository:      [REDACTED]
✔ Author Name:     BrianMuenzenmeyer
✔ Author Email:    [REDACTED]
✔ Current Version: v7.1.1
✔ Latest Release:  v7.1.1

✔ Labels configured on GitHub project

GitHub Token Information:

✔ Token:            [Token starting with e067]
✔ Repo Permission:  admin
✔ User:             BrianMuenzenmeyer
✔ API:              [REDACTED]
✔ Enabled Scopes:   read:user, repo
✔ Rate Limit:       29892/30000

Additional context

snippet

✔  success   Calculated SEMVER bump: major
ℹ  info      Calculated next version to be: 8.0.0
ℹ  info      Old changelog exists, prepending changes.
ℹ  info      Wrote new changelog to filesystem.
ℹ  info      NPM: Got previous version from package.json v7.1.1
Error: Running command 'git' with args [push, https://[TOKEN]@[GIT_URL\/[ORG]/[REPO], version-7] failed

error: src refspec version-7 does not match any.
@bmuenzenmeyer bmuenzenmeyer added the bug Something isn't working label Jun 2, 2020
@bmuenzenmeyer
Copy link
Contributor Author

I pushed a version-7 branch to remote and this still didn't work - so not quite sure what's wrong yet. still digging.

@hipstersmoothie
Copy link
Collaborator

I'll take a look at this later today!

@bmuenzenmeyer
Copy link
Contributor Author

Googling for this error mentions a lot of instances of the branch not matching a remote, but I am fairly certain we have that right. We run git fetch --tags prior to calling auto and this is a portion of the output:

+ git fetch --tags
From https://git.[REDACTED].com/[REDACTED]/[REDACTED]
 * [new branch]      minor2                      -> origin/minor2
 * [new branch]      next                        -> origin/next
 * [new branch]      version-5                   -> origin/version-5
 * [new branch]      version-6                   -> origin/version-6
...

To my knowledge, at the time this runs, we are on baseBranch (master), not version-6. Does that come into play for the push?

@hipstersmoothie
Copy link
Collaborator

Yeah it should be run from baseBranch. I think I found the bug. PR incoming!

@adierkens
Copy link
Collaborator

🚀 Issue was released in v9.39.0 🚀

@adierkens adierkens added the released This issue/pull request has been released. label Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants