You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64-31Lines changed: 64 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,20 @@
1
1
# Burndown Chart for GitHub Projects
2
2
An easy to use [burndown chart](https://www.scrum.org/resources/scrum-glossary#:~:text=B-,burn-down%20chart,-%3A%C2%A0a%20chart%20which) generator for [GitHub Project Boards](https://docs.github.com/en/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards).
* Create a **burndown chart for a GitHub Project Board**.
14
-
* Works for **private repositories**.
17
+
* Works for projects in **public/private repositories** and **organizations**.
15
18
* Includes a **trend line** for the current sprint.
16
19
* Supports custom labels for **tracking points for issues**
17
20
@@ -20,9 +23,9 @@ This tool, while flexible, makes the following assumptions about your project ma
20
23
* You use one and only one [GitHub Project Board](https://docs.github.com/en/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards) for each of your [Sprints](https://scrumguides.org/scrum-guide.html#the-sprint)
21
24
* You use one and only one [GitHub Milestone](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/about-milestones) for each of your [User Stories](https://www.scrum.org/resources/blog/user-story-or-stakeholder-story)
22
25
* You use one and only one [GitHub Issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues) for each of your [Sprint Backlog Items/Tasks](https://scrumguides.org/scrum-guide.html#sprint-backlog)
23
-
*Each of your GitHub Issues has a [label](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels) indicating how many [points](https://www.scrum.org/resources/scrum-glossary#:~:text=several%20ways%20such%20as-,user%20story%20points,-or%20task%20hours.%20Work) its corresponding task is worth.
26
+
*If you want to track points, each of your GitHub Issues has a [label](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels) indicating how many [points](https://www.scrum.org/resources/scrum-glossary#:~:text=several%20ways%20such%20as-,user%20story%20points,-or%20task%20hours.%20Work) its corresponding task is worth.
24
27
- Furthermore, all labels that indicate point values have the format `<prefix><int>`.
25
-
-However, multiple labels indicating points on the same Issue are supported.
28
+
-Multiple labels indicating points on the same Issue are supported.
26
29
* A Sprint Backlog Task is considered [Done](https://www.scrum.org/resources/professional-scrum-developer-glossary#:~:text=D-,definition%20of%20done%3A,-a%20shared%20understanding) if its corresponding GitHub Issue is Closed.
27
30
28
31
## Installation
@@ -38,7 +41,7 @@ python -m venv ./venv
38
41
39
42
### 2. Activate the virtual environment
40
43
41
-
*Linux/Mac OS*
44
+
*Linux/macOS*
42
45
```
43
46
source venv/bin/activate
44
47
```
@@ -56,34 +59,64 @@ source venv/bin/activate
56
59
pip install -r requirements.txt
57
60
```
58
61
62
+
## Configuration
63
+
### 1. Create a [Personal Access Token](https://github.com/settings/tokens) with the `repo` scope.
64
+
Do not share this token with anyone! It gives the bearer full control over all private repositories you have access to!
65
+
66
+
This is required to pull the Project Board data from GitHub's GraphQL API.
67
+
### 2. Make a copy of `src/github_projects_burndown_chart/config/secrets.json.dist` without the `.dist` ending.
68
+
This allows the `.gitignore` to exclude your `secrets.json` from being accidentally committed.
69
+
### 3. Fill out the `github_token` with your newly created Personal Access Token.
70
+
### 4. Make a copy of `src/github_projects_burndown_chart/config/config.json.dist` without the `.dist` ending.
71
+
This allows the `.gitignore` to exclude your `config.json` from being accidentally committed.
72
+
### 5. Fill out all the configuration settings
73
+
#### Repository Projects
74
+
`project_name`: A memorable name for your project for use with this tool.
75
+
76
+
`project_name.query_variables`
77
+
| Variable | Meaning |
78
+
|----------|---------|
79
+
|`repo_owner`| The username of the owner of the repo. <br/><br/> Example: `jhale1805`|
80
+
|`repo_name`| The name of the repo. <br/><br/> Example: `github-projects-burndown-chart`|
81
+
|`project_number`| The ID of the project for which you want to generate a burndown chart. This is found in the URL when looking at the project board on GitHub. <br/><br/> Example: `1` (from [`https://github.com/jhale1805/github-projects-burndown-chart/projects/1`](https://github.com/jhale1805/github-projects-burndown-chart/projects/1)) |
82
+
|`column_count`| A number >= the number of columns on the project board. (DEFAULT: 5)<br/><br/> A closer fit improves performance and reduces the chance of rate limiting from GitHub's GraphQL API. |
83
+
|`max_cards_per_column_count`| A number >= the maximum number of cards in any column on the project board. (DEFAULT: 50)<br/><br/> A closer fit improves performance and reduces the chance of rate limiting from GitHub's GraphQL API. |
84
+
|`labels_per_issue_count`| A number >= the number of labels on any issue on project board. (DEFAULT: 5)<br/><br/> A closer fit improves performance and reduces the chance of rate limiting from GitHub's GraphQL API. |
85
+
86
+
`project_name.settings`
87
+
| Variable | Meaning |
88
+
|----------|---------|
89
+
|`sprint_start_date`| The first day of the sprint formatted as `YYYY-MM-DD`. <br/><br/> Must be entered here since GitHub Project Boards don't have an assigned start/end date. <br/><br/> Example: `2021-10-08`|
90
+
|`sprint_end_date`| The last day of the sprint formatted as `YYYY-MM-DD`. <br/><br/> Must be entered here since GitHub Project Boards don't have an assigned start/end date. <br/><br/> Example: `2021-10-21`|
91
+
|`points_label`| (OPTIONAL) The prefix for issue labels containing the point value of the issue. Removing this prefix must leave just an integer. If set to `null`, the burndown chart will count open issues instead of points.<br/><br/> Example: `Points: ` (with the space) |
92
+
93
+
#### Organization Projects
94
+
All settings are the same as for the [Repository Projects](#repository-projects), except `repo_owner` and `repo_name` are replaced with `organization_name` as shown below.
95
+
96
+
`project_name.query_variables`
97
+
| Variable | Meaning |
98
+
|----------|---------|
99
+
|`organization_name`| The name of the organization on GitHub as it appears in the URL of their organization page. <br/><br/> Example: `golang` (from https://github.com/golang)|
59
100
## Usage
60
-
### Configuration
61
-
1. Create a [Personal Access Token](https://github.com/settings/tokens) with the `repo` scope.
62
-
- Do not share this token with anyone! It gives the bearer full control over all private repositories you have access to!
63
-
- This is required to pull the Project Board data from GitHub's GraphQL API.
64
-
2. Make a copy of `src/github_projects_burndown_chart/config/secrets.json.dist` without the `.dist` ending.
65
-
- This allows the `.gitignore` to exclude your `secrets.json` from being accidentally committed.
66
-
3. Fill out the `github_token` with your newly created Personal Access Token.
67
-
4. Make a copy of `src/github_projects_burndown_chart/config/config.json.dist` without the `.dist` ending.
68
-
- This allows the `.gitignore` to exclude your `config.json` from being accidentally committed.
69
-
5. Fill out all the configuration settings
70
-
-`repository_project_query.repo_owner`: The username of the owner of the repo.
71
-
- For example, `jhale1805`
72
-
-`repository_project_query.repo_name`: The name of the repo.
73
-
- For example, `github-projects-burndown-chart`
74
-
-`repository_project_query.project_number`: The id of the project for which you want to generate a burndown chart. This is found in the URL when looking at the project board on GitHub.
75
-
- For example, `1` from [`https://github.com/jhale1805/github-projects-burndown-chart/projects/1`](https://github.com/jhale1805/github-projects-burndown-chart/projects/1)
76
-
-`settings.sprint_start_date`: The first day of the sprint. Formatted as `YYYY-MM-DD`.
77
-
- Must be entered here since GitHub Project Boards don't have an assigned start/end date.
78
-
- For example, `2021-10-08`
79
-
-`settings.sprint_end_date`: The last day of the sprint. Formatted as `YYYY-MM-DD`.
80
-
- Must be entered here since GitHub Project Boards don't have an assigned start/end date.
81
-
- For example, `2021-10-22`
82
-
-`settings.points_label`: The prefix for issue labels containing the point value of the issue. Removing this prefix must leave just an integer.
83
-
- For example: `Points: ` (with the space)
84
-
### Generating the Chart
85
-
1. Run `make run` to generate the burndown chart.
86
-
- This will pop up an interactive window containing the burndown chart, including a button for saving it as a picture.
101
+
Given that `PROJECT_TYPE` is one of `[repository, organization]` and `PROJECT_NAME` matches a key in the `config.json` under the chosen `PROJECT_TYPE`, run the following command:
102
+
```
103
+
make run project_type=PROJECT_TYPE project_name=PROJECT_NAME
104
+
```
105
+
106
+
This will pop up an interactive window containing the burndown chart, including a button for saving it as a picture.
107
+
108
+
### Example
109
+
Make a copy of `example.config.json` without the leading `example.`
110
+
111
+
To see this repository's example project board:
112
+
```
113
+
make run project_type=repository project_name=burndown_chart_kickoff
114
+
```
115
+
116
+
To see Golang's progress on their current roadmap:
117
+
```
118
+
make run project_type=organization project_name=golang_on_deck
119
+
```
87
120
88
121
## Contributing
89
122
Contributions are welcome via a [Pull Request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
0 commit comments