Skip to content

Ensure merges are properly handled for detection of issues & PRs#62

Open
RomainCscn wants to merge 3 commits intomainfrom
romain/lin-69346-github-release-action-misses-issues-merged-into-release
Open

Ensure merges are properly handled for detection of issues & PRs#62
RomainCscn wants to merge 3 commits intomainfrom
romain/lin-69346-github-release-action-misses-issues-merged-into-release

Conversation

@RomainCscn
Copy link
Copy Markdown
Collaborator

Fix releases missing all issue keys on first sync with merge-commit HEAD

When a release pipeline has no prior release and HEAD is a merge commit (e.g. release-branch workflow merging into main), the action scans only HEAD itself — but the LIN keys live on HEAD^2's incoming history, so nothing gets extracted.

Two layered fixes:

  1. src/index.ts:getLatestSha — when there's no prior release SHA and HEAD is a merge, use HEAD^1 as the scan boundary instead of falling back to currentSha. Range becomes HEAD^1..HEAD, which captures everything brought in via the merge. Non-merge HEAD (squash, direct commit) keeps the conservative HEAD-only behavior.

  2. src/git.ts:getCommitContextsBetweenShas — pass --full-history when includePaths is set, so git stops dropping merge commits as TREESAME within the filtered paths. Also --no-walk for from === to to prevent drift to unrelated ancestors.

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 7, 2026

@RomainCscn RomainCscn force-pushed the romain/lin-69346-github-release-action-misses-issues-merged-into-release branch from e5555b7 to d6f2afd Compare May 7, 2026 11:54
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