Commit b833027
Fix packagist release failure: configure trunk branch for PushNextDevReleaseWorker (#210)
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":
```php
// 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]
>
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
>
<__filter_complete__></__filter_complete__></details><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>
>
- Fixes #209
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *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>
>
</details>
- Fixes #209
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: adamziel <[email protected]>
Co-authored-by: Adam Zieliński <[email protected]>1 parent 5303dfb commit b833027
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| |||
0 commit comments