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

Backmerge with restoreWorkspace fails when no stash entry is found #55

Closed
1 task done
gimiki opened this issue Aug 8, 2023 · 1 comment · Fixed by #63
Closed
1 task done

Backmerge with restoreWorkspace fails when no stash entry is found #55

gimiki opened this issue Aug 8, 2023 · 1 comment · Fixed by #63
Labels
bug Something isn't working released

Comments

@gimiki
Copy link

gimiki commented Aug 8, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If no stash entry is present, the restoreWorkspace (i.e. git stash pop) fails.

[10:43:05 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Stashing uncommitted files from Git workspace.
[10:43:05 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Performing back-merge into develop branch "release/qa".
[10:43:05 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Branch is detached. Checking out release branch "master".
[10:43:05 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Checking out develop branch "release/qa".
[10:43:05 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Performing backmerge with "rebase" strategy.
[10:43:05 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Loading plugins
[10:43:05 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Executing "done" step of plugins
[10:43:05 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Found 0 staged files for back-merge commit
[10:43:05 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Pushing backmerge to develop branch release/qa
[10:43:06 AM] [semantic-release] [@saithodev/semantic-release-backmerge] › ℹ  Restoring stashed files to Git workspace.
catch error
Error: Command failed with exit code 1: git stash pop
No stash entries found.
    at makeError (/home/node/.npm-global/lib/node_modules/@saithodev/semantic-release-backmerge/node_modules/execa/lib/error.js:60:11)

Expected Behavior

Backmerge plugin should ignore the error if no stash entry is found.

Steps To Reproduce

  • git repo without unstashed files
  • backmerge config
  ['@saithodev/semantic-release-backmerge', {
    "backmergeBranches": ["develop"],
    "backmergeStrategy": "merge",
    "fastForwardMode": "ff",
    "clearWorkspace": true,
    "restoreWorkspace": true
  }]
  • Run semantic-release

Environment

- "semantic-release@~21.0.5" "@semantic-release/changelog@~6.0.3"
- "@semantic-release/exec@~6.0.3" "@semantic-release/git@~10.0.1"
- "@saithodev/semantic-release-backmerge@~3.2.0"

Anything else?

No response

@gimiki gimiki added the bug Something isn't working label Aug 8, 2023
saitho added a commit that referenced this issue Nov 27, 2023
Ignore "No stash entries found." when stashing
is enabled but no files were actually stashed.

Resolves: #55
saitho added a commit that referenced this issue Nov 27, 2023
Ignore "No stash entries found." when stashing
is enabled but no files were actually stashed.

Resolves: #55
saitho added a commit that referenced this issue Nov 27, 2023
Ignore "No stash entries found." when stashing
is enabled but no files were actually stashed.

Resolves: #55
saitho added a commit that referenced this issue Nov 27, 2023
Ignore "No stash entries found." when stashing
is enabled but no files were actually stashed.

Resolves: #55
github-actions bot pushed a commit that referenced this issue Nov 27, 2023
## [4.0.1](v4.0.0...v4.0.1) (2023-11-27)

### Bug Fixes

* ignore empty stash ([d8e9734](d8e9734)), closes [#55](#55)
@saitho
Copy link
Owner

saitho commented Nov 27, 2023

🎉 This issue has been resolved in version 4.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants