Skip to content

Commit 875d579

Browse files
committed
Add commit range in component updater description
1 parent 714cefa commit 875d579

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/pyxis/managed_versioning/component_updater.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ def execute
4747
)
4848

4949
new_version_link = "[#{new_version[0...11]}](https://github.com/#{component.github_path}/commits/#{new_version})"
50-
compare_link = "[Compare changes](https://github.com/#{component.github_path}/compare/#{current_version}...#{new_version})"
50+
51+
commit_count = GithubClient.octokit.compare(component.github_path, current_version, new_version).ahead_by
52+
commit_range = "#{current_version[0...11]}...#{new_version[0...11]} (#{commit_count} commits)"
53+
compare_link = "[#{commit_range}](https://github.com/#{component.github_path}/compare/#{current_version}...#{new_version})"
5154
pr = GithubClient.octokit.create_pull_request(
5255
Project::Reticulum.github_path,
5356
Project::Reticulum.default_branch,

0 commit comments

Comments
 (0)