release-please-action icon indicating copy to clipboard operation
release-please-action copied to clipboard

After releasing pre-release version PR with same version is created

Open pstepniewskiconfigit opened this issue 3 years ago • 6 comments

After successfully releasing 5.0.0-beta.1, release-please-action creates PR with with same version 5.0.0-beta.1 instead 5.0.0-beta.2 or just 5.0.0.

Environment details

  • OS: windows-latest
  • Node.js version: 4.16.0
  • npm version: 7.6.0

pstepniewskiconfigit avatar Mar 09 '21 11:03 pstepniewskiconfigit

@pstepniewskiconfigit I don't believe that release-please's bumping logic currently understands pre-releases. Could you share the repository where this happened to you?

bcoe avatar Mar 10 '21 17:03 bcoe

@bcoe Unfortunately, I can not. It is the organization's private repository.

pstepniewskiconfigit avatar Mar 11 '21 09:03 pstepniewskiconfigit

https://github.com/Coobaha/suomea/pull/6 @bcoe Please check this repo, I have similar issue not sure what exactly causes it. According to logs (maybe verbose mode exists?) - it resolves to correct previous SHA but amount of changes is not.

https://github.com/Coobaha/suomea/runs/2118544598?check_suite_focus=true

Run GoogleCloudPlatform/release-please-action@v2
  with:
    token: ***
    release-type: python
    package-name: AnkiFinnish
    command: release-pr
    path: anki/
    default-branch: main
    fork: false
    clean: true
    bump-minor-pre-major: false
    monorepo-tags: false
    pull-request-title-pattern: chore${scope}: release${component} ${version}
✔ found 5 commits since a32fa66be7d6365475228639cac6d84d0c2b0a10
✔ release as patch: There are 0 BREAKING CHANGES and 0 features
✖ PR https://github.com/Coobaha/suomea/pull/6 remained the same

It just releases same changes again and again (after release PR merge too :D)

Coobaha avatar Mar 16 '21 07:03 Coobaha

@Coobaha the problem appears to be when you "Rebase and Merge" a commit, rather than using "Squash and Merge", the tag points to your merge PR, rather than the actual commit with the release, however when you use the GitHub API to iterate over commits, the merge PR is not included in the set of commits:

chore: release 0.1.1 0b073a488725fd505b09fab2a9afb69759ecb012
fix: rename plugin to AnkiFinnish ea7cd8be331f4c29a84c2d3aeafca8491f2c2759
chore: release 0.1.0 4f8d7414b54b6ece376f4d4cdcc5dac45b807125
fix: testing release 28706239cd5f479fdbfc042ee24b509c2b50bc15
chore: initial commit 83e05aea96c87ef332e6d521599d616830d6f986

If you change the last release to point at 0b073a488725fd505b09fab2a9afb69759ecb012, and use Squash and Merge for release PRs, it should correct the issue for you going forward.

bcoe avatar Apr 01 '21 00:04 bcoe

🤔 I think i messed this with force-pushes during very first setup commits (and was/is using normal Merge mode in GH) Thanks for pointing out the root cause! PS Would be nice if action would warn about such hiccups, not sure if there is a reliable way of detecting it without false-positives

Coobaha avatar Apr 01 '21 02:04 Coobaha

@Coobaha will think about this as we improve our docs 👍

bcoe avatar Apr 06 '21 00:04 bcoe