Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Added progressbar for issues (#1146). #3171
my pull request adds the progressbar for issues as requested in issue #1146. It basically adds three variables to issue.go that hold the information, how many tasks exist, how many are done, and the percentage of the progress.
The values are updated upon creating a new issue and modifying the issues content. The content is parsed using regular expressions, collecting the amount of valid tasks and valid completed tasks.
The style is github-alike.
I hope I made everything correct - this is the first pull request in my life :) (please be merciful).
I could not locate any arithmetic operations in the templates, so I assumed it is task of the models to handle these operations.
As alternative to arithmetic in the templates using go, we could also use css calc():
The calculation would be on the clientside this way.
@@ Coverage Diff @@ ## master #3171 +/- ## ========================================== - Coverage 34.82% 34.82% -0.01% ========================================== Files 277 277 Lines 40263 40271 +8 ========================================== + Hits 14023 14025 +2 - Misses 24181 24186 +5 - Partials 2059 2060 +1