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
You can find the [resulting markdown here](sample_notebook_activity).
43
43
44
-
```{tip}
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.
44
+
## Filter pull requests by branch
45
+
46
+
Many repositories work with multiple active branches (e.g., `main`, `develop`, feature branches). When generating a changelog for a specific release, you typically only want to include pull requests that were merged into the release branch.
47
+
48
+
Use the `--branch` (or `-b`) parameter to filter pull requests by their target branch:
49
+
50
+
```bash
51
+
github-activity org/repo --since v1.0.0 --until v2.0.0 --branch main
52
+
```
53
+
54
+
This will **only include pull requests that targeted the `main` branch**, excluding any PRs merged to other branches like `develop` or feature branches.
55
+
56
+
```{note}
57
+
You can use any git reference (tag, commit hash, etc.) in place of a branch name.
46
58
```
47
59
48
60
## Choose a date or a tag to filter activity
@@ -217,7 +229,7 @@ This is not as well-documented as the CLI, but should have most functionality av
217
229
218
230
For generating markdown changelogs from Python, here's an example:
0 commit comments