Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

The release process fails at step 8/8 because PushNextDevReleaseWorker from symplify/monorepo-builder needs to be configured to use "trunk" as the branch name, but was using the default "master" branch.

Changes

  • monorepo-builder.php: Configure the branch name parameter explicitly using $config->parameters()->set( Option::DEFAULT_BRANCH_NAME, 'trunk' ); to parameterize the default PushNextDevReleaseWorker

The default PushNextDevReleaseWorker from symplify/monorepo-builder now reads the configured branch name parameter (set to "trunk") instead of using the hardcoded default "master":

// monorepo-builder.php
use Symplify\MonorepoBuilder\ValueObject\Option;

return static function ( MBConfig $config ): void {
    // ...
    $config->defaultBranch( 'trunk' );
    
    // Set the branch name parameter explicitly for PushNextDevReleaseWorker.
    $config->parameters()->set( Option::DEFAULT_BRANCH_NAME, 'trunk' );
    
    $config->workers([
        // ...
        PushNextDevReleaseWorker::class,
    ]);
};

[!WARNING]

Original prompt

This section details on the original issue you should resolve

<filter_complete></filter_complete>

<issue_title>Packagist release fails</issue_title>
<issue_description>Changed current directory to /home/runner/.composer


1/8) Add local tag "v0.3.0"
===========================

2/8) Push "0.3.0" tag to remote repository
==========================================

3/8) Update "replace" version in "composer.json" to new tag to avoid circular dependencies conflicts
====================================================================================================

4/8) Set packages mutual dependencies to "^0.3" version
=======================================================

5/8) Change "Unreleased" in `CHANGELOG.md` to "0.3.0 - 2025-11-19"
==================================================================

6/8) Set packages mutual dependencies to "^0.4" (alias of dev version)
======================================================================

7/8) Set branch alias "0.4-dev" to all packages
===============================================

8/8) Push "0.4-dev" open to remote repository
=============================================


In ProcessRunner.php line 73:
                                                                               
  The command "git add . &amp;&amp; git commit --allow-empty -m "open 0.4-dev" &amp;&amp; git  
   push origin "master"" failed.                                               
                                                                               
  Exit Code: 1(General error)                                                  
                                                                               
  Working directory: /home/runner/work/php-toolkit/php-toolkit                 
                                                                               
  Output:                                                                      
  ================                                                             
  [trunk 13f2bc7c] open 0.4-dev                                                
   10 files changed, 59 insertions(+), 59 deletions(-)                         
                                                                               
                                                                               
  Error Output:                                                                
  ================                                                             
  error: src refspec master does not match any                                 
  error: failed to push some refs to 'https://github.com/WordPress/php-toolki  
  t'                       
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

Original prompt

This section details on the original issue you should resolve

<issue_title>Packagist release fails</issue_title>
<issue_description>Changed current directory to /home/runner/.composer


1/8) Add local tag "v0.3.0"
===========================

2/8) Push "0.3.0" tag to remote repository
==========================================

3/8) Update "replace" version in "composer.json" to new tag to avoid circular dependencies conflicts
====================================================================================================

4/8) Set packages mutual dependencies to "^0.3" version
=======================================================

5/8) Change "Unreleased" in `CHANGELOG.md` to "0.3.0 - 2025-11-19"
==================================================================

6/8) Set packages mutual dependencies to "^0.4" (alias of dev version)
======================================================================

7/8) Set branch alias "0.4-dev" to all packages
===============================================

8/8) Push "0.4-dev" open to remote repository
=============================================


In ProcessRunner.php line 73:
                                                                               
  The command "git add . && git commit --allow-empty -m "open 0.4-dev" && git  
   push origin "master"" failed.                                               
                                                                               
  Exit Code: 1(General error)                                                  
                                                                               
  Working directory: /home/runner/work/php-toolkit/php-toolkit                 
                                                                               
  Output:                                                                      
  ================                                                             
  [trunk 13f2bc7c] open 0.4-dev                                                
   10 files changed, 59 insertions(+), 59 deletions(-)                         
                                                                               
                                                                               
  Error Output:                                                                
  ================                                                             
  error: src refspec master does not match any                                 
  error: failed to push some refs to 'https://github.com/WordPress/php-toolki  
  t'                       
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…espects the configured default branch

Co-authored-by: adamziel <205419+adamziel@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Packagist release process for version 0.3.0 Fix packagist release failure: use trunk branch instead of hardcoded master Nov 19, 2025
Copilot finished work on behalf of adamziel November 19, 2025 17:26
Copilot AI requested a review from adamziel November 19, 2025 17:26
@adamziel adamziel marked this pull request as ready for review November 19, 2025 22:55
@adamziel
Copy link
Collaborator

@copilot the branch name is not hardcoded in PushNextDevReleaseWorker.php, it can be parametrized. Please parametrize it, see https://github.com/symplify/monorepo-builder/blob/805b2a426491212d40567e4070778a594a1633c2/packages/Release/ReleaseWorker/PushNextDevReleaseWorker.php#L4

…onfiguration

Co-authored-by: adamziel <205419+adamziel@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 20, 2025

@copilot the branch name is not hardcoded in PushNextDevReleaseWorker.php, it can be parametrized. Please parametrize it, see https://github.com/symplify/monorepo-builder/blob/805b2a426491212d40567e40...

Updated to use the default PushNextDevReleaseWorker with explicit branch parameter configuration. Removed the custom worker and configured the branch name using $config->parameters()->set( Option::DEFAULT_BRANCH_NAME, 'trunk' ); (commit d671dbf)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/symplify/monorepo-builder/tags
    • Triggering command: curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Fix packagist release failure: use trunk branch instead of hardcoded master Fix packagist release failure: configure trunk branch for PushNextDevReleaseWorker Nov 20, 2025
Copilot finished work on behalf of adamziel November 20, 2025 11:53
@adamziel adamziel merged commit b833027 into trunk Nov 20, 2025
22 checks passed
@adamziel adamziel deleted the copilot/fix-packagist-release-failure branch November 20, 2025 12:04
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

Successfully merging this pull request may close these issues.

Packagist release fails

2 participants