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
Generate simple markdown changelogs for GitHub repositories written in Python.
3
+
Generate markdown changelogs for GitHub repositories with more control over the kinds of contributions that are included.
4
4
5
-
This package does two things:
5
+
GitHub Activity allows you to include more than just "PR author" in your changelogs, such as PR reviewers and issue commenters. This allows you to give credit to a wider group of contributors around your project.
6
6
7
-
1. Given a GitHub org, repository, an initial git reference or date, use the
8
-
[GitHub GraphQL API](https://developer.github.com/v4/) to return a DataFrame
9
-
of all issue and PR activity for this time period.
10
-
2. A CLI to render this activity as markdown, suitable for generating changelogs or
11
-
community updates.
12
-
13
-
## Installation
14
-
15
-
The easiest way to install this package is to do so directly from GitHub with `pip`:
16
-
17
-
```
18
-
pip install github-activity
7
+
```{seealso}
8
+
See [the JupyterHub Team changelog](https://github.com/jupyterhub/jupyterhub/blob/5.3.0/docs/source/reference/changelog.md) for an example of this tool in action.
GitHub Activity tries to automatically determine the unique list of contributors within a given window of time.
32
-
There are many ways to define this, and there isn't necessarily a "correct" method out there.
19
+
The easiest way to install this package is to do so directly from GitHub with `pip`:
33
20
34
-
We try to balance the two extremes of "anybody who shows up is recognized as contributing" and "nobody is recognized as contributing".
35
-
We've chosen a few rules that try to reflect sustained engagement in issues/PRs, or contributions in the form of help in _others'_ issues or contributing code.
21
+
```
22
+
pip install github-activity
23
+
```
36
24
37
-
Here are the rules we follow for finding a list of contributors within a time window. A contributor is anyone who has:
25
+
## Why does this tool exist?
38
26
39
-
- Contributed to a PR merged in that window (includes opening, merging, committing, commenting, or committing)
40
-
- Commented on >= 2 issues that weren't theirs
41
-
- Commented >= 6 times on any one issue
42
-
- Known bot accounts are generally not considered contributors
27
+
We created `github-activity` because there is a lot that goes into building open source tools than just making a pull request. This tool tries to surface more diverse contributions around a release, like reviews, comments, etc. It tries to paint a more complete picture of all the work that goes into building open source software.
43
28
44
-
We'd love feedback on whether this is a good set of rules to use.
29
+
You might want to use this tool if you're hoping to give credit and attribution to more people in your open source community. This gives your community a feeling of more appreciation, can create more incentives for others to contribute.
Copy file name to clipboardExpand all lines: docs/use.md
+58-3Lines changed: 58 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,10 @@
1
1
# User guide
2
2
3
+
This tool has two main user interfaces:
4
+
5
+
1.**A python library**: Given a GitHub org, repository, an initial git reference or date, use the [GitHub GraphQL API](https://developer.github.com/v4/) to return a DataFrame of all issue and PR activity for this time period.
6
+
2.**A Command Line Interface** to render this activity as markdown, suitable for generating changelogs or community updates.
7
+
3
8
These sections describe how to control the major functionality of this tool.
4
9
5
10
## Generate a markdown changelog
@@ -19,8 +24,7 @@ The `[<org>/<repo>]` argument is **optional**.
19
24
If you do not give it, then `github-activity` will attempt to infer this value by running `git remote -v` and using either `upstream` or `origin` (preferring `upstream` if both are available).
20
25
21
26
The (optional) arguments in `--since` (or `-s`) and `--until` (or `-u`) can either be
22
-
a date, or a ref (such as a commit hash or tag). `github-activity` will pull the activity
23
-
between the dates corresponding to these values.
27
+
a date, or a ref (such as a commit hash or tag). `github-activity` will pull the activity between the dates corresponding to these values.
24
28
25
29
```{margin}
26
30
There are many other options with the `github-activity` CLI, run `github-activity -h`
@@ -41,7 +45,9 @@ You can find the [resulting markdown here](sample_notebook_activity).
41
45
For repositories that use multiple branches, it may be necessary to filter PRs by a branch name. This can be done using the `--branch` parameter in the CLI. Other git references can be used as well in place of a branch name.
42
46
```
43
47
44
-
### Split PRs by tags and prefixes
48
+
(prefixes-and-tags)=
49
+
50
+
## Split PRs by tags and prefixes
45
51
46
52
Often you wish to split your PRs into multiple categories so that they are easier
47
53
to scan and parse. You may also _only_ want to keep some PRs (e.g. features, or API
@@ -64,6 +70,55 @@ You can choose to *remove* some types of PRs from your changelog by passing the
64
70
left-most column above.
65
71
```
66
72
73
+
## Include Pull Request reviewers and commenters in your changelog
74
+
75
+
By default, GitHub Activity will include any _reviewer_ of a pull request in the item for that PR. This looks like the following:
76
+
77
+
## Include a list of all contributors at the end of your changelog
78
+
79
+
By default, this tool will include a long list of contributors at the end of your changelog. This is the unique set of all contributors that contributed to the release.
GitHub Activity tries to automatically determine the unique list of contributors within a given window of time.
86
+
There are many ways to define this, and there isn't necessarily a "correct" method out there.
87
+
88
+
We try to balance the two extremes of "anybody who shows up is recognized as contributing" and "nobody is recognized as contributing".
89
+
We've chosen a few rules that try to reflect sustained engagement in issues/PRs, or contributions in the form of help in _others'_ issues or contributing code.
90
+
91
+
Here are the rules we follow for finding a list of contributors within a time window. A contributor is anyone who has:
92
+
93
+
- Contributed to a PR merged in that window (includes opening, merging, committing, commenting, or committing)
94
+
- Commented on >= 2 issues that weren't theirs
95
+
- Commented >= 6 times on any one issue
96
+
- Known bot accounts are generally not considered contributors
97
+
98
+
We'd love feedback on whether this is a good set of rules to use.
99
+
100
+
## Strip PR type metadata from the changelog titles
101
+
102
+
If you follow the [title prefix convention used to split PRs](#prefixes-and-tags), you can remove these prefixes when you generate your changelog, so that they don't clutter the output.
103
+
104
+
To strip title prefix metadata, use the `--strip-brackets` flag.
105
+
106
+
For example, `[DOC] Add some documentation` will be rendered as `Add some documentation`.
107
+
108
+
## Change the heading level for your changelog items
109
+
110
+
To change the starting heading level for changelog items, use the `--heading-level N` flag. Where `N` is the starting heading level (e.g., `2` corresponds to `##`).
111
+
112
+
This is useful if you want to _embed_ your changelog into a larger one (e.g., `CHANGELOG.md`).
113
+
114
+
## Include issues in your changelog
115
+
116
+
To include closed issues in your changelog, use the `--include-issues` flag.
117
+
118
+
## Include opened issues in your changelog
119
+
120
+
To include issues and Pull Requests that were _opened_ in a time period, use teh `--include-opened` flag.
0 commit comments