Skip to content

Conversation

@sebingel
Copy link

The previous implementation used repo.Branch() which fails to resolve branch names containing slashes (e.g., "feature/ticket-12345"). This caused valid open merge requests to be skipped with "branch not found" errors.

Changed to use repo.Reference() with plumbing.NewBranchReferenceName() which properly handles branch names with slashes by constructing the full ref path (refs/heads/feature/ticket-12345).

Also added debug logging to track branch lookup attempts and improved error reporting to aid future troubleshooting.

The previous implementation used `repo.Branch()` which fails to resolve
branch names containing slashes (e.g., "feature/ticket-12345"). This caused
valid open merge requests to be skipped with "branch not found" errors.

Changed to use `repo.Reference()` with `plumbing.NewBranchReferenceName()`
which properly handles branch names with slashes by constructing the full
ref path (refs/heads/feature/ticket-12345).

Also added debug logging to track branch lookup attempts and improved
error reporting to aid future troubleshooting.
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