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

Merge up PR creation step fails when no changes to merge up #173

Open
Xerkus opened this issue Dec 13, 2021 · 0 comments
Open

Merge up PR creation step fails when no changes to merge up #173

Xerkus opened this issue Dec 13, 2021 · 0 comments
Labels
Bug Something isn't working Enhancement

Comments

@Xerkus
Copy link
Member

Xerkus commented Dec 13, 2021

Bug Report

Q A
Version(s) x.y.z

Summary

In unusual conditions I had to trigger 2.13.1 patch release that had no changes to merge up to 2.14.x due to laminas/laminas-navigation#28

Attempt to create merge-up PR failed since it would have ended up with empty changeset.

https://github.com/laminas/laminas-navigation/runs/4503567078?check_suite_focus=true#step:5:1

Current behavior

Merge up PR creation fails when there are no changes to merge up.

In invariant_violation.php line 18:
                                                     
  [Psl\Exception\InvariantViolationException]        
  Failed to create pull request through GitHub API.  
                                                     

Exception trace:
  at /app/vendor/azjezz/psl/src/Psl/invariant_violation.php:18
 Psl\invariant_violation() at /app/vendor/azjezz/psl/src/Psl/invariant.php:21
 Psl\invariant() at /app/src/Github/Api/V3/CreatePullRequestThroughApiCall.php:65
 Laminas\AutomaticReleases\Github\Api\V3\CreatePullRequestThroughApiCall->__invoke() at /app/src/Application/Command/CreateMergeUpPullRequest.php:109
 Laminas\AutomaticReleases\Application\Command\CreateMergeUpPullRequest->execute() at /app/vendor/symfony/console/Command/Command.php:256
 Symfony\Component\Console\Command\Command->run() at /app/vendor/symfony/console/Application.php:971
 Symfony\Component\Console\Application->doRunCommand() at /app/vendor/symfony/console/Application.php:290
 Symfony\Component\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:166
 Symfony\Component\Console\Application->run() at /app/bin/console.php:171
 Laminas\AutomaticReleases\WebApplication\{closure}() at /app/bin/console.php:172

laminas:automatic-releases:create-merge-up-pull-request

How to reproduce

Trigger release when released branch and next branch have all changes already

Expected behavior

Probably, detect no changes condition and skip PR creation

@Xerkus Xerkus added the Bug Something isn't working label Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants