Skip to content

Commit 7e506b1

Browse files
Copilotalexr00
andcommitted
Improve code clarity with better variable naming and comments
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent ba8f70c commit 7e506b1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/github/loggingOctokit.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ export async function compareCommits(remote: GitHubRemote, octokit: LoggingOctok
166166
try {
167167
// Use three-dot syntax when excluding merge commits to show only changes unique to the head branch
168168
// since it diverged from the base. This naturally excludes changes from merge commits.
169-
const separator = excludeMergeCommits ? '...' : '..';
170-
const basehead = `${base.repositoryCloneUrl.owner}:${compareWithBaseRef}${separator}${head.repositoryCloneUrl.owner}:${head.sha}`;
169+
// Two-dot syntax (default) shows all changes between base and head, including merge commits.
170+
const dotSeparator = excludeMergeCommits ? '...' : '..';
171+
const basehead = `${base.repositoryCloneUrl.owner}:${compareWithBaseRef}${dotSeparator}${head.repositoryCloneUrl.owner}:${head.sha}`;
171172

172173
const { data } = await octokit.call(octokit.api.repos.compareCommitsWithBasehead, {
173174
repo: remote.repositoryName,

0 commit comments

Comments
 (0)