Skip to content

Commit

Permalink
Merge pull request #14 from wemogy/main
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
SebastianKuesters authored Mar 22, 2024
2 parents e27894f + 5637da0 commit d900ddf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29311,7 +29311,7 @@ class GitHubRepositoryUtils {
});
}
getCommitsBetweenTags(startTag_1, endTag_1) {
return __awaiter(this, arguments, void 0, function* (startTag, endTag, branch = "main") {
return __awaiter(this, arguments, void 0, function* (startTag, endTag, branch = "main", includeStartTag = false) {
// destructuring
const { owner, repo, octokit } = this;
// Get the commit corresponding to the start tag
Expand All @@ -29333,7 +29333,9 @@ class GitHubRepositoryUtils {
basehead: `${startCommit.sha}...${endTag}`,
});
// Prepend the commit corresponding to the start tag
compareCommitsWithBaseheadResponse.data.commits.unshift(startCommit);
if (includeStartTag) {
compareCommitsWithBaseheadResponse.data.commits.unshift(startCommit);
}
return compareCommitsWithBaseheadResponse.data.commits;
});
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/utils/GitHubRepositoryUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ export default class GitHubRepositoryUtils {
public async getCommitsBetweenTags(
startTag: string,
endTag: string,
branch: string = "main"
branch: string = "main",
includeStartTag: boolean = false
) {
// destructuring
const { owner, repo, octokit } = this;
Expand Down Expand Up @@ -179,7 +180,9 @@ export default class GitHubRepositoryUtils {
});

// Prepend the commit corresponding to the start tag
compareCommitsWithBaseheadResponse.data.commits.unshift(startCommit);
if (includeStartTag) {
compareCommitsWithBaseheadResponse.data.commits.unshift(startCommit);
}

return compareCommitsWithBaseheadResponse.data.commits;
}
Expand Down

0 comments on commit d900ddf

Please sign in to comment.