Skip to content

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

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

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

Conversation

@phmatray
Copy link
Copy Markdown
Contributor

What broke

The Release Drafter workflow was failing on every PR open/sync with:

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

Root cause: The workflow had a pull_request trigger (types: opened, reopened, synchronize). When triggered on a PR, the action tries to update the release draft with target_commitish: refs/pull/160/merge — which is not a valid release target on GitHub.

Why it happened

The pull_request trigger is only needed when autolabeler is configured. In this repo, the autolabeler section is commented out, so the trigger was vestigial and broken.

What was fixed

Removed the pull_request trigger from the workflow. The Release Drafter now only runs on pushes to main, which is the correct and intended behavior: draft the next release as PRs land in main.

Impact

  • ✅ No more spurious CI failures on every PR
  • ✅ Release draft still updated automatically on merge to main
  • ✅ No functionality lost (autolabeler was never 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 14 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>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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 release-drafter was triggering on every PR open/sync, which caused
a 'Validation Failed: invalid target_commitish' error because
refs/pull/*/merge is not a valid target for updating a release draft.

The autolabeler feature is not configured (commented out), so the
pull_request trigger served no purpose. Removing it so the workflow
only runs on pushes to main, which is the intended behavior.

Fixes: 'Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"}'
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