Skip to content

fix(ci): remove pull_request trigger from release-drafter workflow#157

Open
phmatray wants to merge 41 commits intomainfrom
fix/release-drafter-pr-trigger
Open

fix(ci): remove pull_request trigger from release-drafter workflow#157
phmatray wants to merge 41 commits intomainfrom
fix/release-drafter-pr-trigger

Conversation

@phmatray
Copy link
Contributor

What broke

The Release Drafter workflow has been failing consistently on every PR opened/synchronized (run IDs: 23369773059, 23369768998, 23111592904, and more).

Error:

Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"}

Why

When the workflow is triggered by a pull_request event, the target_commitish is set to the PR merge ref (e.g. refs/pull/156/merge). GitHub's Releases API rejects this as an invalid commitish when updating the existing draft release.

What was fixed

Removed the pull_request trigger from the workflow. The autolabeler feature is not configured or in use, so the pull_request trigger served no purpose.

The workflow now only runs on push to main, which is the correct behavior — the release draft is updated whenever a PR is merged, not on every PR open/sync event.

Impact

  • ✅ No more spurious CI failures on every PR
  • ✅ Release draft still gets updated correctly after merges to main
  • ✅ No functionality lost (autolabeler was not active)

dependabot bot and others added 30 commits January 10, 2025 05:43
Bumps [xunit](https://github.com/xunit/xunit) from 2.9.2 to 2.9.3.
- [Commits](xunit/xunit@v2-2.9.2...v2-2.9.3)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](coverlet-coverage/coverlet@v6.0.3...v6.0.4)

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 3.0.0 to 3.0.2.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](xunit/visualstudio.xunit@3.0.0...3.0.2)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.12.0 to 17.13.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](microsoft/vstest@v17.12.0...v17.13.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [Microsoft.Extensions.DependencyInjection.Abstractions](https://github.com/dotnet/runtime) from 9.0.0 to 9.0.4.
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](dotnet/runtime@v9.0.0...v9.0.4)

---
updated-dependencies:
- dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions
  dependency-version: 9.0.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Verified that DirectoryRenamed event invocation already correctly passes
the new path parameter. Code at VFS.Rename.cs line 96 matches the
VFSDirectoryRenamedArgs constructor signature perfectly.

Build verification: Succeeded with 0 errors.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…aths

Verified that redo logic at line 180 in ChangeHistory.cs is already correct:
- Uses directoryRenamed.Path (old path where directory is after undo)
- Uses directoryRenamed.NewName to rename forward
- This correctly recreates the original rename operation

Flow verification:
1. Original: /dir1 -> /dir2 (directory at /dir2)
2. Undo: Uses NewPath (/dir2) to rename to OldName -> directory at /dir1
3. Redo: Uses Path (/dir1) to rename to NewName -> directory back at /dir2

No code changes needed - implementation already correct.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…y nested structure

Added comprehensive test RenameDirectory_handles_deeply_nested_structure() that verifies:
- Creates deeply nested structure /a/b/c/d/e with files at each level
- Creates subdirectories at different levels
- Renames a middle directory and verifies all nested paths are updated correctly
- Verifies file contents are preserved
- Verifies file and directory Path properties are correctly updated
- Total of 11 RenameDirectory tests now passing

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Verification Results:
- 25 rename-specific tests: ALL PASSED
- Total test results: 379 passed, 4 pre-existing failures (locale-related)
- No regressions introduced by directory rename fix

The 4 failures are in VFSBinaryExtensionsTests (decimal separator formatting)
and are completely unrelated to the rename operation implementation.

All directory rename functionality verified:
✓ Basic rename operations
✓ Nested file path updates
✓ Deeply nested structures
✓ Event args with correct paths
✓ Undo/redo operations
✓ Edge case and error handling

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…a-requested)

Fixes:
- Add duplicate directory check in VFS.Rename.cs before rename operation
- Add test to verify exception is thrown when renaming to existing name

Verified:
- Validation follows same pattern as CreateDirectory duplicate check
- Test matches pattern from existing duplicate validation tests
- Fixes acceptance criteria #5: renaming to existing name throws exception

QA Fix Session: 1

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixes #130

The RenameDirectory method signature takes (VFSDirectoryPath, string),
not (VFSDirectoryPath, VFSDirectoryPath). Updated the demo to use the
correct method signature.

Changes:
- Uncommented the directory rename step
- Fixed second parameter to be a string ('heroes') instead of VFSDirectoryPath
- Removed TODO comment

Tests: All 379 unit tests + 71 GitHub tests pass on net10.0
* chore: standardize renovate config

* chore: fix renovate config for repo technologies
…on.abstractions to 10.0.4 (#150)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Resolve conflicts: keep dev Shouldly assertions, incorporate rename
validation fix and new test cases from branch.
Add contributors badge and CI badge to README.
…on.Abstractions-9.0.4' into dev

Keep 10.0.4 (already updated via Renovate), supersedes dependabot 9.0.4.
Keep dev's newer package versions (Test.Sdk 18.3.0, Shouldly, etc.).
phmatray and others added 11 commits March 10, 2026 23:52
Keep dev's newer coverlet.collector 8.0.0.
Keep dev's newer package versions.
Keep dev's generated CSS and .gitignore; incorporate WIP backup changes.
Keep dev versions for all conflicts; remove stale DemoCli csproj from stash.
The buildsphere package does not exist on NuGet, causing Renovate
package lookup failures (fixes #140).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
The pull_request trigger was causing the Release Drafter action to fail
with a GitHub API validation error:

  'Validation Failed: target_commitish = refs/pull/N/merge is invalid'

When triggered by a pull_request event, the action tries to set the
release's target_commitish to refs/pull/N/merge, which GitHub rejects
as an invalid ref for a release.

The pull_request trigger was only needed for autolabeler support, which
is not configured in this repo. Removing it fixes the recurring failures
and keeps the release draft updated only on push to main (the intended
behavior).

Fixes: workflow runs 23369773059 and 23369768998
@phmatray phmatray force-pushed the fix/release-drafter-pr-trigger branch from da9f91b to e040752 Compare March 22, 2026 09:03
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.

1 participant