thamara / time-to-leave

Log work hours and get notified when it's time to leave the office and start to live.
http://timetoleave.app
GNU General Public License v3.0
455 stars 267 forks source link

Fix #1027: Avoid update-changelog to generate an extra line when there are no changes #1029

Closed araujoarthur0 closed 11 months ago

araujoarthur0 commented 11 months ago

Related issue

Closes #1027

Context / Background

update-changelog.py was adding an extra empty line to the section below every time the bot was called while there were no changes in the current release.

<!--- Begin changes - Do not remove -->

<!--- End changes - Do not remove -->

For example: https://github.com/thamara/time-to-leave/commit/322a4d3e218fb3a26577a9c65e177d8a995fa63f

This extra line gets a linter complaint every time and then causes problems for the next PR.

This is not a common problem because we don't often have no changes, though. Just now we got the first change.

What change is being introduced by this PR?

How will this be tested?

Ran it locally against an empty changelog.md and against a filled changelog.md.

codecov[bot] commented 11 months ago

Codecov Report

Merging #1029 (8149940) into main (ae757ab) will decrease coverage by 0.10%. Report is 3 commits behind head on main. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1029      +/-   ##
==========================================
- Coverage   75.11%   75.02%   -0.10%     
==========================================
  Files          26       26              
  Lines        2202     2202              
  Branches      346      346              
==========================================
- Hits         1654     1652       -2     
- Misses        548      550       +2     

see 1 file with indirect coverage changes