-
Notifications
You must be signed in to change notification settings - Fork 14
Improve branch filtering and raise error on empty dataframes #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| ## Filter pull requests by branch | ||
|
|
||
| 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. | ||
|
|
||
| Use the `--branch` (or `-b`) parameter to filter pull requests by their target branch: | ||
|
|
||
| ```bash | ||
| github-activity org/repo --since v1.0.0 --until v2.0.0 --branch main | ||
| ``` | ||
|
|
||
| This will **only include pull requests that targeted the `main` branch**, excluding any PRs merged to other branches like `develop` or feature branches. | ||
|
|
||
| ```{note} | ||
| You can use any git reference (tag, commit hash, etc.) in place of a branch name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just documenting pre-existing functionality
| # Wrap in a try/except so we don't have an ugly stack trace if there's an error | ||
| try: | ||
| if args.all: | ||
| md = generate_all_activity_md(args.target, **common_kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all just tab-adding. The only difference is the try/except statement, so that if valueerrors happen down below we can display them nicely.
|
I gave this a quick review just to sanity check - it seems OK to me and it makes our tests happy, so I'll merge this and cut a quick release since this fixes our tests! |
This fixes two things I noticed in #161
None)maindue to queries that return an empty result #161