Generate a chart of bugs over time from forgejo
Find a file
Edward Betts e575848c6d Add bug count and issues link to generated chart page
Display the current open bug total on the chart page and add a link to the Forgejo issues list.

Also document optional forgejo.issues_url in config.

Closes #3

Closes #2
2026-02-17 14:26:49 +00:00
build.py Add bug count and issues link to generated chart page 2026-02-17 14:26:49 +00:00
README.md Add bug count and issues link to generated chart page 2026-02-17 14:26:49 +00:00
template.html Add bug count and issues link to generated chart page 2026-02-17 14:26:49 +00:00

README for Bug Chart

Overview

Bug Chart is a Python tool designed to visualize the number of open bugs over time in a Forgejo repository. It retrieves data from Forgejo's API and generates a line graph showing the trend of open bugs. This tool is particularly useful for project managers and developers who want to track bug trends in their software projects.

Features

  • Data Retrieval: Downloads bug data from Forgejo using API tokens.
  • Graph Generation: Creates an HTML file with a line graph representing open bugs over time.
  • Caching: Stores bug data locally to reduce API calls.
  • Refresh Capability: Can be manually refreshed to update the data and graph.

Requirements

  • Python 3
  • Libraries: requests, json, configparser

Installation

Clone the repository from https://git.4angle.com/edward/bug-chart. Ensure you have Python 3 and the required libraries installed.

Configuration

Create a configuration file with the following structure:

[forgejo]
hostname=<Your Forgejo hostname>
token=<Your Forgejo Token>
issues_url=<Optional URL to your issue list>

[output]
dest=<Path to output HTML file>
cache=<Path to cache JSON file>

Usage

Run build.py to generate the bug chart. The script can be scheduled to run periodically using cron. For example:

40 9 * * * python3 ~/src/bug-chart/backup.py --refresh

To force a data refresh, run:

python3 build.py --refresh

Output

The script generates an HTML file (chart.html) displaying the line graph of open bugs over time.

License

This project is licensed under the MIT License.

Contact

For queries or contributions, please email Edward Betts at edward@4angle.com.

Acknowledgements

Developed and maintained by Edward Betts.