Add base branch to prs and dashboard #605
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Base Branch Filtering to Pull Request Metrics
Summary
This PR introduces the ability to filter pull request metrics by base branch, enabling more granular insights into development workflows across different branches (e.g., develop, staging).
For example, PRs targeting the staging branch (typically used for releases) are usually larger and could affect the accuracy of the overall metrics. In such cases, it may be useful to view metrics exclusively for PRs with develop as the base branch.
Changes Made
Database Changes
base_branchcolumn toevents_pull_requeststable to store the target branch for each PRBackend Changes
Models
Events::PullRequestmodel to include base branch database_branchesmethod toRepositorymodel to fetch available branchesControllers
DevelopmentMetricsControllerto pass base branch parameter to metrics buildersPullRequestsControllerto accept and filter by base branchServices
Enhanced multiple service classes to support base branch filtering:
Builders::Chartkick::DevelopmentMetricsand related metric buildersFrontend Changes
UI Components
Styling
Data Processing
Technical Notes
Testing