pyupio / pyup

A tool to update your project's dependencies on GitHub. Runs on pyup.io, comes with a command line interface.
https://pyup.io
MIT License
454 stars 67 forks source link

Commit messages can now be configured via config. #389

Closed Kaligule closed 3 years ago

Kaligule commented 4 years ago

Closes Issue #274.

The default values for commit messages stayed the same, but are now always read from the config (instead of magic strings in the Update.get_commit_message method).

This introduces two new settings for the config:

They should be set to strings. Within these strings the substrings "{package_name}", "{old_version}" and "{new_version}" will be replaced with their respective values.

Technical

The unittests are testing variants of the default messages. This ensures that the config values are really read from the config instead of assuming the default values.

The method Update.get_commit_message is not a classmethod anymore. This is because there can't be commit messages without providing a config from which the template can be read. This seemed like the simplest solution to me.

Documentation

I would like to document the new options, but I couldn't find the place to do it other then commit-message and PR-description.

codecov[bot] commented 4 years ago

Codecov Report

Merging #389 (3f73d08) into master (9a954ad) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #389   +/-   ##
=======================================
  Coverage   94.22%   94.23%           
=======================================
  Files          11       11           
  Lines        1160     1162    +2     
=======================================
+ Hits         1093     1095    +2     
  Misses         67       67           
Impacted Files Coverage Δ
pyup/config.py 98.91% <100.00%> (+0.02%) :arrow_up:
pyup/updates.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9a954ad...3f73d08. Read the comment docs.