Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Tweak "is this a substantial change?" heuristic #15

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/version_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def message_builder(gems)
repo_name = gem["app_name"]
repo_url = gem["links"]["repo_url"]
rubygems_version = fetch_rubygems_version(repo_name)
if !rubygems_version.nil? &&
files_changed_since_tag(repo_name, "v#{rubygems_version}").any? { |path| path_built_into_gem?(path) }
if !rubygems_version.nil? && change_is_significant?(repo_name, rubygems_version)
"<#{repo_url}|#{repo_name}> has unreleased changes since v#{rubygems_version}"
end
}.join("\n")
Expand Down Expand Up @@ -74,7 +73,9 @@ def files_changed_since_tag(repo, tag)
end
end

def path_built_into_gem?(path)
path.end_with?(".gemspec") || path.start_with?("app/", "lib/")
def change_is_significant?(repo_name, previous_version)
files_changed_since_tag(repo_name, "v#{previous_version}").any? do |path|
path.start_with?("app/", "lib/") || path == "CHANGELOG.md"
end
end
end